Browse Source

+ introduced the asmmodes_x86_intel constant set

git-svn-id: trunk@42209 -
nickysn 6 years ago
parent
commit
ce8ec3ab5d
2 changed files with 9 additions and 2 deletions
  1. 7 0
      compiler/systems.pas
  2. 2 2
      compiler/x86/rax86.pas

+ 7 - 0
compiler/systems.pas

@@ -430,6 +430,13 @@ interface
          (name: 'RISCVHF'; supported:{$if defined(riscv32) or defined(riscv64)}true{$else}false{$endif})
        );
 
+       { x86 asm modes with an Intel-style syntax }
+       asmmodes_x86_intel = [
+         asmmode_i8086_intel,
+         asmmode_i386_intel,
+         asmmode_x86_64_intel
+       ];
+
     var
        targetinfos   : array[tsystem] of psysteminfo;
        arinfos       : array[tar] of parinfo;

+ 2 - 2
compiler/x86/rax86.pas

@@ -258,7 +258,7 @@ begin
         begin
           if (getsupreg(opr.ref.base)=RS_EBP) and (opr.ref.offset>0) then
             begin
-              if current_settings.asmmode in [asmmode_i8086_intel,asmmode_i386_intel,asmmode_x86_64_intel] then
+              if current_settings.asmmode in asmmodes_x86_intel then
                 begin
                   case getsubreg(opr.ref.base) of
                     R_SUBW:
@@ -291,7 +291,7 @@ begin
             end
           else if (getsupreg(opr.ref.base)=RS_EBP) and (opr.ref.offset<0) then
             begin
-              if current_settings.asmmode in [asmmode_i8086_intel,asmmode_i386_intel,asmmode_x86_64_intel] then
+              if current_settings.asmmode in asmmodes_x86_intel then
                 begin
                   case getsubreg(opr.ref.base) of
                     R_SUBW: