Browse code

remove aarch64-specific logic, it has been moved to its own branch, "aarch64"

Sigrid Solveig Haflínudóttir authored on 27/12/2021 12:38:44
Showing 3 changed files
... ...
@@ -38,7 +38,6 @@ MSYS_NT*|MINGW*) # MSYS2 on Windows
38 38
 	else
39 39
 		UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)"
40 40
 	fi
41
-	sed -i -e '/^#pragma weak /d' src/devices/ppu.c
42 41
 	;;
43 42
 Darwin) # macOS
44 43
 	CFLAGS="${CFLAGS} -Wno-typedef-redefinition"
... ...
@@ -57,14 +56,11 @@ then
57 56
 else
58 57
 	CFLAGS="${CFLAGS} -DNDEBUG -Os -g0 -s"
59 58
 	CORE='src/uxn-fast.c'
60
-	ARCH=`${CC} -dumpmachine 2> /dev/null || echo nope`
61
-	ARCH=${ARCH%%-*}
62
-	EXTRA=`find src -name *_${ARCH}.c 2> /dev/null || true`
63 59
 fi
64 60
 
65 61
 echo "Building.."
66 62
 ${CC} ${CFLAGS} src/uxnasm.c -o bin/uxnasm
67
-${CC} ${CFLAGS} ${CORE} src/devices/file.c src/devices/mouse.c src/devices/ppu.c src/devices/apu.c src/uxnemu.c ${EXTRA} ${UXNEMU_LDFLAGS} -o bin/uxnemu
63
+${CC} ${CFLAGS} ${CORE} src/devices/file.c src/devices/mouse.c src/devices/ppu.c src/devices/apu.c src/uxnemu.c ${UXNEMU_LDFLAGS} -o bin/uxnemu
68 64
 ${CC} ${CFLAGS} ${CORE} src/devices/file.c src/uxncli.c -o bin/uxncli
69 65
 
70 66
 if [ -d "$HOME/bin" ]
... ...
@@ -77,7 +77,6 @@ ppu_clear(Ppu *p, Layer *layer)
77 77
 	layer->changed = 1;
78 78
 }
79 79
 
80
-#pragma weak ppu_redraw
81 80
 void
82 81
 ppu_redraw(Ppu *p, Uint32 *screen)
83 82
 {
84 83
deleted file mode 100644
... ...
@@ -1,37 +0,0 @@
1
-#ifdef __aarch64__
2
-#include <arm_neon.h>
3
-#include "ppu.h"
4
-
5
-void
6
-ppu_redraw(Ppu *p, Uint32 *screen)
7
-{
8
-	uint8x16x4_t pal = vld4q_u8((Uint8*)p->palette);
9
-	Uint8 *fg = p->fg.pixels;
10
-	Uint8 *bg = p->bg.pixels;
11
-	int i;
12
-
13
-	p->fg.changed = p->bg.changed = 0;
14
-
15
-#ifdef __has_builtin
16
-#if __has_builtin(__builtin_assume)
17
-	__builtin_assume(p->width > 0 && p->height > 0);
18
-#endif
19
-#endif
20
-
21
-	for(i = 0; i < (p->width * p->height & ~15); i += 16, fg += 16, bg += 16, screen += 16) {
22
-		uint8x16_t fg8 = vld1q_u8(fg);
23
-		uint8x16_t bg8 = vld1q_u8(bg);
24
-		uint8x16_t px8 = vbslq_u8(vceqzq_u8(fg8), bg8, fg8);
25
-		uint8x16x4_t px = {
26
-			vqtbl1q_u8(pal.val[0], px8),
27
-			vqtbl1q_u8(pal.val[1], px8),
28
-			vqtbl1q_u8(pal.val[2], px8),
29
-			vdupq_n_u8(0xff),
30
-		};
31
-		vst4q_u8((uint8_t*)screen, px);
32
-	}
33
-
34
-	for(; i < p->width * p->height; i++)
35
-		screen[i] = p->palette[*fg ? *fg : *bg];
36
-}
37
-#endif