Add x86 encoding for vconst

This commit is contained in:
Andrew Brown
2019-07-23 11:04:54 -07:00
committed by Dan Gohman
parent 684721ca29
commit 8d812b24cc
3 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
test compile
set enable_simd=true
set probestack_enabled=false
target x86_64 haswell
; use baldrdash calling convention here for simplicity (avoids prologue, epilogue)
function %test_vconst_i32() -> i32x4 baldrdash_system_v {
ebb0:
v0 = vconst.i32x4 0x1234
return v0
}
; check: ebb0:
; nextln: v0 = vconst.i32x4 0x1234
; nextln: return v0
; nextln: }

View File

@@ -0,0 +1,11 @@
test binemit
set opt_level=best
set enable_simd
target x86_64
function %test_vconst_b8() {
ebb0:
[-, %xmm2] v0 = vconst.b8x16 0x00 ; bin: 0f 10 15 00000008 PCRelRodata4(15)
[-, %xmm3] v1 = vconst.b8x16 0x01 ; bin: 0f 10 1d 00000011 PCRelRodata4(31)
return
}