mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-06-01 09:41:39 +00:00
Generate better code for stack array indexing in large memory model.
Any stack-allocated array must be < 32KB, so we can use the same approach as in the small memory model to compute indexes for it (which is considerably more efficient than the large-memory-model code).
This commit is contained in:
parent
be291b2423
commit
3a64c5b977
4
Gen.pas
4
Gen.pas
|
@ -3394,7 +3394,7 @@ var
|
||||||
|
|
||||||
|
|
||||||
begin {GenIxa}
|
begin {GenIxa}
|
||||||
if smallMemoryModel then begin
|
if smallMemoryModel or (op^.left^.opcode = pc_lda) then begin
|
||||||
lLong := gLong;
|
lLong := gLong;
|
||||||
gLong.preference := inPointer+localAddress+globalLabel;
|
gLong.preference := inPointer+localAddress+globalLabel;
|
||||||
GenTree(op^.left);
|
GenTree(op^.left);
|
||||||
|
@ -3599,7 +3599,7 @@ if smallMemoryModel then begin
|
||||||
otherwise:
|
otherwise:
|
||||||
Error(cge1);
|
Error(cge1);
|
||||||
end; {case}
|
end; {case}
|
||||||
end {if smallMemoryModel}
|
end {if smallMemoryModel or (op^.left^.opcode = pc_lda)}
|
||||||
else begin
|
else begin
|
||||||
gLong.preference := onStack;
|
gLong.preference := onStack;
|
||||||
GenTree(op^.left);
|
GenTree(op^.left);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user