GCC's LTO is getting clever.

Fixed defines in gfx.h.
This commit is contained in:
profi200 2020-05-11 15:18:38 +02:00
parent d695e67a80
commit 7222e77e8c
No known key found for this signature in database
GPG Key ID: 17B42AE5911139F3
2 changed files with 6 additions and 4 deletions

View File

@ -197,7 +197,7 @@ static inline void __wfi(void)
static inline u32 __getCpsr(void)
{
u32 cpsr;
__asm__("mrs %0, cpsr" : "=r" (cpsr) : );
__asm__ volatile("mrs %0, cpsr" : "=r" (cpsr) : );
return cpsr;
}

View File

@ -32,10 +32,12 @@
#define SCREEN_HEIGHT_BOT (240u)
#define SCREEN_SIZE_BOT (SCREEN_WIDTH_BOT * SCREEN_HEIGHT_BOT * 2)
// TODO:
// Because we are using a VRAM allocator this may break any time.
#define FRAMEBUF_TOP_A_1 ((void*)VRAM_BASE)
#define FRAMEBUF_BOT_A_1 ((void*)FRAMEBUF_TOP_A_1 + SCREEN_SIZE_TOP)
#define FRAMEBUF_TOP_A_2 ((void*)VRAM_BASE + 0x100000)
#define FRAMEBUF_BOT_A_2 ((void*)FRAMEBUF_TOP_A_2 + SCREEN_SIZE_TOP)
#define FRAMEBUF_BOT_A_1 (FRAMEBUF_TOP_A_1 + SCREEN_SIZE_TOP)
#define FRAMEBUF_TOP_A_2 (FRAMEBUF_BOT_A_1 + SCREEN_SIZE_BOT + SCREEN_SIZE_TOP) // Skip B1
#define FRAMEBUF_BOT_A_2 (FRAMEBUF_TOP_A_2 + SCREEN_SIZE_TOP)
#define RENDERBUF_TOP ((void*)VRAM_BASE + 0x200000 - SCREEN_SIZE_TOP - SCREEN_SIZE_BOT)
#define RENDERBUF_BOT ((void*)VRAM_BASE + 0x200000 - SCREEN_SIZE_BOT)