mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 10:49:33 +01:00
+ pic code reading for the assembler readers
* loadaddr generates pic code as well now
This commit is contained in:
parent
31ebe33949
commit
0811184277
@ -659,9 +659,23 @@ unit cgx86;
|
||||
begin
|
||||
if assigned(ref.symbol) then
|
||||
begin
|
||||
tmpref:=ref;
|
||||
tmpref.refaddr:=ADDR_FULL;
|
||||
list.concat(Taicpu.op_ref_reg(A_MOV,tcgsize2opsize[OS_ADDR],tmpref,r));
|
||||
if cs_create_pic in aktmoduleswitches then
|
||||
begin
|
||||
{$ifdef x86_64}
|
||||
reference_reset_symbol(tmpref,ref.symbol,0);
|
||||
tmpref.refaddr:=addr_pic;
|
||||
tmpref.base:=NR_RIP;
|
||||
list.concat(taicpu.op_ref_reg(A_MOV,S_Q,tmpref,r));
|
||||
{$else x86_64}
|
||||
internalerror(2005042501);
|
||||
{$endif x86_64}
|
||||
end
|
||||
else
|
||||
begin
|
||||
tmpref:=ref;
|
||||
tmpref.refaddr:=ADDR_FULL;
|
||||
list.concat(Taicpu.op_ref_reg(A_MOV,tcgsize2opsize[OS_ADDR],tmpref,r));
|
||||
end;
|
||||
end
|
||||
else
|
||||
a_load_const_reg(list,OS_ADDR,offset,r);
|
||||
@ -1774,7 +1788,11 @@ unit cgx86;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.147 2005-03-13 17:15:26 florian
|
||||
Revision 1.148 2005-04-25 09:51:07 florian
|
||||
+ pic code reading for the assembler readers
|
||||
* loadaddr generates pic code as well now
|
||||
|
||||
Revision 1.147 2005/03/13 17:15:26 florian
|
||||
+ storing non-extended floats to memory generates now a fwait to get exceptions at the correct place
|
||||
|
||||
Revision 1.146 2005/02/14 17:13:10 peter
|
||||
|
||||
@ -327,6 +327,11 @@ Implementation
|
||||
end;
|
||||
|
||||
|
||||
procedure handleat;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function MaybeBuildReference:boolean;
|
||||
{ Try to create a reference, if not a reference is found then false
|
||||
is returned }
|
||||
@ -369,6 +374,19 @@ Implementation
|
||||
BuildRecordOffsetSize(tempstr,l,k);
|
||||
inc(oper.opr.ref.offset,l);
|
||||
end;
|
||||
if actasmtoken=AS_AT then
|
||||
begin
|
||||
consume(AS_AT);
|
||||
if actasmtoken=AS_ID then
|
||||
begin
|
||||
if actasmpattern='GOTPCREL' then
|
||||
oper.opr.ref.refaddr:=addr_pic
|
||||
else
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
end
|
||||
else
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
end;
|
||||
case actasmtoken of
|
||||
AS_END,
|
||||
AS_SEPARATOR,
|
||||
@ -486,7 +504,23 @@ Implementation
|
||||
begin
|
||||
if oper.SetupVar(expr,false) then
|
||||
begin
|
||||
end
|
||||
if actasmtoken=AS_AT then
|
||||
begin
|
||||
consume(AS_AT);
|
||||
if actasmtoken=AS_ID then
|
||||
begin
|
||||
if actasmpattern='GOTPCREL' then
|
||||
begin
|
||||
oper.opr.ref.refaddr:=addr_pic;
|
||||
consume(AS_ID);
|
||||
end
|
||||
else
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
end
|
||||
else
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
end;
|
||||
end
|
||||
else
|
||||
Begin
|
||||
{ look for special symbols ... }
|
||||
@ -775,7 +809,11 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.10 2005-02-14 17:13:10 peter
|
||||
Revision 1.11 2005-04-25 09:51:07 florian
|
||||
+ pic code reading for the assembler readers
|
||||
* loadaddr generates pic code as well now
|
||||
|
||||
Revision 1.10 2005/02/14 17:13:10 peter
|
||||
* truncate log
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user