commit: 07f9cd51870ace7de86f5d42ed7e17678185ca4b
parent b5aec6c94a59027ea5f897b0f4fc4181d423d2e8
Author: Michael Forney <mforney@mforney.org>
Date: Fri, 19 Apr 2019 17:03:12 -0700
qbe: Update to latest git
Diffstat:
6 files changed, 1 insertion(+), 189 deletions(-)
diff --git a/.gitmodules b/.gitmodules
@@ -197,7 +197,6 @@
[submodule "pkg/qbe/src"]
path = pkg/qbe/src
url = git://c9x.me/qbe.git
- ignore = all
[submodule "pkg/samurai/src"]
path = pkg/samurai/src
url = https://github.com/michaelforney/samurai
diff --git a/pkg/qbe/patch/0001-Increase-maximum-string-length.patch b/pkg/qbe/patch/0001-Increase-maximum-string-length.patch
@@ -1,28 +0,0 @@
-From 9a5f78919d8d37684d653a8ef1da47a8bfd556a9 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Thu, 31 Jan 2019 18:00:24 -0800
-Subject: [PATCH] Increase maximum string length
-
-The C standard requires that implementations support internal identifiers
-at least 63 characters long, so QBE should allow for identifiers at
-least that long.
----
- all.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/all.h b/all.h
-index 24a1755..1364024 100644
---- a/all.h
-+++ b/all.h
-@@ -31,7 +31,7 @@ typedef struct Dat Dat;
- typedef struct Target Target;
-
- enum {
-- NString = 32,
-+ NString = 64,
- NPred = 63,
- NIns = 1 << 20,
- NAlign = 3,
---
-2.20.1
-
diff --git a/pkg/qbe/patch/0002-amd64-Make-floating-constants-their-own-temporaries.patch b/pkg/qbe/patch/0002-amd64-Make-floating-constants-their-own-temporaries.patch
@@ -1,29 +0,0 @@
-From 90c037be8ee0ec9c16d035fc067a8aa9554ea2c7 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Wed, 13 Feb 2019 16:39:52 -0800
-Subject: [PATCH] amd64: Make floating constants their own temporaries
-
-Otherwise, we may attempt a memory-to-memory mov if trying to save the
-constant to a slot (for example a spilled phi with a constant float
-argument).
----
- amd64/isel.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/amd64/isel.c b/amd64/isel.c
-index 6aea850..babcd65 100644
---- a/amd64/isel.c
-+++ b/amd64/isel.c
-@@ -84,6 +84,9 @@ fixarg(Ref *r, int k, int op, Fn *fn)
- sprintf(buf, "fp%d", n);
- a.offset.label = intern(buf);
- fn->mem[fn->nmem-1] = a;
-+ r0 = r1;
-+ r1 = newtmp("isel", k, fn);
-+ emit(Ocopy, k, r1, r0, R);
- }
- else if (!cpy && k == Kl && noimm(r0, fn)) {
- /* load constants that do not fit in
---
-2.20.1
-
diff --git a/pkg/qbe/patch/0003-Rearrange-the-fields-in-Ins-so-the-bit-fields-get-pa.patch b/pkg/qbe/patch/0003-Rearrange-the-fields-in-Ins-so-the-bit-fields-get-pa.patch
@@ -1,104 +0,0 @@
-From 6324d4f3607c3faf05c09f18fcef0b162b212e86 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Thu, 14 Feb 2019 13:23:28 -0800
-Subject: [PATCH] Rearrange the fields in Ins so the bit-fields get packed
- together
-
----
- all.h | 2 +-
- amd64/sysv.c | 2 +-
- arm64/abi.c | 5 +----
- load.c | 2 +-
- parse.c | 12 ++++++------
- 5 files changed, 10 insertions(+), 13 deletions(-)
-
-diff --git a/all.h b/all.h
-index 1364024..668bb77 100644
---- a/all.h
-+++ b/all.h
-@@ -197,9 +197,9 @@ struct Op {
-
- struct Ins {
- uint op:30;
-+ uint cls:2;
- Ref to;
- Ref arg[2];
-- uint cls:2;
- };
-
- struct Phi {
-diff --git a/amd64/sysv.c b/amd64/sysv.c
-index d70e70d..86c59bf 100644
---- a/amd64/sysv.c
-+++ b/amd64/sysv.c
-@@ -345,7 +345,7 @@ selcall(Fn *fn, Ins *i0, Ins *i1, RAlloc **rap)
- ra = alloc(sizeof *ra);
- /* specific to NAlign == 3 */
- al = aret.align >= 2 ? aret.align - 2 : 0;
-- ra->i = (Ins){Oalloc+al, r1, {getcon(aret.size, fn)}, Kl};
-+ ra->i = (Ins){Oalloc+al, Kl, r1, {getcon(aret.size, fn)}};
- ra->link = (*rap);
- *rap = ra;
- } else {
-diff --git a/arm64/abi.c b/arm64/abi.c
-index 1c97ef3..6eb40e3 100644
---- a/arm64/abi.c
-+++ b/arm64/abi.c
-@@ -313,10 +313,7 @@ stkblob(Ref r, Class *c, Fn *fn, Insl **ilp)
- al = c->t->align - 2; /* NAlign == 3 */
- if (al < 0)
- al = 0;
-- il->i = (Ins){
-- Oalloc + al, r,
-- {getcon(c->t->size, fn)}, Kl
-- };
-+ il->i = (Ins){Oalloc + al, Kl, r, {getcon(c->t->size, fn)}};
- il->link = *ilp;
- *ilp = il;
- }
-diff --git a/load.c b/load.c
-index 504b2d8..6f5b6ab 100644
---- a/load.c
-+++ b/load.c
-@@ -77,7 +77,7 @@ iins(int cls, int op, Ref a0, Ref a1, Loc *l)
- ist->num = inum++;
- ist->bid = l->blk->id;
- ist->off = l->off;
-- ist->new.ins = (Ins){op, R, {a0, a1}, cls};
-+ ist->new.ins = (Ins){op, cls, R, {a0, a1}};
- return ist->new.ins.to = newtmp("ld", cls, curf);
- }
-
-diff --git a/parse.c b/parse.c
-index 3c4200e..b0cdd8c 100644
---- a/parse.c
-+++ b/parse.c
-@@ -452,19 +452,19 @@ parserefl(int arg)
- err("invalid function parameter");
- if (k == 4)
- if (arg)
-- *curi = (Ins){Oargc, R, {TYPE(ty), r}, Kl};
-+ *curi = (Ins){Oargc, Kl, R, {TYPE(ty), r}};
- else
-- *curi = (Ins){Oparc, r, {TYPE(ty)}, Kl};
-+ *curi = (Ins){Oparc, Kl, r, {TYPE(ty)}};
- else if (env)
- if (arg)
-- *curi = (Ins){Oarge, R, {r}, k};
-+ *curi = (Ins){Oarge, k, R, {r}};
- else
-- *curi = (Ins){Opare, r, {R}, k};
-+ *curi = (Ins){Opare, k, r, {R}};
- else
- if (arg)
-- *curi = (Ins){Oarg, R, {r}, k};
-+ *curi = (Ins){Oarg, k, R, {r}};
- else
-- *curi = (Ins){Opar, r, {R}, k};
-+ *curi = (Ins){Opar, k, r, {R}};
- curi++;
- hasenv |= env;
- if (peek() == Trparen)
---
-2.20.1
-
diff --git a/pkg/qbe/patch/0004-Consider-vacall-when-determining-if-a-local-needs-to.patch b/pkg/qbe/patch/0004-Consider-vacall-when-determining-if-a-local-needs-to.patch
@@ -1,26 +0,0 @@
-From 2fcb277b0fa2993b00e0a85fe0e28697fe855dd1 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Wed, 6 Mar 2019 20:31:11 -0800
-Subject: [PATCH] Consider vacall when determining if a local needs to be
- loaded
-
----
- load.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/load.c b/load.c
-index 6f5b6ab..a21a488 100644
---- a/load.c
-+++ b/load.c
-@@ -231,7 +231,7 @@ def(Slice sl, bits msk, Blk *b, Ins *i, Loc *il)
- while (i > b->ins) {
- --i;
- if (killsl(i->to, sl)
-- || (i->op == Ocall && escapes(sl.ref, curf)))
-+ || ((i->op == Ocall || i->op == Ovacall) && escapes(sl.ref, curf)))
- goto Load;
- ld = isload(i->op);
- if (ld) {
---
-2.21.0
-
diff --git a/pkg/qbe/ver b/pkg/qbe/ver
@@ -1 +1 @@
-a85fe6e2d9 r0
+ff4e5aab2c r0