summary refs log tree commit diff
path: root/arm64
diff options
context:
space:
mode:
Diffstat (limited to 'arm64')
-rw-r--r--arm64/emit.c3
-rw-r--r--arm64/isel.c13
2 files changed, 7 insertions, 9 deletions
diff --git a/arm64/emit.c b/arm64/emit.c
index 38b7e1a..4a0316c 100644
--- a/arm64/emit.c
+++ b/arm64/emit.c
@@ -561,6 +561,9 @@ arm64_emitfn(Fn *fn, FILE *out)
 			emitins(i, e);
 		lbl = 1;
 		switch (b->jmp.type) {
+		case Jhlt:
+			fprintf(e->f, "\tbrk\t#1000\n");
+			break;
 		case Jret0:
 			s = (e->frame - e->padding) / 4;
 			for (r=arm64_rclob; *r>=0; r++)
diff --git a/arm64/isel.c b/arm64/isel.c
index 9b062d8..062beb3 100644
--- a/arm64/isel.c
+++ b/arm64/isel.c
@@ -239,16 +239,11 @@ seljmp(Blk *b, Fn *fn)
 	Ins *i, *ir;
 	int ck, cc, use;
 
-	switch (b->jmp.type) {
-	default:
-		assert(0 && "TODO 2");
-		break;
-	case Jret0:
-	case Jjmp:
+	if (b->jmp.type == Jret0
+	|| b->jmp.type == Jjmp
+	|| b->jmp.type == Jhlt)
 		return;
-	case Jjnz:
-		break;
-	}
+	assert(b->jmp.type == Jjnz);
 	r = b->jmp.arg;
 	use = -1;
 	b->jmp.arg = R;