Intel encodings for trap.

Use a ud2 instruction which generates an undefined instruction
exception.
This commit is contained in:
Jakob Stoklund Olesen
2017-07-19 15:01:32 -07:00
parent b59b348a1e
commit 87c5f27ff7
5 changed files with 19 additions and 3 deletions

View File

@@ -364,5 +364,5 @@ ebb1:
; asm: ebb2:
ebb2:
jump ebb1 ; bin: eb fd
trap ; bin: 0f 0b
}

View File

@@ -626,5 +626,5 @@ ebb0:
; asm: movl %r10d, %ecx
[-,%rcx] v32 = uextend.i64 v13 ; bin: 44 89 d1
return
trap ; bin: 0f 0b
}

View File

@@ -43,3 +43,8 @@ ebb0(v0: i32):
ebb1(v2: i32):
return v2
}
function %undefined() {
ebb0:
trap
}