Browse Source

added a remark about a possible QEMU issue with CMP/CMPI .W and .B on ColdFire

git-svn-id: trunk@27291 -
Károly Balogh 11 years ago
parent
commit
3b9e2a620b
1 changed files with 6 additions and 2 deletions
  1. 6 2
      compiler/m68k/cgcpu.pas

+ 6 - 2
compiler/m68k/cgcpu.pas

@@ -1425,8 +1425,12 @@ unit cgcpu;
           list.concat(taicpu.op_reg(A_TST,TCGSize2OpSize[size],reg))
           list.concat(taicpu.op_reg(A_TST,TCGSize2OpSize[size],reg))
         else 
         else 
           begin
           begin
-            { ColdFire also needs S_L for CMPI }
-            if current_settings.cputype in cpu_coldfire then
+            { ColdFire ISA A also needs S_L for CMPI }
+            { Note: older QEMU pukes from CMPI sizes <> .L even on ISA B/C, but
+              it's actually *LEGAL*, see CFPRM, page 4-30, the bug also seems
+              fixed in recent QEMU, but only when CPU cfv4e is forced, not by
+              default. (KB) }
+            if current_settings.cputype in cpu_coldfire{-[cpu_isa_b,cpu_isa_c]} then
               begin
               begin
                 sign_extend(list, size, reg);
                 sign_extend(list, size, reg);
                 size:=OS_INT;
                 size:=OS_INT;