From: notaz Date: Sun, 8 Sep 2013 16:03:53 +0000 (+0300) Subject: drz80: don't use swp X-Git-Tag: v1.90~15 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b5b525059353b232ae1f982827a65fda8649bb;p=picodrive.git drz80: don't use swp swp is not available and sometimes emulated on newer ARMs on older ARMs it does some bus locking that we don't need --- diff --git a/cpu/DrZ80/drz80.s b/cpu/DrZ80/drz80.s index ff2a6b8b..b92b2c2d 100644 --- a/cpu/DrZ80/drz80.s +++ b/cpu/DrZ80/drz80.s @@ -4294,10 +4294,12 @@ opcode_0_7: fetch 4 ;@EX AF,AF' opcode_0_8: - add r1,cpucontext,#z80a2 - swp z80a,z80a,[r1] - add r1,cpucontext,#z80f2 - swp z80f,z80f,[r1] + ldr r0,[cpucontext,#z80a2] + ldr r1,[cpucontext,#z80f2] + str z80a,[cpucontext,#z80a2] + str z80f,[cpucontext,#z80f2] + mov z80a,r0 + mov z80f,r1 fetch 4 ;@ADD HL,BC opcode_0_9: @@ -5336,12 +5338,15 @@ opcode_D_8: fetch 5 ;@EXX opcode_D_9: - add r1,cpucontext,#z80bc2 - swp z80bc,z80bc,[r1] - add r1,cpucontext,#z80de2 - swp z80de,z80de,[r1] - add r1,cpucontext,#z80hl2 - swp z80hl,z80hl,[r1] + ldr r0,[cpucontext,#z80bc2] + ldr r1,[cpucontext,#z80de2] + ldr r2,[cpucontext,#z80hl2] + str z80bc,[cpucontext,#z80bc2] + str z80de,[cpucontext,#z80de2] + str z80hl,[cpucontext,#z80hl2] + mov z80bc,r0 + mov z80de,r1 + mov z80hl,r2 fetch 4 ;@JP C,$+3 opcode_D_A: