瀏覽代碼

* for rip_relative if cs_create_pic is selected

git-svn-id: trunk@14392 -
pierre 15 年之前
父節點
當前提交
dbf2be812a
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      compiler/x86/cgx86.pas

+ 4 - 1
compiler/x86/cgx86.pas

@@ -933,7 +933,10 @@ unit cgx86;
                           a_op_const_reg(list,OP_ADD,OS_ADDR,offset,r);
                       end
 {$ifdef x86_64}
-                    else if (target_info.system in (system_all_windows+[system_x86_64_darwin])) then
+                    else if (target_info.system in (system_all_windows+[system_x86_64_darwin])) 
+			 or ((target_info.system = system_x86_64_solaris) and
+                             (cs_create_pic in current_settings.moduleswitches))
+			 then
                       begin
                         { Win64 and Darwin/x86_64 always require RIP-relative addressing }
                         tmpref:=ref;