summaryrefslogtreecommitdiff
path: root/x86/x86_stub.S
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-03-25 21:02:06 +0100
committerDavid Guillen Fandos2021-03-26 23:13:26 +0100
commita494a3f00ee3bd35ee9ab76f8cd4f164da080113 (patch)
tree8d8002c0aa696e8feac09afcd9b3ce8247507ef4 /x86/x86_stub.S
parent53cc4a2475ebc8cc510dc97fe8db95939230cee9 (diff)
downloadpicogpsp-a494a3f00ee3bd35ee9ab76f8cd4f164da080113.tar.gz
picogpsp-a494a3f00ee3bd35ee9ab76f8cd4f164da080113.tar.bz2
picogpsp-a494a3f00ee3bd35ee9ab76f8cd4f164da080113.zip
Move OAM update flag to a register
Fix a small bug in MIPS dynarec that affects non -G0 targets
Diffstat (limited to 'x86/x86_stub.S')
-rw-r--r--x86/x86_stub.S9
1 files changed, 4 insertions, 5 deletions
diff --git a/x86/x86_stub.S b/x86/x86_stub.S
index 9dd3fdd..948572c 100644
--- a/x86/x86_stub.S
+++ b/x86/x86_stub.S
@@ -28,7 +28,6 @@ _##symbol:
#ifndef _WIN32
# External symbols (data + functions)
-#define _oam_update oam_update
#define _iwram iwram
#define _ewram ewram
#define _vram vram
@@ -50,7 +49,6 @@ _##symbol:
#define _execute_store_cpsr_body execute_store_cpsr_body
#endif
-.global _oam_update
.global _iwram
.global _ewram
.global _vram
@@ -75,6 +73,7 @@ _##symbol:
.equ CPU_HALT_STATE, (30 * 4)
.equ CHANGED_PC_STATUS, (31 * 4)
.equ COMPLETED_FRAME, (32 * 4)
+.equ OAM_UPDATED, (33 * 4)
# destroys ecx and edx
@@ -241,7 +240,7 @@ ext_store_vram8b:
ret
ext_store_oam8:
- movl $1, _oam_update # flag OAM update
+ movl $1, OAM_UPDATED(%ebx) # flag OAM update
and $0x3FE, %eax # wrap around address and align to 16bits
mov %dl, %dh # copy lower 8bits of value into full 16bits
mov %dx, _oam_ram(%eax) # perform 16bit store
@@ -332,7 +331,7 @@ ext_store_vram16b:
ret
ext_store_oam16:
- movl $1, _oam_update # flag OAM update
+ movl $1, OAM_UPDATED(%ebx) # flag OAM update
and $0x3FF, %eax # wrap around address
mov %dx, _oam_ram(%eax) # perform 16bit store
ret
@@ -410,7 +409,7 @@ ext_store_vram32b:
ret
ext_store_oam32:
- movl $1, _oam_update # flag OAM update
+ movl $1, OAM_UPDATED(%ebx) # flag OAM update
and $0x3FF, %eax # wrap around address
mov %edx, _oam_ram(%eax) # perform 32bit store
ret