From 4c8596ee056eb6ebfe5af58ce28c50d59eedc470 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 25 Sep 1990 14:59:28 +0000 Subject: [PATCH] Fix: cmp.l A,A is not the same as tst.l A --- mach/m68020/top/table | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mach/m68020/top/table b/mach/m68020/top/table index 4bfce5149..961c4b1b2 100644 --- a/mach/m68020/top/table +++ b/mach/m68020/top/table @@ -79,11 +79,16 @@ move.w DREG,DREG2 : NO32 A,DREG2 : move.w DREG2,DREG move.l DREG,DREG2 : ANY A,DREG2 : move.l DREG2,DREG {no_part(DREG2,A)} -> ANY A,DREG : move.l DREG,DREG2 ; -/* change some compares to tests */ -cmp.w A,A -> tst.w A ; -cmp.l A,A -> tst.l A ; -cmp.b A,A -> tst.b A ; +cmp.b A,A : beq LAB -> bra LAB ; +cmp.w A,A : beq LAB -> bra LAB ; +cmp.l A,A : beq LAB -> bra LAB ; + +/* cannot delete cmp's because they affect condition codes (obvious, but ... )*/ +cmp.b A,A : bne LAB -> cmp.b A,A ; +cmp.w A,A : bne LAB -> cmp.w A,A ; +cmp.l A,A : bne LAB -> cmp.l A,A ; +/* change some compares to tests */ cmp.w #0,D : beq LAB -> tst.w D : beq LAB ; cmp.w #0,D : bne LAB -> tst.w D : bne LAB ; cmp.w #0,D : blt LAB -> tst.w D : blt LAB ; -- 2.34.1