Add x86 encoding for vconst
This commit is contained in:
16
cranelift/filetests/filetests/isa/x86/compile-vconst.clif
Normal file
16
cranelift/filetests/filetests/isa/x86/compile-vconst.clif
Normal 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: }
|
||||
11
cranelift/filetests/filetests/isa/x86/vconst.clif
Normal file
11
cranelift/filetests/filetests/isa/x86/vconst.clif
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user