diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2017-05-17 09:40:07 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2017-05-17 10:05:28 -0400 |
commit | a3a1451c5fabb5c94f7fbeb13fdc6b1e2c23181f (patch) | |
tree | 1fb1ba60e8f3cab09c629ce9dd63e00e01974c39 /arm64/emit.c | |
parent | 2d02070af019e9896ecf2a63bedc098092fd395d (diff) | |
download | roux-a3a1451c5fabb5c94f7fbeb13fdc6b1e2c23181f.tar.gz |
intern symbol names
Symbols in the source file are still limited in length because the rest of the code assumes that strings always fit in NString bytes. Regardless, there is already a benefit because comparing/copying symbol names does not require using strcmp()/strcpy() anymore.
Diffstat (limited to 'arm64/emit.c')
-rw-r--r-- | arm64/emit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arm64/emit.c b/arm64/emit.c index 1b71179..8211c4f 100644 --- a/arm64/emit.c +++ b/arm64/emit.c @@ -244,9 +244,9 @@ loadcon(Con *c, int r, int k, FILE *f) off[0] = 0; p = c->local ? ".L" : ""; fprintf(f, "\tadrp\t%s, %s%s%s\n", - rn, p, c->label, off); + rn, p, str(c->label), off); fprintf(f, "\tadd\t%s, %s, #:lo12:%s%s%s\n", - rn, rn, p, c->label, off); + rn, rn, p, str(c->label), off); return; } assert(c->type == CBits); |