mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 13:39:26 +02:00
* i386 PIC: Do not force EBX as a GOT register if tf_section_threadvars is not set. Actually forcing EBX here is a bad idea anyway.
git-svn-id: trunk@41463 -
This commit is contained in:
parent
4da16992df
commit
039aee9568
@ -100,8 +100,11 @@ unit cpupi;
|
|||||||
begin
|
begin
|
||||||
if (cs_create_pic in current_settings.moduleswitches) then
|
if (cs_create_pic in current_settings.moduleswitches) then
|
||||||
begin
|
begin
|
||||||
if pi_uses_threadvar in flags then
|
if (pi_uses_threadvar in flags) and (tf_section_threadvars in target_info.flags) then
|
||||||
begin
|
begin
|
||||||
|
{ FIXME: It is better to use an imaginary register for GOT and
|
||||||
|
if EBX is needed for some reason just allocate EBX and
|
||||||
|
copy GOT into it before its usage. }
|
||||||
cg.getcpuregister(list,NR_EBX);
|
cg.getcpuregister(list,NR_EBX);
|
||||||
got := NR_EBX;
|
got := NR_EBX;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user