mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-08-15 07:27:27 +00:00
Do quad equality comparisons without loading operands on stack.
This commit is contained in:
19
Gen.pas
19
Gen.pas
@@ -2263,6 +2263,23 @@ else
|
|||||||
end; {case optype of cgReal..cgExtended}
|
end; {case optype of cgReal..cgExtended}
|
||||||
|
|
||||||
cgQuad,cgUQuad: begin
|
cgQuad,cgUQuad: begin
|
||||||
|
if SimpleQuadLoad(op^.left) and SimpleQuadLoad(op^.right)
|
||||||
|
and not volatile then begin
|
||||||
|
lab1 := GenLabel;
|
||||||
|
OpOnWordOfQuad(m_lda_imm, op^.left, 0);
|
||||||
|
OpOnWordOfQuad(m_eor_imm, op^.right, 0);
|
||||||
|
GenNative(m_bne, relative, lab1, nil, 0);
|
||||||
|
OpOnWordOfQuad(m_lda_imm, op^.left, 2);
|
||||||
|
OpOnWordOfQuad(m_eor_imm, op^.right, 2);
|
||||||
|
GenNative(m_bne, relative, lab1, nil, 0);
|
||||||
|
OpOnWordOfQuad(m_lda_imm, op^.left, 4);
|
||||||
|
OpOnWordOfQuad(m_eor_imm, op^.right, 4);
|
||||||
|
GenNative(m_bne, relative, lab1, nil, 0);
|
||||||
|
OpOnWordOfQuad(m_lda_imm, op^.left, 6);
|
||||||
|
OpOnWordOfQuad(m_eor_imm, op^.right, 6);
|
||||||
|
GenLab(lab1);
|
||||||
|
end {if}
|
||||||
|
else begin
|
||||||
gQuad.preference := onStack;
|
gQuad.preference := onStack;
|
||||||
GenTree(op^.left);
|
GenTree(op^.left);
|
||||||
gQuad.preference := onStack;
|
gQuad.preference := onStack;
|
||||||
@@ -2295,6 +2312,8 @@ else
|
|||||||
GenImplied(m_tcs);
|
GenImplied(m_tcs);
|
||||||
|
|
||||||
GenImplied(m_txa);
|
GenImplied(m_txa);
|
||||||
|
end; {else}
|
||||||
|
|
||||||
if opcode in [pc_fjp,pc_tjp] then begin
|
if opcode in [pc_fjp,pc_tjp] then begin
|
||||||
lab3 := GenLabel;
|
lab3 := GenLabel;
|
||||||
if opcode = pc_fjp then
|
if opcode = pc_fjp then
|
||||||
|
Reference in New Issue
Block a user