summary refs log tree commit diff
path: root/util.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-12-10 23:16:21 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-12-14 23:18:26 +0100
commit26c1c30b7d96d2170195970a8cdb3b024ba7421a (patch)
tree79c45ec28d63619fbe2a88ec2195f8fe4a95a8a5 /util.c
parent15e25a61b38b250c7543437a093a9efe076cce0a (diff)
downloadroux-26c1c30b7d96d2170195970a8cdb3b024ba7421a.tar.gz
new blit instruction
Diffstat (limited to 'util.c')
-rw-r--r--util.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/util.c b/util.c
index 41b2625..8432b5a 100644
--- a/util.c
+++ b/util.c
@@ -404,36 +404,6 @@ addcon(Con *c0, Con *c1)
 }
 
 void
-blit(Ref rdst, uint doff, Ref rsrc, uint boff, uint sz, Fn *fn)
-{
-	struct { int st, ld, cls, size; } *p, tbl[] = {
-		{ Ostorel, Oload,   Kl, 8 },
-		{ Ostorew, Oload,   Kw, 4 },
-		{ Ostoreh, Oloaduh, Kw, 2 },
-		{ Ostoreb, Oloadub, Kw, 1 }
-	};
-	Ref r, r1;
-	uint s;
-
-	for (p=tbl; sz; p++)
-		for (s=p->size; sz>=s; sz-=s, doff+=s, boff+=s) {
-			r = newtmp("blt", Kl, fn);
-			r1 = newtmp("blt", Kl, fn);
-			emit(p->st, 0, R, r, r1);
-			emit(Oadd, Kl, r1, rdst, getcon(doff, fn));
-			r1 = newtmp("blt", Kl, fn);
-			emit(p->ld, p->cls, r, r1, R);
-			emit(Oadd, Kl, r1, rsrc, getcon(boff, fn));
-		}
-}
-
-void
-blit0(Ref rdst, Ref rsrc, uint sz, Fn *fn)
-{
-	blit(rdst, 0, rsrc, 0, sz, fn);
-}
-
-void
 salloc(Ref rt, Ref rs, Fn *fn)
 {
 	Ref r0, r1;