Sfoglia il codice sorgente

* allow 32-bit operand sizes in the i8086 version of Tx86Operand.SetSize, so
32-bit operands can work properly in i8086's inline asm. Fixes mantis #29188.

git-svn-id: trunk@32866 -

nickysn 9 anni fa
parent
commit
21c9712ea2
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      compiler/x86/rax86.pas

+ 7 - 1
compiler/x86/rax86.pas

@@ -197,7 +197,13 @@ begin
     32: size := OS_M256;
   end;
 
-  opsize:=TCGSize2Opsize[size];
+{$ifdef i8086}
+  { allows e.g. using 32-bit registers in i8086 inline asm }
+  if size in [OS_32,OS_S32] then
+    opsize:=S_L
+  else
+{$endif i8086}
+    opsize:=TCGSize2Opsize[size];
 end;