diff options
author | Bad Diode <bd@badd10de.dev> | 2021-09-10 15:26:59 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-09-10 15:26:59 +0200 |
commit | ea02a49f9aa46a77aaef74f0d1c743332593b217 (patch) | |
tree | 0262c687ce4aea53863d7d0c7068b93e53faede7 /Makefile | |
parent | a1bc2913625b45c6ac28b856b8ee2051489479b7 (diff) | |
download | uxnrpi-ea02a49f9aa46a77aaef74f0d1c743332593b217.tar.gz uxnrpi-ea02a49f9aa46a77aaef74f0d1c743332593b217.zip |
Force non inline of 16 bit memory poking functions
On the Raspberry Pi 4, the compiler was inlining mempoke16 and doing
some other optimizations on it, which I presume break the memory
alignment requirements on aarch64. By adding __attribute__ ((noinline))
to the uxn functions that deal with 16 bit operations, we can turn back
-O2 compiler optimizations and the code works properly again on
hardware.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -23,7 +23,7 @@ OBJ_START = $(BUILD_DIR)/start.o | |||
23 | OBJ_MAIN = $(BUILD_DIR)/main.o | 23 | OBJ_MAIN = $(BUILD_DIR)/main.o |
24 | SRC_LINK = $(SRC_DIR)/linker.ld | 24 | SRC_LINK = $(SRC_DIR)/linker.ld |
25 | 25 | ||
26 | CFLAGS := -Wall -ffreestanding -O1 -nostdlib -lgcc -mgeneral-regs-only -fstack-protector | 26 | CFLAGS := -Wall -ffreestanding -O2 -nostdlib -lgcc -mgeneral-regs-only -fstack-protector |
27 | CFLAGS += -DRPI_VERSION=$(RPI_VERSION) | 27 | CFLAGS += -DRPI_VERSION=$(RPI_VERSION) |
28 | AFLAGS := | 28 | AFLAGS := |
29 | LDFLAGS := | 29 | LDFLAGS := |