aboutsummaryrefslogtreecommitdiffhomepage
path: root/x86_64/isel.c
diff options
context:
space:
mode:
author lemon<lsof@mailbox.org>2025-12-31 11:13:15 +0100
committer lemon<lsof@mailbox.org>2025-12-31 11:13:15 +0100
commit97c6d5c44f30b29b52d1dc431ab9f2df4bb47fd2 (patch)
tree564615d402793491d545d612df31dd80451120ab /x86_64/isel.c
parent3a46902b3ede49116522992793d3ececef53c5a8 (diff)
backend: separate instrs for integer/float store
Diffstat (limited to 'x86_64/isel.c')
-rw-r--r--x86_64/isel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/x86_64/isel.c b/x86_64/isel.c
index d69f9ad..8a845ef 100644
--- a/x86_64/isel.c
+++ b/x86_64/isel.c
@@ -139,7 +139,7 @@ selcall(struct function *fn, struct instr *ins, struct block *blk, int *curi)
union ref adr = mkaddr((struct addr){mkref(RREG, RSP), .disp = abi.stk});
int iargsave = iarg;
if (!abi.ty.isagg) { /* scalar arg in stack */
- *arg = mkinstr(Ostore8+ilog2(cls2siz[abi.ty.cls]), 0, adr, arg->r);
+ *arg = mkinstr(cls2store[abi.ty.cls], 0, adr, arg->r);
if (isaddrcon(arg->r,1) || arg->r.t == RADDR)
arg->r = insertinstr(blk, iarg++, mkinstr(Ocopy, abi.ty.cls, arg->r));
else
@@ -497,7 +497,7 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi)
case Oloads32: case Oloadu32: case Oloadi64: case Oloadf32: case Oloadf64:
loadstoreaddr(blk, &ins->l, curi);
break;
- case Ostore8: case Ostore16: case Ostore32: case Ostore64:
+ case Ostorei8: case Ostorei16: case Ostorei32: case Ostorei64: case Ostoref32: case Ostoref64:
loadstoreaddr(blk, &ins->l, curi);
if (isaddrcon(ins->r,1) || ins->r.t == RADDR)
ins->r = insertinstr(blk, (*curi)++, mkinstr(Ocopy, KPTR, ins->r));