Skip to content

errors in cdpost() #21103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compiler/src/dmd/backend/arm/cod2.d
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@
getregs(cdb,cs.reg);

const n = e2.Vint;
uint opx = OPpostinc ? 0 : 1;
uint opx = e.Eoper == OPpostinc ? 0 : 1;

Check warning on line 1585 in compiler/src/dmd/backend/arm/cod2.d

View check run for this annotation

Codecov / codecov/patch

compiler/src/dmd/backend/arm/cod2.d#L1585

Added line #L1585 was not covered by tests
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);
Expand Down Expand Up @@ -1615,15 +1615,15 @@
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);

Check warning on line 1619 in compiler/src/dmd/backend/arm/cod2.d

View check run for this annotation

Codecov / codecov/patch

compiler/src/dmd/backend/arm/cod2.d#L1618-L1619

Added lines #L1618 - L1619 were not covered by tests
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);

Check warning on line 1626 in compiler/src/dmd/backend/arm/cod2.d

View check run for this annotation

Codecov / codecov/patch

compiler/src/dmd/backend/arm/cod2.d#L1626

Added line #L1626 was not covered by tests

freenode(e2);
fixresult(cdb,e,retregs,pretregs);
Expand Down
Loading