cas instruction was encoded wrong
authorceriel <none@none>
Mon, 11 Jan 1988 13:25:28 +0000 (13:25 +0000)
committerceriel <none@none>
Mon, 11 Jan 1988 13:25:28 +0000 (13:25 +0000)
mach/m68020/as/mach4.c
mach/m68020/as/mach5.c

index 400f5e7..112b21f 100644 (file)
@@ -195,7 +195,7 @@ instruction
                        {       T_EMIT2(03300 | $2, 0, 0, 0);}
        |       CAS sizedef DREG ',' DREG ',' ea
                        {       T_EMIT2(04300 | (($2+0100)<<3) | mrg_2,0,0,0);
-                               T_EMIT2($5 | ($3<<6),0,0,0);
+                               T_EMIT2($3 | ($5<<6),0,0,0);
                                ea_2($2, MEM|ALT);
                        }
        |       CAS2 sizedef DREG ':' DREG ',' DREG ':' DREG ','
index 0b4723b..a674624 100644 (file)
@@ -25,7 +25,7 @@ emit_instr()
 {
        register instr_t *ip;
 
-       for (ip=instr; ip<instrp; emit2(ip++->i_word)) {
+       for (ip=instr; ip<instrp; emit2((ip++)->i_word)) {
 #ifdef RELOCATION
                RELOMOVE(relonami, ip->i_relonami);
                if (ip->i_reloinfo)