gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 3f8d09a6d9168b066516a6ee25c66cc7835b5e9b parent 720a871d81e1fde952c10543677cb3f0cbca6246 Author: Toxa <untoxa@mail.ru> Date: Wed, 29 Sep 2021 00:44:41 +0300 minor macro optimization Diffstat:
| M | gbdk-lib/libc/targets/gbz80/gb/global.s | 7 | +++---- |
| M | gbdk-lib/libc/targets/z80/gg/global.s | 7 | +++---- |
| M | gbdk-lib/libc/targets/z80/sms/global.s | 7 | +++---- |
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/gbdk-lib/libc/targets/gbz80/gb/global.s b/gbdk-lib/libc/targets/gbz80/gb/global.s @@ -491,7 +491,7 @@ lbl: SIGNED_ADD_A_REG16 regH, regL .endm -.macro MUL_DE_BY_A_RET_HL ?lbl1 ?lbl2 ?lbl3 +.macro MUL_DE_BY_A_RET_HL ?lbl1 ?lbl2 ; Multiply DE by A, return result in HL; preserves: BC LD HL, #0 lbl1: @@ -499,10 +499,9 @@ lbl1: JR NC, lbl2 ADD HL, DE lbl2: - JR Z, lbl3 SLA E RL D - JR lbl1 -lbl3: + OR A + JR NZ, lbl1 .endm diff --git a/gbdk-lib/libc/targets/z80/gg/global.s b/gbdk-lib/libc/targets/z80/gg/global.s @@ -307,7 +307,7 @@ lbl: ld regH, a .endm -.macro MUL_DE_BY_A_RET_HL ?lbl1 ?lbl2 ?lbl3 +.macro MUL_DE_BY_A_RET_HL ?lbl1 ?lbl2 ; Multiply DE by A, return result in HL; preserves: BC ld hl, #0 lbl1: @@ -315,11 +315,10 @@ lbl1: jp nc, lbl2 add hl, de lbl2: - jp z, lbl3 sla e rl d - jp lbl1 -lbl3: + or a + jp nz, lbl1 .endm .macro DIV_PART divident divisor ?lbl diff --git a/gbdk-lib/libc/targets/z80/sms/global.s b/gbdk-lib/libc/targets/z80/sms/global.s @@ -271,7 +271,7 @@ lbl: ld regH, a .endm -.macro MUL_DE_BY_A_RET_HL ?lbl1 ?lbl2 ?lbl3 +.macro MUL_DE_BY_A_RET_HL ?lbl1 ?lbl2 ; Multiply DE by A, return result in HL; preserves: BC ld hl, #0 lbl1: @@ -279,11 +279,10 @@ lbl1: jp nc, lbl2 add hl, de lbl2: - jp z, lbl3 sla e rl d - jp lbl1 -lbl3: + or a + jp nz, lbl1 .endm .macro DIV_PART divident divisor ?lbl
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.