From dbf2be812acd2efcc29929e1195239aabcc4249b Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 10 Dec 2009 13:38:34 +0000 Subject: [PATCH] * for rip_relative if cs_create_pic is selected git-svn-id: trunk@14392 - --- compiler/x86/cgx86.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/x86/cgx86.pas b/compiler/x86/cgx86.pas index 865a7be645..e257d37b2a 100644 --- a/compiler/x86/cgx86.pas +++ b/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;