Forráskód Böngészése

* moved the handling of the @Code and @Data inline assembler symbols to new methods Tx86operand.SetupCode and .SetupData

git-svn-id: trunk@32279 -
nickysn 9 éve
szülő
commit
43dabca8ab
2 módosított fájl, 24 hozzáadás és 2 törlés
  1. 16 0
      compiler/x86/rax86.pas
  2. 8 2
      compiler/x86/rax86int.pas

+ 16 - 0
compiler/x86/rax86.pas

@@ -45,6 +45,10 @@ type
     Procedure SetSize(_size:longint;force:boolean);override;
     Procedure SetCorrectSize(opcode:tasmop);override;
     Function CheckOperand: boolean; override;
+    { handles the @Code symbol }
+    Procedure SetupCode;
+    { handles the @Data symbol }
+    Procedure SetupData;
   end;
 
   { Operands are always in AT&T order.
@@ -284,6 +288,18 @@ begin
 end;
 
 
+procedure Tx86Operand.SetupCode;
+begin
+  Message(asmr_w_CODE_and_DATA_not_supported);
+end;
+
+
+procedure Tx86Operand.SetupData;
+begin
+  Message(asmr_w_CODE_and_DATA_not_supported);
+end;
+
+
 {*****************************************************************************
                               T386Instruction
 *****************************************************************************}

+ 8 - 2
compiler/x86/rax86int.pas

@@ -1803,9 +1803,15 @@ Unit Rax86int;
                       Consume(AS_ID);
                     end
                    else
-                    if (actasmpattern = '@CODE') or (actasmpattern = '@DATA') then
+                    if actasmpattern = '@CODE' then
                      begin
-                       Message(asmr_w_CODE_and_DATA_not_supported);
+                       oper.SetupCode;
+                       Consume(AS_ID);
+                     end
+                   else
+                    if actasmpattern = '@DATA' then
+                     begin
+                       oper.SetupData;
                        Consume(AS_ID);
                      end
                    else