* disabled "[reg].offset globalvar" pic syntax in intel assembler mode for

x86-64, because it does not specify whether the code should be got-based
    or not

git-svn-id: trunk@22242 -
This commit is contained in:
Jonas Maebe 2012-08-25 15:12:44 +00:00
parent 289486346b
commit 2c43e084f0

View File

@ -1626,6 +1626,14 @@ Unit Rax86int;
begin
case oper.opr.typ of
OPR_REFERENCE :
{$ifndef x86_64}
{ this is for the i386 scenario where you have
<load got into ebx>
mov eax, [ebx].offset globalvar
x86-64 uses RIP-based addresses (both for GOT and non-GOT
relative accesses)
}
if (actasmtoken=AS_OFFSET) and
(cs_create_pic in current_settings.moduleswitches) then
begin
@ -1634,6 +1642,7 @@ Unit Rax86int;
BuildOperand(oper,false);
end
else
{$endif x86_64}
inc(oper.opr.ref.offset,BuildRefConstExpression);
OPR_LOCAL :
inc(oper.opr.localsymofs,BuildConstExpression);