aboutsummaryrefslogtreecommitdiffhomepage
path: root/amd64/emit.c
diff options
context:
space:
mode:
Diffstat (limited to 'amd64/emit.c')
-rw-r--r--amd64/emit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/amd64/emit.c b/amd64/emit.c
index c7c6258..21a59b7 100644
--- a/amd64/emit.c
+++ b/amd64/emit.c
@@ -529,10 +529,11 @@ Xjcc(uchar **pcode, enum cc cc, struct block *dst)
}
static void
-Xsetcc(uchar **pcode, enum cc cc, int reg)
+Xsetcc(uchar **pcode, enum cc cc, enum reg reg)
{
int rex = 0;
assert(in_range(cc, 0x0, 0xF));
+ assert(in_range(reg, RAX, R15));
if (in_range(reg, RSP, RDI)) rex = 0x40;
rex |= (reg >> 3); /* REX.B */