mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 14:29:25 +02:00
Use reverse_byte to write constant sets in cross-endian configuration
This commit is contained in:
parent
5eda6e027d
commit
11b0b9dc57
@ -2664,6 +2664,7 @@ implementation
|
|||||||
i,
|
i,
|
||||||
size: aint;
|
size: aint;
|
||||||
usedef: tdef;
|
usedef: tdef;
|
||||||
|
b : byte;
|
||||||
begin
|
begin
|
||||||
{ These are default values of parameters. These should be encoded
|
{ These are default values of parameters. These should be encoded
|
||||||
via DW_AT_default_value, not as a separate sym. Moreover, their
|
via DW_AT_default_value, not as a separate sym. Moreover, their
|
||||||
@ -2744,7 +2745,10 @@ implementation
|
|||||||
size:=sym.constdef.size;
|
size:=sym.constdef.size;
|
||||||
while (i<size) do
|
while (i<size) do
|
||||||
begin
|
begin
|
||||||
current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit((pbyte(sym.value.valueptr+i)^)));
|
b:=pbyte(sym.value.valueptr+i)^;
|
||||||
|
if (target_info.endian<>source_info.endian) then
|
||||||
|
b:=reverse_byte(b);
|
||||||
|
current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(b));
|
||||||
inc(i);
|
inc(i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user