Browse code

ppu aarch64: sorry, neauoire

Sigrid Solveig Haflínudóttir authored on 26/12/2021 13:31:24
Showing 1 changed files
... ...
@@ -1,3 +1,4 @@
1
+#ifdef __aarch64__
1 2
 #include <arm_neon.h>
2 3
 #include "ppu.h"
3 4
 
... ...
@@ -11,6 +12,12 @@ ppu_redraw(Ppu *p, Uint32 *screen)
11 12
 
12 13
 	p->fg.changed = p->bg.changed = 0;
13 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
+
14 21
 	for(i = 0; i < (p->width * p->height & ~15); i += 16, fg += 16, bg += 16, screen += 16) {
15 22
 		uint8x16_t fg8 = vld1q_u8(fg);
16 23
 		uint8x16_t bg8 = vld1q_u8(bg);
... ...
@@ -27,3 +34,4 @@ ppu_redraw(Ppu *p, Uint32 *screen)
27 34
 	for(; i < p->width * p->height; i++)
28 35
 		screen[i] = p->palette[*fg ? *fg : *bg];
29 36
 }
37
+#endif