mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-03 10:29:41 +00:00
Allow pointer arithmetic using long long values.
This converts them to 32-bit values before doing computations, which is (more than) sufficient for address calculations on the 65816. Trying to compute an address outside the legal range is undefined behavior, and does not necessarily "wrap around" in a predictable way.
This commit is contained in:
parent
8992ddc11f
commit
7f3ba768cd
@ -2122,10 +2122,12 @@ case tp of
|
||||
Gen0(op);
|
||||
end;
|
||||
end;
|
||||
cgLong,cgULong: begin
|
||||
cgLong,cgULong,cgQuad,cgUQuad: begin
|
||||
if tp in [cgQuad,cgUQuad] then
|
||||
Gen2(pc_cnv, ord(tp), ord(cgLong));
|
||||
if size <> 1 then begin
|
||||
GenLdcLong(size);
|
||||
if tp = cgLong then
|
||||
if tp in [cgLong,cgQuad] then
|
||||
Gen0(pc_mpl)
|
||||
else
|
||||
Gen0(pc_uml);
|
||||
|
Loading…
Reference in New Issue
Block a user