mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:49:13 +02:00
* fixed bug in call/jmp optimization with -Op1 and -Op2
This commit is contained in:
parent
8b0adc1f23
commit
b503c3e3b8
@ -1926,10 +1926,15 @@ Begin
|
||||
(hp1.typ = ait_instruction) And
|
||||
(Taicpu(hp1).opcode = A_JMP) Then
|
||||
Begin
|
||||
Inc(Taicpu(hp1).oper[0].sym^.refs);
|
||||
case Taicpu(hp1).oper[0].typ of
|
||||
top_symbol:
|
||||
hp2 := Taicpu.Op_sym(A_PUSH,S_L,Taicpu(hp1).oper[0].sym);
|
||||
top_ref:
|
||||
hp2 := Taicpu.Op_ref(A_PUSH,S_L,newreference(Taicpu(hp1).oper[0].ref^));
|
||||
end;
|
||||
InsertLLItem(AsmL, p.previous, p, hp2);
|
||||
Taicpu(p).opcode := A_JMP;
|
||||
Taicpu(p).is_jmp := true;
|
||||
asml.Remove(hp1);
|
||||
hp1.free;
|
||||
End;
|
||||
@ -2000,7 +2005,10 @@ End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2000-12-25 00:07:33 peter
|
||||
Revision 1.7 2001-01-07 15:49:49 jonas
|
||||
* fixed bug in call/jmp optimization with -Op1 and -Op2
|
||||
|
||||
Revision 1.6 2000/12/25 00:07:33 peter
|
||||
+ new tlinkedlist class (merge of old tstringqueue,tcontainer and
|
||||
tlinkedlist objects)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user