diff options
| author | 2025-12-25 13:28:56 +0100 | |
|---|---|---|
| committer | 2025-12-25 13:28:56 +0100 | |
| commit | a6c2f8a9177eeae64b83e4aeafe46dbe310b3861 (patch) | |
| tree | d7d4ad2a189170a5ca56a9b46f3571fb12d72bb4 /ir/ir.h | |
| parent | 882ea80770120e4f94e98e46ef824cafc9ccfe1f (diff) | |
avoid GOT relocations in unnecessary instances
Also change xcon to have a flagset for symbols (whether it's a function,
locally defined; later: thread local, etc).
Diffstat (limited to 'ir/ir.h')
| -rw-r--r-- | ir/ir.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -25,9 +25,14 @@ struct irdat { internstr name; }; +enum symflags { + SLOCAL = 1, + SFUNC = 2, +}; struct xcon { - bool issym, isdat, isfunc, deref; + bool issym, isdat, deref; uchar cls; + uchar flag; union { internstr sym; int dat; @@ -255,7 +260,7 @@ union ref mkfltcon(enum irclass, double); #define isaddrcon(r,derefok) ((r).t == RXCON && !conht[(r).i].cls && (derefok || !conht[(r).i].deref)) #define intconval(r) ((r).t == RICON ? (r).i : conht[(r).i].i) #define fltconval(r) ((r).t == RICON ? (r).i : conht[(r).i].f) -union ref mksymref(internstr, bool isfunc); +union ref mksymref(internstr, enum symflags); union ref mkdatref(internstr name, union type ctype, uint siz, uint align, const void *, uint n, bool deref); internstr xcon2sym(int ref); struct instr mkalloca(uint siz, uint align); |