Skip to content

Commit

Permalink
backend: Make BC a D enum (#20724)
Browse files Browse the repository at this point in the history
* backend: Make BC a D enum

* Fix default initialization of BC to be 0
  • Loading branch information
dkorpel authored Jan 17, 2025
1 parent c71c3b2 commit 971a1d6
Show file tree
Hide file tree
Showing 25 changed files with 478 additions and 479 deletions.
6 changes: 3 additions & 3 deletions compiler/src/dmd/backend/arm/cod3.d
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void epilog(block *b)
bool farfunc = tyfarfunc(tym) != 0;
if (!(b.Bflags & BFL.epilog)) // if no epilog code
goto Lret; // just generate RET
regx = (b.BC == BCret) ? AX : CX;
regx = (b.bc == BC.ret) ? AX : CX;

cgstate.retsize = 0;

Expand Down Expand Up @@ -317,7 +317,7 @@ void epilog(block *b)
if (cgstate.usednteh & NTEHjmonitor)
{
regm_t retregs = 0;
if (b.BC == BCretexp)
if (b.bc == BC.retexp)
retregs = regmask(b.Belem.Ety, tym);
nteh_monitor_epilog(cdbx,retregs);
xlocalsize += 8;
Expand Down Expand Up @@ -391,7 +391,7 @@ void epilog(block *b)
cod3_stackadj(cdbx, cast(int)-xlocalsize);
}

if (b.BC == BCret || b.BC == BCretexp)
if (b.bc == BC.ret || b.bc == BC.retexp)
{
Lret:
if (log) printf("epilog: Lret\n");
Expand Down
Loading

0 comments on commit 971a1d6

Please sign in to comment.