mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-06-10 07:29:32 +00:00
Implement indirect store/copy operations for 64-bit types.
These operations (pc_sto and pc_cpi) are used for access through a pointer, and in some cases also for initialization.
This commit is contained in:
parent
fc3bd32e65
commit
8992ddc11f
37
Gen.pas
37
Gen.pas
|
@ -3664,6 +3664,43 @@ case optype of
|
|||
end; {else}
|
||||
end; {case cgReal,cgDouble,cgComp,cgExtended}
|
||||
|
||||
cgQuad,cgUQuad: begin
|
||||
GenTree(op^.right);
|
||||
gLong.preference := A_X;
|
||||
GenTree(op^.left);
|
||||
if gLong.where = onStack then begin
|
||||
GenImplied(m_pla);
|
||||
GenImplied(m_plx);
|
||||
end; {if}
|
||||
GenNative(m_sta_dir, direct, dworkLoc, nil, 0);
|
||||
GenNative(m_stx_dir, direct, dworkLoc+2, nil, 0);
|
||||
if opcode = pc_sto then
|
||||
GenImplied(m_pla)
|
||||
else {if op^.opcode = pc_cpi then}
|
||||
GenNative(m_lda_s, direct, 1, nil, 0);
|
||||
GenNative(m_sta_indl, direct, dworkLoc, nil, 0);
|
||||
GenNative(m_ldy_imm, immediate, 2, nil, 0);
|
||||
if opcode = pc_sto then
|
||||
GenImplied(m_pla)
|
||||
else {if op^.opcode = pc_cpi then}
|
||||
GenNative(m_lda_s, direct, 3, nil, 0);
|
||||
GenNative(m_sta_indly, direct, dworkLoc, nil, 0);
|
||||
GenImplied(m_iny);
|
||||
GenImplied(m_iny);
|
||||
if opcode = pc_sto then
|
||||
GenImplied(m_pla)
|
||||
else {if op^.opcode = pc_cpi then}
|
||||
GenNative(m_lda_s, direct, 5, nil, 0);
|
||||
GenNative(m_sta_indly, direct, dworkLoc, nil, 0);
|
||||
GenImplied(m_iny);
|
||||
GenImplied(m_iny);
|
||||
if opcode = pc_sto then
|
||||
GenImplied(m_pla)
|
||||
else {if op^.opcode = pc_cpi then}
|
||||
GenNative(m_lda_s, direct, 7, nil, 0);
|
||||
GenNative(m_sta_indly, direct, dworkLoc, nil, 0);
|
||||
end; {case cgQuad,cgUQuad}
|
||||
|
||||
cgLong,cgULong: begin
|
||||
if opcode = pc_sto then
|
||||
gLong.preference := onStack+constant
|
||||
|
|
Loading…
Reference in New Issue
Block a user