mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-02 04:31:25 +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}
|
||||
if smallMemoryModel then begin
|
||||
if smallMemoryModel or (op^.left^.opcode = pc_lda) then begin
|
||||
lLong := gLong;
|
||||
gLong.preference := inPointer+localAddress+globalLabel;
|
||||
GenTree(op^.left);
|
||||
@ -3599,7 +3599,7 @@ if smallMemoryModel then begin
|
||||
otherwise:
|
||||
Error(cge1);
|
||||
end; {case}
|
||||
end {if smallMemoryModel}
|
||||
end {if smallMemoryModel or (op^.left^.opcode = pc_lda)}
|
||||
else begin
|
||||
gLong.preference := onStack;
|
||||
GenTree(op^.left);
|
||||
|
Loading…
Reference in New Issue
Block a user