diff --git a/mach/i80/libem/rst.s b/mach/i80/libem/rst.s index ca4cce830..714ffbe4e 100644 --- a/mach/i80/libem/rst.s +++ b/mach/i80/libem/rst.s @@ -11,6 +11,10 @@ ! 41 call .floadn4 ! 34 call .fload4 ! 28 call .fstoren2 +! +! Also: +! 48 call .cmps_mag +! 25 call .cmpu_mag .define .rst_init .rst_init: @@ -18,13 +22,14 @@ lxi d, 0x0008 call copy lxi h, .floadn4 - lxi d, 0x0010 call copy lxi h, .fload4 - lxi d, 0x0018 call copy lxi h, .fstoren2 - lxi d, 0x0020 + call copy + lxi h, .cmps_mag + call copy + lxi h, .cmpu_mag jmp copy ! Copies eight bytes from HL to DE. diff --git a/mach/i80/ncg/table b/mach/i80/ncg/table index 0112eba99..aa2b37070 100644 --- a/mach/i80/ncg/table +++ b/mach/i80/ncg/table @@ -1878,7 +1878,11 @@ pat blt with hlreg dereg STACK uses areg gen - Call {label, ".cmps_mag"} + #ifdef USE_I80_RSTS + rst {const1, 5} + #else + Call {label, ".cmps_mag"} + #endif jm {label, $1} pat bgt @@ -1890,7 +1894,11 @@ pat bge with hlreg dereg STACK uses areg gen - Call {label, ".cmpu_mag"} + #ifdef USE_I80_RSTS + rst {const1, 5} + #else + Call {label, ".cmps_mag"} + #endif jp {label, $1} pat ble @@ -1949,62 +1957,68 @@ pat bne jnz {label,$1} pat zlt -with STACK -gen pop psw - ora a - jm {label,$1} -with hl_or_de STACK -gen mov a,%1.1 - ora a - jm {label,$1} + with STACK + gen + pop psw + ora a + jm {label,$1} + with regpair STACK + gen + mov a,%1.1 + ora a + jm {label,$1} pat zle -with hl_or_de STACK -uses areg -gen xra a - add %1.1 - jm {label,$1} - jnz {label,1f} - xra a - add %1.2 - jz {label,$1} - 1: + with regpair STACK + uses areg + gen + mov a, %1.1 + ora a + jm {label, $1} + jnz {label, 1f} + ora %1.2 + jz {label, $1} + 1: pat zeq -with hl_or_de STACK -uses areg -gen mov a,%1.1 - ora %1.2 - jz {label,$1} + with regpair STACK + uses areg + gen + mov a,%1.1 + ora %1.2 + jz {label,$1} pat zne -with hl_or_de STACK -uses areg -gen mov a,%1.1 - ora %1.2 - jnz {label,$1} + with regpair STACK + uses areg + gen + mov a,%1.1 + ora %1.2 + jnz {label,$1} pat zge -with STACK -gen pop psw - ral. - jnc {label,$1} -with hl_or_de STACK -gen mov a,%1.1 - ora a - jp {label,$1} + with STACK + gen + pop psw + ral. + jnc {label,$1} + with regpair STACK + gen + mov a,%1.1 + ora a + jp {label,$1} pat zgt -with hl_or_de STACK -uses areg -gen xra a - add %1.1 - jm {label,1f} - jnz {label,$1} - xra a - add %1.2 - jnz {label,$1} - 1: + with regpair STACK + uses areg + gen + mov a, %1.1 + ora a + jm {label, 1f} + jnz {label, $1} + ora %1.2 + jnz {label, $1} + 1: pat lol zeq with STACK @@ -2027,22 +2041,24 @@ pat lol zne jnz {label,$2} pat ior zeq $1==2 -with hl_or_de hl_or_de STACK -uses areg -gen mov a,%1.1 - ora %1.2 - ora %2.1 - ora %2.2 - jz {label,$2} + with regpair regpair STACK + uses areg + gen + mov a,%1.1 + ora %1.2 + ora %2.1 + ora %2.2 + jz {label,$2} pat ior zne $1==2 -with hl_or_de hl_or_de STACK -uses areg -gen mov a,%1.1 - ora %1.2 - ora %2.1 - ora %2.2 - jnz {label,$2} + with regpair regpair STACK + uses areg + gen + mov a,%1.1 + ora %1.2 + ora %2.1 + ora %2.2 + jnz {label,$2} /*********************************************/ /* Group 14: Procedure call instructions */ diff --git a/mach/i80/top/table b/mach/i80/top/table index 9ff98a330..c1f8c2156 100644 --- a/mach/i80/top/table +++ b/mach/i80/top/table @@ -16,4 +16,7 @@ xchg : inx d : xchg -> inx h ; cpi 0 -> ora a ; call X : ret -> jmp X ; +push h : lxi h, X : pop d -> lxi d, X : xchg ; +push d : lxi d, X : pop h -> lxi h, X : xchg ; + %%;