mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 11:06:19 +02:00
* preserve the segment of the reference in tx86vecnode.update_reference_reg_mul
on i386 and x86_64 as well git-svn-id: trunk@27481 -
This commit is contained in:
parent
f00f7d6ee7
commit
198960b17c
@ -90,6 +90,7 @@ implementation
|
|||||||
var
|
var
|
||||||
l2 : integer;
|
l2 : integer;
|
||||||
hreg : tregister;
|
hreg : tregister;
|
||||||
|
saveseg: TRegister;
|
||||||
begin
|
begin
|
||||||
{ Optimized for x86 to use the index register and scalefactor }
|
{ Optimized for x86 to use the index register and scalefactor }
|
||||||
if location.reference.index=NR_NO then
|
if location.reference.index=NR_NO then
|
||||||
@ -116,7 +117,10 @@ implementation
|
|||||||
begin
|
begin
|
||||||
hreg:=cg.getaddressregister(current_asmdata.CurrAsmList);
|
hreg:=cg.getaddressregister(current_asmdata.CurrAsmList);
|
||||||
cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,location.reference,hreg);
|
cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,location.reference,hreg);
|
||||||
|
{ reference_reset_base kills the segment, so make sure we preserve it }
|
||||||
|
saveseg:=location.reference.segment;
|
||||||
reference_reset_base(location.reference,hreg,0,location.reference.alignment);
|
reference_reset_base(location.reference,hreg,0,location.reference.alignment);
|
||||||
|
location.reference.segment:=saveseg;
|
||||||
end;
|
end;
|
||||||
{ insert the new index register and scalefactor or
|
{ insert the new index register and scalefactor or
|
||||||
do the multiplication manual }
|
do the multiplication manual }
|
||||||
|
Loading…
Reference in New Issue
Block a user