瀏覽代碼

* use get_default_segment_of_ref() in the seg() handling on i8086

git-svn-id: trunk@37510 -
nickysn 7 年之前
父節點
當前提交
d220d6f2c6
共有 1 個文件被更改,包括 1 次插入7 次删除
  1. 1 7
      compiler/i8086/n8086inl.pas

+ 1 - 7
compiler/i8086/n8086inl.pas

@@ -111,17 +111,11 @@ implementation
              segref.refaddr:=addr_seg;
              cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_16,OS_16,segref,location.register);
            end
-         else if left.location.reference.base=NR_BP then
-           begin
-             location_reset(location,LOC_REGISTER,OS_16);
-             location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_16);
-             current_asmdata.CurrAsmList.concat(Taicpu.op_reg_reg(A_MOV,S_W,NR_SS,location.register));
-           end
          else
            begin
              location_reset(location,LOC_REGISTER,OS_16);
              location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_16);
-             current_asmdata.CurrAsmList.Concat(Taicpu.op_reg_reg(A_MOV,S_W,NR_DS,location.register));
+             current_asmdata.CurrAsmList.concat(Taicpu.op_reg_reg(A_MOV,S_W,get_default_segment_of_ref(left.location.reference),location.register));
            end;
        end;