Browse Source

+ i8086 fixes in the binary writer for asm codes 0310 and 0311

git-svn-id: trunk@30524 -
nickysn 10 years ago
parent
commit
0aa8e9d829
1 changed files with 16 additions and 12 deletions
  1. 16 12
      compiler/x86/aasmcpu.pas

+ 16 - 12
compiler/x86/aasmcpu.pas

@@ -2266,16 +2266,18 @@ implementation
                 end;
                 end;
               end;
               end;
             200 :
             200 :
-{$ifndef x86_64}
-              inc(len);
-{$else x86_64}
+{$if defined(x86_64)}
               { every insentry with code 0310 must be marked with NOX86_64 }
               { every insentry with code 0310 must be marked with NOX86_64 }
               InternalError(2011051301);
               InternalError(2011051301);
-{$endif x86_64}
+{$elseif defined(i386)}
+              inc(len);
+{$elseif defined(i8086)}
+              {nothing};
+{$endif}
             201 :
             201 :
-{$ifdef x86_64}
+{$if defined(x86_64) or defined(i8086)}
               inc(len)
               inc(len)
-{$endif x86_64}
+{$endif x86_64 or i8086}
               ;
               ;
             212 :
             212 :
               inc(len);
               inc(len);
@@ -2952,22 +2954,24 @@ implementation
 {$endif x86_64}
 {$endif x86_64}
               end;
               end;
             200 :   { fixed 16-bit addr }
             200 :   { fixed 16-bit addr }
-{$ifndef x86_64}
+{$if defined(x86_64)}
+              { every insentry having code 0310 must be marked with NOX86_64 }
+              InternalError(2011051302);
+{$elseif defined(i386)}
               begin
               begin
                 bytes[0]:=$67;
                 bytes[0]:=$67;
                 objdata.writebytes(bytes,1);
                 objdata.writebytes(bytes,1);
               end;
               end;
-{$else x86_64}
-              { every insentry having code 0310 must be marked with NOX86_64 }
-              InternalError(2011051302);
+{$elseif defined(i8086)}
+              {nothing};
 {$endif}
 {$endif}
             201 :   { fixed 32-bit addr }
             201 :   { fixed 32-bit addr }
-{$ifdef x86_64}
+{$if defined(x86_64) or defined(i8086)}
               begin
               begin
                 bytes[0]:=$67;
                 bytes[0]:=$67;
                 objdata.writebytes(bytes,1);
                 objdata.writebytes(bytes,1);
               end
               end
-{$endif x86_64}
+{$endif x86_64 or i8086}
                ;
                ;
             208,209,210 :
             208,209,210 :
               begin
               begin