Browse Source

* support far classrefdef targets on i8086 in thlcgcpu.a_loadaddr_ref_reg. This
fixes code generation for loadvmtaddr nodes in i8086 far data memory models
after r31064.

git-svn-id: trunk@31326 -

nickysn 10 years ago
parent
commit
41203a9152
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/i8086/hlcgcpu.pas

+ 2 - 1
compiler/i8086/hlcgcpu.pas

@@ -353,7 +353,8 @@ implementation
       cg.a_loadaddr_ref_reg(list, tmpref, r);
       cg.a_loadaddr_ref_reg(list, tmpref, r);
 
 
       { step 2: if destination is a far pointer, we have to pass a segment as well }
       { step 2: if destination is a far pointer, we have to pass a segment as well }
-      if is_farpointer(tosize) or is_hugepointer(tosize) or is_farprocvar(tosize) then
+      if is_farpointer(tosize) or is_hugepointer(tosize) or is_farprocvar(tosize) or
+         ((tosize.typ=classrefdef) and (tosize.size=4)) then
         begin
         begin
           { if a segment register is specified in ref, we use that }
           { if a segment register is specified in ref, we use that }
           if ref.segment<>NR_NO then
           if ref.segment<>NR_NO then