From 00c4a00675642c16a34f97e5ccd8798bd98d1118 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 7 Jul 1989 15:11:35 +0000 Subject: [PATCH] replaced some db.. instructions; they are wrong if the count register contains a count > 65535 --- mach/sun3/ce/EM_table | 54 +++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/mach/sun3/ce/EM_table b/mach/sun3/ce/EM_table index 695be7171..05ad6cdfb 100644 --- a/mach/sun3/ce/EM_table +++ b/mach/sun3/ce/EM_table @@ -56,11 +56,12 @@ C_loi "move.l (4,a0),-(sp)"; "move.l (a0), -(sp)". $1 % 4 == 0 ==> "move.l (sp)+, a0"; - "move.l #$1/4-1, d0"; + "move.l #$1/4, d0"; "add.l #$1, a0"; "1:"; "move.l -(a0), -(sp)"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". default ==> arg_error( "loi", $1). @@ -106,9 +107,10 @@ C_sti $1 == 4 ==> "move.l (sp)+, a0"; "move.l (sp)+, (a0)". $1 % 4 == 0 ==> "move.l (sp)+, a0"; - "move.l #$1/4-1, d0"; + "move.l #$1/4, d0"; "1:move.l (sp)+, (a0)+"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". default ==> arg_error( "sti", (arith) $1). @@ -310,10 +312,11 @@ C_zer $1 == 4 ==> "clr.l -(sp)". $1 == 8 ==> "clr.l -(sp)"; "clr.l -(sp)". - default ==> "move.l #$1/4-1, d0"; + default ==> "move.l #$1/4, d0"; "1:"; "clr.l -(sp)"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". /******************************************************************************/ /* */ @@ -360,42 +363,46 @@ C_cuf ==> "jsr (cuf)". C_and $1 == 4 ==> "move.l (sp)+, d0"; "and.l d0, (sp)". - default ==> "move.l #$1/4-1, d0"; + default ==> "move.l #$1/4, d0"; "lea ($1, sp), a0"; "1:"; "move.l (sp)+, d1"; "and.l d1, (a0)+"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". C_ior $1 == 4 ==> "move.l (sp)+, d0"; "or.l d0, (sp)". - default ==> "move.l #$1/4-1, d0"; + default ==> "move.l #$1/4, d0"; "lea ($1, sp), a0"; "1:"; "move.l (sp)+, d1"; "or.l d1, (a0)+"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". C_xor $1 == 4 ==> "move.l (sp)+, d0"; "eor.l d0, (sp)". - default ==> "move.l #$1/4-1, d0"; + default ==> "move.l #$1/4, d0"; "lea ($1, sp), a0"; "1:"; "move.l (sp)+, d1"; "eor.l d1, (a0)+"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". C_com $1 == 4 ==> "not.l (sp)". $1 == 8 ==> "not.l (sp)"; "not.l (4, sp)". - default ==> "move.l #$1/4-1, d0"; + default ==> "move.l #$1/4, d0"; "move.l sp, a0"; "1:"; "not.l (a0)+"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". C_rol $1 == 4 ==> "move.l (sp)+, d0"; @@ -673,20 +680,22 @@ C_blm "move.l (4, a1), (4, a0)". default ==> "move.l (sp)+, a0"; "move.l (sp)+, a1"; - "move.l #$1/4-1, d0"; + "move.l #$1/4, d0"; "1:"; "move.l (a1)+, (a0)+"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". C_bls $1 == 4 ==> "move.l (sp)+, d0"; "move.l (sp)+, a0"; "move.l (sp)+, a1"; - "asr.l #2, d1"; + "asr.l #2, d0"; "beq 2f"; "1:"; "move.l (a1)+, (a0)+"; - "dbf d0, 1b"; + "sub.l #1, d0"; + "bne 1b"; "2:". default ==> arg_error( "bls", $1). @@ -709,20 +718,21 @@ C_dup $1 == 4 ==> "move.l (sp), -(sp)". $1 == 8 ==> "move.l (4, sp), -(sp)"; "move.l (4, sp), -(sp)". - default ==> "move.l #$1/4-1, d0"; + default ==> "move.l #$1/4, d0"; "1:"; "move.l ($1-4, sp), -(sp)"; - "dbf d0, 1b". + "sub.l #1, d0"; + "bne 1b". C_dus $1 == 4 ==> "move.l (sp)+, d0"; "lea (0, sp, d0.l*1), a0"; "asr.l #2, d0"; "beq 2f"; - "sub.l #1, d0"; "1:"; "move.l -(a0), -(sp)"; - "dbf d0, 1b"; + "sub.l #1, d0"; + "bne 1b"; "2:". default ==> arg_error( "dus", $1). -- 2.34.1