mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 20:50:41 +03:00
errors in cdpost() (#21103)
This commit is contained in:
parent
228f8dbcea
commit
ce15cb9c65
1 changed files with 4 additions and 4 deletions
|
@ -1582,7 +1582,7 @@ void cdpost(ref CGstate cg, ref CodeBuilder cdb,elem* e,ref regm_t pretregs)
|
|||
getregs(cdb,cs.reg);
|
||||
|
||||
const n = e2.Vint;
|
||||
uint opx = OPpostinc ? 0 : 1;
|
||||
uint opx = e.Eoper == OPpostinc ? 0 : 1;
|
||||
uint ins = INSTR.addsub_imm(sz == 8,opx,0,0,n,cs.reg,cs.reg); // ADD/SUB cs.reg,cs.reg,n);
|
||||
cdb.gen1(ins);
|
||||
freenode(e2);
|
||||
|
@ -1615,15 +1615,15 @@ void cdpost(ref CGstate cg, ref CodeBuilder cdb,elem* e,ref regm_t pretregs)
|
|||
getregs(cdb,reg);
|
||||
|
||||
const n = e2.Vint;
|
||||
uint opx = OPpostinc ? 0 : 1;
|
||||
uint ins = INSTR.addsub_imm(sz == 8,opx,1,0,n,reg,reg); // ADD/SUB cs.reg,cs.reg,n);
|
||||
uint opx = e.Eoper == OPpostinc ? 0 : 1;
|
||||
uint ins = INSTR.addsub_imm(sz == 8,opx,0,0,n,reg,reg); // ADD/SUB cs.reg,cs.reg,n);
|
||||
cdb.gen1(ins);
|
||||
|
||||
storeToEA(cs,reg,sz);
|
||||
cdb.gen(&cs); // STR reg,EA
|
||||
|
||||
opx ^= 1;
|
||||
cdb.gen1(INSTR.addsub_imm(sz == 8,opx,1,0,n,reg,reg)); // SUB/ADD cs.reg,cs.reg,n);
|
||||
cdb.gen1(INSTR.addsub_imm(sz == 8,opx,0,0,n,reg,reg)); // SUB/ADD cs.reg,cs.reg,n);
|
||||
|
||||
freenode(e2);
|
||||
fixresult(cdb,e,retregs,pretregs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue