From a8944f36ec3774e4a349ef504d43b86ba653178a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Mon, 27 Dec 2021 13:38:44 +0100 Subject: [PATCH] remove aarch64-specific logic, it has been moved to its own branch, "aarch64" --- build.sh | 6 +----- src/devices/ppu.c | 1 - src/devices/ppu_aarch64.c | 37 ------------------------------------- 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 src/devices/ppu_aarch64.c diff --git a/build.sh b/build.sh index ec3b5eb..67b4a11 100755 --- a/build.sh +++ b/build.sh @@ -38,7 +38,6 @@ MSYS_NT*|MINGW*) # MSYS2 on Windows else UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)" fi - sed -i -e '/^#pragma weak /d' src/devices/ppu.c ;; Darwin) # macOS CFLAGS="${CFLAGS} -Wno-typedef-redefinition" @@ -57,14 +56,11 @@ then else CFLAGS="${CFLAGS} -DNDEBUG -Os -g0 -s" CORE='src/uxn-fast.c' - ARCH=`${CC} -dumpmachine 2> /dev/null || echo nope` - ARCH=${ARCH%%-*} - EXTRA=`find src -name *_${ARCH}.c 2> /dev/null || true` fi echo "Building.." ${CC} ${CFLAGS} src/uxnasm.c -o bin/uxnasm -${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 +${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 ${CC} ${CFLAGS} ${CORE} src/devices/file.c src/uxncli.c -o bin/uxncli if [ -d "$HOME/bin" ] diff --git a/src/devices/ppu.c b/src/devices/ppu.c index 1697c8f..9dae9d9 100644 --- a/src/devices/ppu.c +++ b/src/devices/ppu.c @@ -77,7 +77,6 @@ ppu_clear(Ppu *p, Layer *layer) layer->changed = 1; } -#pragma weak ppu_redraw void ppu_redraw(Ppu *p, Uint32 *screen) { diff --git a/src/devices/ppu_aarch64.c b/src/devices/ppu_aarch64.c deleted file mode 100644 index fb7470e..0000000 --- a/src/devices/ppu_aarch64.c +++ /dev/null @@ -1,37 +0,0 @@ -#ifdef __aarch64__ -#include -#include "ppu.h" - -void -ppu_redraw(Ppu *p, Uint32 *screen) -{ - uint8x16x4_t pal = vld4q_u8((Uint8*)p->palette); - Uint8 *fg = p->fg.pixels; - Uint8 *bg = p->bg.pixels; - int i; - - p->fg.changed = p->bg.changed = 0; - -#ifdef __has_builtin -#if __has_builtin(__builtin_assume) - __builtin_assume(p->width > 0 && p->height > 0); -#endif -#endif - - for(i = 0; i < (p->width * p->height & ~15); i += 16, fg += 16, bg += 16, screen += 16) { - uint8x16_t fg8 = vld1q_u8(fg); - uint8x16_t bg8 = vld1q_u8(bg); - uint8x16_t px8 = vbslq_u8(vceqzq_u8(fg8), bg8, fg8); - uint8x16x4_t px = { - vqtbl1q_u8(pal.val[0], px8), - vqtbl1q_u8(pal.val[1], px8), - vqtbl1q_u8(pal.val[2], px8), - vdupq_n_u8(0xff), - }; - vst4q_u8((uint8_t*)screen, px); - } - - for(; i < p->width * p->height; i++) - screen[i] = p->palette[*fg ? *fg : *bg]; -} -#endif