mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 19:03:14 +02:00
* support i8086 far references in tx86addnode.emit_op_right_left
git-svn-id: trunk@24737 -
This commit is contained in:
parent
1e8b192b3d
commit
525246f61b
@ -247,8 +247,9 @@ unit nx86add;
|
||||
|
||||
|
||||
procedure tx86addnode.emit_op_right_left(op:TAsmOp;opsize:TCgsize);
|
||||
{$ifdef x86_64}
|
||||
var
|
||||
tmpref: treference;
|
||||
{$ifdef x86_64}
|
||||
tmpreg : tregister;
|
||||
{$endif x86_64}
|
||||
begin
|
||||
@ -263,7 +264,16 @@ unit nx86add;
|
||||
LOC_CREFERENCE :
|
||||
begin
|
||||
tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,right.location.reference);
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,TCGSize2Opsize[opsize],right.location.reference,left.location.register));
|
||||
tmpref:=right.location.reference;
|
||||
{$ifdef i8086}
|
||||
if (tmpref.segment<>NR_NO) and (not is_segment_reg(tmpref.segment)) then
|
||||
begin
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg(A_PUSH,S_W,tmpref.segment));
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg(A_POP,S_W,NR_ES));
|
||||
tmpref.segment:=NR_ES;
|
||||
end;
|
||||
{$endif i8086}
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,TCGSize2Opsize[opsize],tmpref,left.location.register));
|
||||
end;
|
||||
LOC_CONSTANT :
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user