mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-23 01:51:45 +02:00
Added aitconst_gs for AVR pointer references to Flash.
git-svn-id: trunk@30419 -
This commit is contained in:
parent
a4ddc64e78
commit
e2272c8a7e
@ -133,6 +133,8 @@ interface
|
||||
aitconst_darwin_dwarf_delta32,
|
||||
{ ARM Thumb-2 only }
|
||||
aitconst_half16bit, { used for table jumps. The actual value is the 16bit value shifted left once }
|
||||
{ AVR }
|
||||
aitconst_gs, { Upper 16-bit of 17-bit constant }
|
||||
{ for use by dwarf debugger information }
|
||||
aitconst_16bit_unaligned,
|
||||
aitconst_32bit_unaligned,
|
||||
@ -1680,6 +1682,11 @@ implementation
|
||||
consttype:=aitconst_ptr;
|
||||
end;
|
||||
{$else i8086}
|
||||
{$ifdef avr}
|
||||
if assigned(_sym) and (_sym.typ=AT_FUNCTION) then
|
||||
consttype:=aitconst_gs
|
||||
else
|
||||
{$endif avr}
|
||||
consttype:=aitconst_ptr;
|
||||
{$endif i8086}
|
||||
{ sym is allowed to be nil, this is used to write nil pointers }
|
||||
@ -1784,7 +1791,11 @@ implementation
|
||||
consttype:=aitconst_farptr
|
||||
else
|
||||
{$endif i8086}
|
||||
{$ifdef avr}
|
||||
consttype:=aitconst_gs;
|
||||
{$else avr}
|
||||
consttype:=aitconst_ptr;
|
||||
{$endif avr}
|
||||
sym:=nil;
|
||||
endsym:=nil;
|
||||
symofs:=0;
|
||||
@ -1868,7 +1879,8 @@ implementation
|
||||
result:=LengthUleb128(qword(value));
|
||||
aitconst_sleb128bit :
|
||||
result:=LengthSleb128(value);
|
||||
aitconst_half16bit:
|
||||
aitconst_half16bit,
|
||||
aitconst_gs:
|
||||
result:=2;
|
||||
aitconst_got:
|
||||
result:=sizeof(pint);
|
||||
|
@ -127,7 +127,7 @@ implementation
|
||||
ait_const2str : array[aitconst_128bit..aitconst_64bit_unaligned] of string[20]=(
|
||||
#9'.fixme128'#9,#9'.quad'#9,#9'.long'#9,#9'.short'#9,#9'.byte'#9,
|
||||
#9'.sleb128'#9,#9'.uleb128'#9,
|
||||
#9'.rva'#9,#9'.secrel32'#9,#9'.quad'#9,#9'.long'#9,#9'.short'#9,
|
||||
#9'.rva'#9,#9'.secrel32'#9,#9'.quad'#9,#9'.long'#9,#9'.short'#9,#9'.short'#9,
|
||||
#9'.short'#9,#9'.long'#9,#9'.quad'#9
|
||||
);
|
||||
|
||||
@ -919,6 +919,7 @@ implementation
|
||||
aitconst_darwin_dwarf_delta32,
|
||||
aitconst_darwin_dwarf_delta64,
|
||||
aitconst_half16bit,
|
||||
aitconst_gs,
|
||||
aitconst_16bit_unaligned,
|
||||
aitconst_32bit_unaligned,
|
||||
aitconst_64bit_unaligned:
|
||||
@ -995,6 +996,8 @@ implementation
|
||||
{$endif cpu64bitaddr}
|
||||
if constdef = aitconst_half16bit then
|
||||
s:='('+s+')/2';
|
||||
if constdef = aitconst_gs then
|
||||
s:='gs('+s+')';
|
||||
|
||||
AsmWrite(s);
|
||||
inc(l,length(s));
|
||||
|
@ -1665,11 +1665,12 @@ Implementation
|
||||
aitconst_darwin_dwarf_delta32,
|
||||
aitconst_darwin_dwarf_delta64:
|
||||
ObjData.writebytes(Tai_const(hp).value,tai_const(hp).size);
|
||||
aitconst_half16bit:
|
||||
aitconst_half16bit,
|
||||
aitconst_gs:
|
||||
begin
|
||||
tmp:=Tai_const(hp).value div 2;
|
||||
ObjData.writebytes(tmp,2);
|
||||
end
|
||||
end;
|
||||
else
|
||||
internalerror(200603254);
|
||||
end;
|
||||
|
@ -623,7 +623,8 @@ implementation
|
||||
aitconst_secrel32_symbol,
|
||||
aitconst_darwin_dwarf_delta32,
|
||||
aitconst_darwin_dwarf_delta64,
|
||||
aitconst_half16bit:
|
||||
aitconst_half16bit,
|
||||
aitconst_gs:
|
||||
internalerror(2014052901);
|
||||
aitconst_128bit,
|
||||
aitconst_64bit,
|
||||
|
@ -451,7 +451,7 @@ interface
|
||||
#9'FIXME_128BIT'#9,#9'DQ'#9,#9'DD'#9,#9'DW'#9,#9'DB'#9,
|
||||
#9'FIXME_SLEB128BIT'#9,#9'FIXME_ULEB128BIT'#9,
|
||||
#9'RVA'#9,#9'SECREL32'#9,#9'FIXME_darwin_dwarf_delta64'#9,
|
||||
#9'FIXME_darwin_dwarf_delta32'#9,#9'FIXME_half16bit'#9,
|
||||
#9'FIXME_darwin_dwarf_delta32'#9,#9'FIXME_half16bit'#9,#9'FIXME_gs'#9,
|
||||
#9'DW'#9,#9'DD'#9,#9'FIXME_64BIT_UNALIGNED'#9
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user