diff options
author | Michael Forney <mforney@mforney.org> | 2021-09-14 14:19:32 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2021-09-14 14:19:32 -0700 |
commit | e049bdb1bf525af3dc9d813940e6f4fa92c04b77 (patch) | |
tree | 4a83aa1ddf74e0a917072528bdd0eadf7ac68e5b | |
parent | 9cae1b50f1805393f00803b426a99a7bb448c84a (diff) | |
download | cproc-e049bdb1bf525af3dc9d813940e6f4fa92c04b77.tar.xz |
qbe: Support more aligned types in funccopy
We don't have any of these currently, but it's easier to support
than to error out.
-rw-r--r-- | qbe.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -303,14 +303,13 @@ funccopy(struct func *f, struct value *dst, struct value *src, uint64_t size, in struct value *tmp, *inc; uint64_t off; + assert((align & align - 1) == 0); class = 'w'; switch (align) { case 1: load = ILOADUB, store = ISTOREB; break; case 2: load = ILOADUH, store = ISTOREH; break; case 4: load = ILOADW, store = ISTOREW; break; - case 8: load = ILOADL, store = ISTOREL, class = 'l'; break; - default: - fatal("internal error; invalid alignment %d", align); + default: load = ILOADL, store = ISTOREL, align = 8, class = 'l'; break; } inc = mkintconst(align); off = 0; |