mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
* convert i8086 inline asm instruction 'call symbol' to 'call far symbol' in memory models with far code
git-svn-id: trunk@25438 -
This commit is contained in:
parent
5a42a8d707
commit
4f96e8a20d
@ -81,7 +81,7 @@ Unit Rax86int;
|
||||
cutils,
|
||||
{ global }
|
||||
globals,verbose,
|
||||
systems,
|
||||
systems,cpuinfo,
|
||||
{ aasm }
|
||||
aasmtai,aasmdata,aasmcpu,
|
||||
{ symtable }
|
||||
@ -2128,6 +2128,17 @@ Unit Rax86int;
|
||||
if (instr.ops=1) and
|
||||
(instr.operands[1].typesize<>0) then
|
||||
instr.operands[1].setsize(instr.operands[1].typesize,false);
|
||||
{$ifdef i8086}
|
||||
{ convert 'call symbol' to 'call far symbol' for memory models with far code }
|
||||
for i:=1 to operandnum do
|
||||
with instr.operands[i].opr do
|
||||
if (instr.opcode=A_CALL) and (typ=OPR_SYMBOL) and (symbol<>nil) and (symbol.typ<>AT_DATA) then
|
||||
if current_settings.x86memorymodel in x86_far_code_models then
|
||||
begin
|
||||
instr.operands[i].InitRef;
|
||||
ref.refaddr:=addr_far;
|
||||
end;
|
||||
{$endif i8086}
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user