浏览代码

+ override get_address_type for the i8086 code generator and return near pointer
types, because that's what's needed for the i8086 address calculations in
update_reference_reg_mul (the indexing operation is performed on the offset
only)

git-svn-id: branches/wasm@48161 -

nickysn 4 年之前
父节点
当前提交
a69f7094dd
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      compiler/i8086/n8086mem.pas

+ 7 - 0
compiler/i8086/n8086mem.pas

@@ -48,6 +48,7 @@ interface
        { tx86vecnode doesn't work for i8086, so we inherit tcgvecnode }
        ti8086vecnode = class(tcgvecnode)
         protected
+         function get_address_type: tdef;override;
          function first_arraydef: tnode;override;
          procedure update_reference_reg_mul(maybe_const_reg: tregister; regsize: tdef; l: aint);override;
        end;
@@ -186,6 +187,12 @@ implementation
                              TI8086VECNODE
 *****************************************************************************}
 
+    function ti8086vecnode.get_address_type: tdef;
+      begin
+        tx86pointerdef(cpointerdef).getreusablex86(resultdef,x86pt_near);
+      end;
+
+
     function ti8086vecnode.first_arraydef: tnode;
       var
         arraydef: tcpuarraydef;