Selaa lähdekoodia

* 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 vuotta sitten
vanhempi
commit
41203a9152
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  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);
 
       { 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
           { if a segment register is specified in ref, we use that }
           if ref.segment<>NR_NO then