Commit 5d907c2
committed
rjpeg: detect __ARM_NEON in addition to __ARM_NEON__
Modern aarch64-linux-gnu-gcc defines __ARM_NEON (no trailing
underscore) but not __ARM_NEON__. rjpeg's auto-detect at line 189
tested __ARM_NEON__ only, so modern aarch64 builds silently ran
the scalar kernel unless the user passed -D__ARM_NEON__ or
-DHAVE_NEON explicitly.
rpng at libretro-common/formats/png/rpng.c:38 already accepts both
spellings:
#elif defined(__ARM_NEON) || defined(__ARM_NEON__)
Match that. One real change (add `defined(__ARM_NEON) ||`);
the #if is split across two lines because the condition grew long.
Verified on an aarch64 cross-compile with no explicit
-D__ARM_NEON__: with the fix, rjpeg now selects its NEON kernels
automatically. Reproduced the old behaviour (scalar fallback) by
temporarily reverting this one-line change and confirming that
sabotaging NEON kernels has no effect on test output -- the NEON
code was unreachable. With the fix, the same sabotage correctly
causes test failures, proving the NEON kernels are now entered
from `__ARM_NEON` alone.1 parent 4c5f3c3 commit 5d907c2
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
0 commit comments