Browse Source

* in tcgx86.make_simple_ref, on the i8086, emit 'mov es, reg', instead of
'push reg/pop es', since that is a lot faster on 8088..80386

git-svn-id: trunk@25700 -

nickysn 12 years ago
parent
commit
67fdcb02f2
1 changed files with 1 additions and 2 deletions
  1. 1 2
      compiler/x86/cgx86.pas

+ 1 - 2
compiler/x86/cgx86.pas

@@ -610,8 +610,7 @@ unit cgx86;
         { if there is a segment in an int register, move it to ES }
         if (ref.segment<>NR_NO) and (not is_segment_reg(ref.segment)) then
           begin
-            list.concat(taicpu.op_reg(A_PUSH,S_W,ref.segment));
-            list.concat(taicpu.op_reg(A_POP,S_W,NR_ES));
+            list.concat(taicpu.op_reg_reg(A_MOV,S_W,ref.segment,NR_ES));
             ref.segment:=NR_ES;
           end;
 {$endif}