- Applied patch by Christo Crause from #33914

git-svn-id: trunk@42493 -
This commit is contained in:
Jeppe Johansen 2019-07-25 13:24:10 +00:00
parent 030cf78ac5
commit ff3372567f
2 changed files with 33 additions and 0 deletions

View File

@ -702,6 +702,9 @@ interface
constructor Create_int_codeptr_unaligned(_value: int64);
constructor Create_int_dataptr(_value: int64);
constructor Create_int_dataptr_unaligned(_value: int64);
{$ifdef avr}
constructor Create_int_dataptr_unaligned(_value: int64; size: taiconst_type);
{$endif}
{$ifdef i8086}
constructor Create_seg_name(const name:string);
constructor Create_dgroup;
@ -1962,6 +1965,20 @@ implementation
end;
{$ifdef avr}
constructor tai_const.Create_int_dataptr_unaligned(_value: int64;
size: taiconst_type);
begin
inherited Create;
typ:=ait_const;
consttype:=size;
sym:=nil;
endsym:=nil;
symofs:=0;
value:=_value;
end;
{$endif avr}
{$ifdef i8086}
constructor tai_const.Create_seg_name(const name:string);
begin

View File

@ -48,6 +48,12 @@ interface
DbgBase;
type
{$ifdef avr}
// re-map to larger types because of offsets required to distinguish different memory spaces
puint = cardinal;
pint = longint;
{$endif avr}
{ Tag names and codes. }
tdwarf_tag = (DW_TAG_padding := $00,DW_TAG_array_type := $01,
DW_TAG_class_type := $02,DW_TAG_entry_point := $03,
@ -538,6 +544,11 @@ implementation
{ Implementation-defined range start. }
DW_LANG_hi_user = $ffff;
{$ifdef avr}
// More space required to include memory type offset
aitconst_ptr_unaligned = aitconst_32bit_unaligned;
{$endif avr}
type
{ Names and codes for macro information. }
tdwarf_macinfo_record_type = (DW_MACINFO_define := 1,DW_MACINFO_undef := 2,
@ -3142,7 +3153,12 @@ implementation
end;
*)
templist.concat(tai_const.create_8bit(3));
{$ifdef avr}
// Add $800000 to indicate that the address is in memory space
templist.concat(tai_const.create_int_dataptr_unaligned(sym.addroffset + $800000, aitconst_ptr_unaligned));
{$else}
templist.concat(tai_const.create_int_dataptr_unaligned(sym.addroffset));
{$endif}
blocksize:=1+sizeof(puint);
end;
toasm :