diff options
| author | 2026-04-09 15:28:27 +0200 | |
|---|---|---|
| committer | 2026-04-09 15:28:27 +0200 | |
| commit | c4d90877469e801c34066a7f823ffb1144dd5851 (patch) | |
| tree | beae82ef4574b084614905895517019bcc1fe531 /src/t_x86-64_emit.c | |
| parent | 3dd91560a2dca691953a5691e96787adeeb509d5 (diff) | |
backend: inlining improvements
Diffstat (limited to 'src/t_x86-64_emit.c')
| -rw-r--r-- | src/t_x86-64_emit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/t_x86-64_emit.c b/src/t_x86-64_emit.c index c2da048..616ccf4 100644 --- a/src/t_x86-64_emit.c +++ b/src/t_x86-64_emit.c @@ -933,6 +933,8 @@ gencopy(uchar **pcode, enum irclass cls, Block *blk, int curi, Oper dst, Ref val GOTLoad: /* for mov reg, [rip(sym@GOTPCREL)] */ Xmov(pcode, cls, dst, mkoper(OSYMGOT, .con = val.i, .cindex = NOINDEX)); + } else if (ccopt.pic && (contab.p[val.i].flag & SFUNC) && !objhassym(xcon2sym(val.i), NULL)) { + goto GOTLoad; } else { /* for lea reg, [rip(sym)] */ Xlea(pcode, cls, dst, mkoper(OSYM, .con = val.i, .cindex = NOINDEX)); |