diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-12-12 17:36:15 +0100 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-12-12 22:16:33 +0100 |
commit | c0f25aeae3ef5d5f4b6bc5678f8d8ce40597d673 (patch) | |
tree | 26b78f6db8a8fd46005ce94835b0135a6df4eef7 /parse.c | |
parent | 2ec355df6adc457303fcf2076b559fefd80ee593 (diff) | |
download | roux-c0f25aeae3ef5d5f4b6bc5678f8d8ce40597d673.tar.gz |
new rsval() helper for signed Refs
The .val field is signed in RSlot. Add a new dedicated function to fetch it as a signed int.
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c index 849c81d..0836b9a 100644 --- a/parse.c +++ b/parse.c @@ -1211,7 +1211,7 @@ printref(Ref r, Fn *fn, FILE *f) printcon(&fn->con[r.val], f); break; case RSlot: - fprintf(f, "S%d", (r.val&(1<<28)) ? r.val-(1<<29) : r.val); + fprintf(f, "S%d", rsval(r)); break; case RCall: fprintf(f, "%04x", r.val); |