Browse Source

+ support getting the address of far references on i8086 in
tcgx86.a_loadaddr_ref_reg

git-svn-id: trunk@26932 -

nickysn 11 years ago
parent
commit
229ebf33a8
1 changed files with 7 additions and 0 deletions
  1. 7 0
      compiler/x86/cgx86.pas

+ 7 - 0
compiler/x86/cgx86.pas

@@ -1071,6 +1071,12 @@ unit cgx86;
               end;
               end;
             if segment<>NR_NO then
             if segment<>NR_NO then
               begin
               begin
+{$ifdef i8086}
+                if is_segment_reg(segment) then
+                  list.concat(Taicpu.op_reg_reg(A_MOV,S_W,segment,GetNextReg(r)))
+                else
+                  a_load_reg_reg(list,OS_16,OS_16,segment,GetNextReg(r));
+{$else i8086}
                 if (tf_section_threadvars in target_info.flags) then
                 if (tf_section_threadvars in target_info.flags) then
                   begin
                   begin
                     { Convert thread local address to a process global addres
                     { Convert thread local address to a process global addres
@@ -1091,6 +1097,7 @@ unit cgx86;
                   end
                   end
                 else
                 else
                   cgmessage(cg_e_cant_use_far_pointer_there);
                   cgmessage(cg_e_cant_use_far_pointer_there);
+{$endif i8086}
               end;
               end;
           end;
           end;
       end;
       end;