mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
* arm: Include pi_needs_got to current_procinfo.flags when the GOT register is accessed. It forces proper initialization of the GOT register at the beginning of a procedure. This fixes storing of a double constant to a field in a packed record and other rare copy operations when PIC is enabled.
git-svn-id: trunk@41405 -
This commit is contained in:
parent
3e8c7f66b7
commit
3a43ffd57b
@ -2486,6 +2486,11 @@ unit cgcpu;
|
||||
(tf_pic_uses_got in target_info.flags) and
|
||||
assigned(ref.symbol) then
|
||||
begin
|
||||
{$ifdef EXTDEBUG}
|
||||
if not (pi_needs_got in current_procinfo.flags) then
|
||||
Comment(V_warning,'pi_needs_got not included');
|
||||
{$endif EXTDEBUG}
|
||||
Include(current_procinfo.flags,pi_needs_got);
|
||||
reference_reset(tmpref,4,[]);
|
||||
tmpref.base:=current_procinfo.got;
|
||||
tmpref.index:=tmpreg;
|
||||
|
Loading…
Reference in New Issue
Block a user