diff options
| author | 2026-03-22 22:00:35 +0100 | |
|---|---|---|
| committer | 2026-03-22 22:00:35 +0100 | |
| commit | 7c5dd45eca377a3b675b6f0d4a9331bc3f971ac9 (patch) | |
| tree | 08d7a252029da556d09b6014018678f80a75c032 /src/ir.h | |
| parent | 33d31f72d546b4b224c226e82fb111e24f8b2e37 (diff) | |
style: change uvlong -> u64int, vlong -> s64int
Is much nicer. I don't know whether I want to do it for the other int
types too. char and uchar are fine as bytes. u/short -> u/s16int, maybe.
Diffstat (limited to 'src/ir.h')
| -rw-r--r-- | src/ir.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -32,7 +32,7 @@ typedef struct IRCon { union { internstr sym; int dat; - vlong i; + s64int i; double f; }; } IRCon; @@ -84,7 +84,7 @@ typedef struct IRAddr { } IRAddr; #define insrescls(ins) (oiscmp((ins).op) ? KI32 : (ins).cls) -#define NOREF ((Ref) {0}) +#define NOREF ((Ref) {{0}}) #define UNDREF ((Ref) {{ 0, -1 }}) #define ZEROREF ((Ref) {{ RICON, 0 }}) #define mkref(t, x) ((Ref) {{ (t), (x) }}) @@ -161,16 +161,16 @@ typedef struct IRUse { enum { MAXREGS = 64 }; /** register set **/ -typedef uvlong regset; +typedef u64int regset; #define BIT(x) (1ull<<(x)) #define rsset(pS, r) (*(pS) |= 1ull << (r)) #define rsclr(pS, r) (*(pS) &=~ (1ull << (r))) #define rstest(S, r) ((S) >> (r) & 1) static inline bool -rsiter(int *i, uvlong rs) +rsiter(int *i, u64int rs) { if (*i > 63) return 0; - uvlong mask = -(1ull << *i); + u64int mask = -(1ull << *i); if ((rs & mask) == 0) return 0; *i = lowestsetbit(rs & mask); return 1; @@ -265,7 +265,7 @@ void irfini(Function *); #define cls2type(k) ((IRType){.cls=(k)}) IRType mkirtype(Type); Ref newxcon(const IRCon *); -Ref mkintcon(enum irclass, vlong); +Ref mkintcon(enum irclass, s64int); Ref mkfltcon(enum irclass, double); #define iscon(r) in_range((r).t, RICON, RXCON) #define concls(r) ((r).t == RICON ? KI32 : contab.p[(r).i].cls) |