diff options
| author | 2025-12-20 19:32:13 +0100 | |
|---|---|---|
| committer | 2025-12-20 19:32:13 +0100 | |
| commit | 9721d6ba4036c325a7bdecbf867927566f78e81e (patch) | |
| tree | f122f18c10b1a420585cb4e4127cdf05069d1942 /ir | |
| parent | e6fbab42185f4fb4e3a3b1e3e93eaa5d3d81b7c7 (diff) | |
some static assertions for packed type sizes
Diffstat (limited to 'ir')
| -rw-r--r-- | ir/ir.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -68,6 +68,7 @@ union ref { struct { unsigned t : 3; signed i : 29; }; uint bits; }; +static_assert(sizeof(union ref) == 4); struct addr { union ref base, index; @@ -115,6 +116,7 @@ struct instr { uchar reg; /* 0 -> no reg; else reg + 1 */ union ref l, r; /* args */ }; +static_assert(sizeof(struct instr) == 4*3); enum jumpkind { JXXX, Jb, Jret, Jtrap, }; |