mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-08-10 06:25:02 +00:00
Generate more efficient code for some indexing operations affected by the previous commit.
This commit is contained in:
18
Gen.pas
18
Gen.pas
@@ -2533,11 +2533,19 @@ if smallMemoryModel then begin
|
|||||||
end; {else}
|
end; {else}
|
||||||
if gLong.where = globalLabel then
|
if gLong.where = globalLabel then
|
||||||
if IndexCanBeNegative then begin
|
if IndexCanBeNegative then begin
|
||||||
GenImplied(m_txa);
|
if (gLong.disp >= 0) and (gLong.disp <= 2) then begin
|
||||||
GenImplied(m_clc);
|
while gLong.disp > 0 do begin
|
||||||
GenNative(m_adc_imm, immediate, gLong.disp, nil, 0);
|
GenImplied(m_inx);
|
||||||
GenImplied(m_tax);
|
gLong.disp := gLong.disp - 1;
|
||||||
gLong.disp := 0;
|
end; {while}
|
||||||
|
end {if}
|
||||||
|
else begin
|
||||||
|
GenImplied(m_txa);
|
||||||
|
GenImplied(m_clc);
|
||||||
|
GenNative(m_adc_imm, immediate, gLong.disp, nil, 0);
|
||||||
|
GenImplied(m_tax);
|
||||||
|
gLong.disp := 0;
|
||||||
|
end; {else}
|
||||||
end; {if}
|
end; {if}
|
||||||
if (lLong.preference & gLong.where) = 0 then begin
|
if (lLong.preference & gLong.where) = 0 then begin
|
||||||
if (lLong.preference & inPointer) <> 0 then begin
|
if (lLong.preference & inPointer) <> 0 then begin
|
||||||
|
Reference in New Issue
Block a user