History

avr32: remove explicit support

The vendor has long since switched to Arm, with the last product reaching their official end-of-life over 11 years ago. Linux support for the ISA was dropped 7 years ago. More importantly, this architecture was never supported by upstream GCC, and the vendor fork is stuck at version 4.2, which FFmpeg no longer supports (as per C11 requirement). Presumably, this is still the case given the lack of vendor support. Indeed all of the code being removed here consisted of inline assembler scalar optimisations. A sane C compiler should be able to perform those automatically nowadays (with the sole exception of fast CLZ detection), but this is moot as this architecture is evidently dead.

Rémi Denis-Courmont committed 2 years ago

Commit 4819aee1 parent be2cabc5 files · +2 −313Browse files

Showing the changes to libavcodec (2 of 5 files). Show all

Unified · Split

2 files
  1. libavcodec/avr32/mathops.h +0 −101
  2. libavcodec/mathops.h +0 −2
libavcodec/avr32/mathops.h+0−101
@@ -1,101 +0,0 @@
1−/*
2− * Simple math operations
3− * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
4− *
5− * This file is part of FFmpeg.
6− *
7− * FFmpeg is free software; you can redistribute it and/or
8− * modify it under the terms of the GNU Lesser General Public
9− * License as published by the Free Software Foundation; either
10− * version 2.1 of the License, or (at your option) any later version.
11− *
12− * FFmpeg is distributed in the hope that it will be useful,
13− * but WITHOUT ANY WARRANTY; without even the implied warranty of
14− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15− * Lesser General Public License for more details.
16− *
17− * You should have received a copy of the GNU Lesser General Public
18− * License along with FFmpeg; if not, write to the Free Software
19− * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20− */
21−
22−#ifndef AVCODEC_AVR32_MATHOPS_H
23−#define AVCODEC_AVR32_MATHOPS_H
24−
25−#include <stdint.h>
26−#include "config.h"
27−#include "libavutil/common.h"
28−
29−#if HAVE_INLINE_ASM
30−
31−#define MULL MULL
32−static inline av_const int MULL(int a, int b, unsigned shift)
33−{
34− union { int64_t x; int hl[2]; } x;
35− __asm__ ("muls.d %0, %1, %2 \n\t"
36− "lsr %0, %3 \n\t"
37− "or %0, %0, %m0<<%4 \n\t"
38− : "=r"(x) : "r"(b), "r"(a), "i"(shift), "i"(32-shift));
39− return x.hl[1];
40−}
41−
42−#define MULH MULH
43−static inline av_const int MULH(int a, int b)
44−{
45− union { int64_t x; int hl[2]; } x;
46− __asm__ ("muls.d %0, %1, %2" : "=r"(x.x) : "r"(a), "r"(b));
47− return x.hl[0];
48−}
49−
50−#define MUL64 MUL64
51−static inline av_const int64_t MUL64(int a, int b)
52−{
53− int64_t x;
54− __asm__ ("muls.d %0, %1, %2" : "=r"(x) : "r"(a), "r"(b));
55− return x;
56−}
57−
58−static inline av_const int64_t MAC64(int64_t d, int a, int b)
59−{
60− __asm__ ("macs.d %0, %1, %2" : "+r"(d) : "r"(a), "r"(b));
61− return d;
62−}
63−#define MAC64(d, a, b) ((d) = MAC64(d, a, b))
64−#define MLS64(d, a, b) MAC64(d, -(a), b)
65−
66−static inline av_const int MAC16(int d, int a, int b)
67−{
68− __asm__ ("machh.w %0, %1:b, %2:b" : "+r"(d) : "r"(a), "r"(b));
69− return d;
70−}
71−#define MAC16(d, a, b) ((d) = MAC16(d, a, b))
72−#define MLS16(d, a, b) MAC16(d, -(a), b)
73−
74−#define MUL16 MUL16
75−static inline av_const int MUL16(int a, int b)
76−{
77− int d;
78− __asm__ ("mulhh.w %0, %1:b, %2:b" : "=r"(d) : "r"(a), "r"(b));
79− return d;
80−}
81−
82−#define mid_pred mid_pred
83−static inline av_const int mid_pred(int a, int b, int c)
84−{
85− int m;
86− __asm__ ("mov %0, %2 \n\t"
87− "cp.w %1, %2 \n\t"
88− "movgt %0, %1 \n\t"
89− "movgt %1, %2 \n\t"
90− "cp.w %1, %3 \n\t"
91− "movle %1, %3 \n\t"
92− "cp.w %0, %1 \n\t"
93− "movgt %0, %1 \n\t"
94− : "=&r"(m), "+r"(a)
95− : "r"(b), "r"(c));
96− return m;
97−}
98−
99−#endif /* HAVE_INLINE_ASM */
100−
101−#endif /* AVCODEC_AVR32_MATHOPS_H */
libavcodec/mathops.h+0−2
@@ -39,8 +39,6 @@ extern const uint8_t ff_zigzag_scan[16+1]; · 38 unmodified lines
3939
4040 #if ARCH_ARM
4141 # include "arm/mathops.h"
42−#elif ARCH_AVR32
43−# include "avr32/mathops.h"
4442 #elif ARCH_MIPS
4543 # include "mips/mathops.h"
4644 #elif ARCH_PPC

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t