diff options
| author | 2026-03-23 23:38:53 +0100 | |
|---|---|---|
| committer | 2026-03-23 23:43:52 +0100 | |
| commit | 62d995124c0cc2eaeec79e18edc3e044f3e524c9 (patch) | |
| tree | 4c79a80efca09f8050109aa0440ec75351d72c17 /src/t_aarch64_emit.c | |
| parent | 8630aeb8b43c507cd00f5b091ddcee4def464f4d (diff) | |
IR: emit inline function standalone bodies lazily
If a function is stashed for inlining and inlined in all of its
callsites or unused, it never ends up in the object file. If any symbol
reference to it is emitted, then it must be de-inlined (rematerialized),
and this is done near the end before emitting the actual object file.
Diffstat (limited to 'src/t_aarch64_emit.c')
| -rw-r--r-- | src/t_aarch64_emit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/t_aarch64_emit.c b/src/t_aarch64_emit.c index 52429a3..f413f98 100644 --- a/src/t_aarch64_emit.c +++ b/src/t_aarch64_emit.c @@ -269,19 +269,19 @@ encode(uchar **pcode, const EncDesc *tab, int ntab, enum irclass k, Oper o[3]) break; case EN_ADRSYMLO21: ins |= o[0].reg; - objreloc(xcon2sym(o[1].con), REL_ADR_PREL_LO21, Stext, *pcode - objout.textbegin, o[1].cdisp); + objrelocxcon(o[1].con, REL_ADR_PREL_LO21, Stext, *pcode - objout.textbegin, o[1].cdisp); break; case EN_ADRSYMPGHI21: ins |= o[0].reg; - objreloc(xcon2sym(o[1].con), REL_ADR_PREL_PG_HI21, Stext, *pcode - objout.textbegin, o[1].cdisp); + objrelocxcon(o[1].con, REL_ADR_PREL_PG_HI21, Stext, *pcode - objout.textbegin, o[1].cdisp); break; case EN_ADDSYMLO12: ins |= sf<<31 | o[1].reg<<5 | o[0].reg; - objreloc(xcon2sym(o[2].con), REL_ADD_ABS_LO12_NC, Stext, *pcode - objout.textbegin, o[1].cdisp); + objrelocxcon(o[2].con, REL_ADD_ABS_LO12_NC, Stext, *pcode - objout.textbegin, o[1].cdisp); break; case EN_LDSYMLO19: ins |= o[0].reg; - objreloc(xcon2sym(o[1].con), REL_LD_PREL_LO19, Stext, *pcode - objout.textbegin, o[1].cdisp); + objrelocxcon(o[1].con, REL_LD_PREL_LO19, Stext, *pcode - objout.textbegin, o[1].cdisp); break; case EN_FP2R: ins |= sf<<22 | (o[1].reg&31)<<5 | (o[0].reg&31); @@ -494,7 +494,7 @@ static void Xcall(uchar **pcode, Oper dst) { if (dst.t == OSYM) { - objreloc(xcon2sym(dst.con), REL_CALL26, Stext, *pcode - objout.textbegin, 0); + objrelocxcon(dst.con, REL_CALL26, Stext, *pcode - objout.textbegin, 0); W32(0x94000000); /* BL <rel26> */ } else { assert(opermatch(PGPRZ, KPTR, dst)); |