Browse Source

* also check for 386+ when emitting a reference with a fs: or gs: prefix

git-svn-id: trunk@32926 -
nickysn 9 years ago
parent
commit
d4c21cf13a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/x86/aasmcpu.pas

+ 5 - 0
compiler/x86/aasmcpu.pas

@@ -1611,6 +1611,11 @@ implementation
         { Segment override }
         if (segprefix>=NR_ES) and (segprefix<=NR_GS) then
          begin
+{$ifdef i8086}
+           if (current_settings.cputype<cpu_386) and
+              ((segprefix=NR_FS) or (segprefix=NR_GS)) then
+             Message(asmw_e_instruction_not_supported_by_cpu);
+{$endif i8086}
            objdata.writebytes(segprefixes[segprefix],1);
            { fix the offset for GenNode }
            inc(InsOffset);