-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PCC: x64: insertlane instructions read only scalar-sized values.
- Loading branch information
Showing
4 changed files
with
249 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
;;! target = "x86_64" | ||
;;! test = "compile" | ||
;;! flags = [ "-Oopt-level=0", "-Cpcc=y", "-Ccranelift-has-sse41=true", "-Ccranelift-has-avx=true" ] | ||
|
||
(module | ||
(memory 1 1) | ||
(func (param i32) (result v128) | ||
local.get 0 | ||
v128.const i32x4 0x29292928 0x206e6928 0x616d286d 0x206f7263 | ||
v128.load8_lane align=1 1) | ||
(func (param i32) (result v128) | ||
local.get 0 | ||
v128.const i32x4 0x29292928 0x206e6928 0x616d286d 0x206f7263 | ||
v128.load16_lane align=1 1) | ||
(func (param i32) (result v128) | ||
local.get 0 | ||
v128.const i32x4 0x29292928 0x206e6928 0x616d286d 0x206f7263 | ||
v128.load32_lane align=1 1) | ||
(func (param i32) (result v128) | ||
local.get 0 | ||
v128.const i32x4 0x29292928 0x206e6928 0x616d286d 0x206f7263 | ||
v128.load64_lane align=1 1)) | ||
;; function u0:0: | ||
;; pushq %rbp | ||
;; unwind PushFrameRegs { offset_upward_to_caller_sp: 16 } | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r10 | ||
;; movq 0(%r10), %r10 | ||
;; cmpq %rsp, %r10 | ||
;; jnbe #trap=stk_ovf | ||
;; unwind DefineNewFrame { offset_upward_to_caller_sp: 16, offset_downward_to_clobbers: 0 } | ||
;; block0: | ||
;; vmovdqu const(0), %xmm7 | ||
;; movl %edx, %r10d | ||
;; movq 80(%rdi), %r11 | ||
;; vpinsrb $1, %xmm7, 0(%r11,%r10,1), %xmm0 | ||
;; jmp label1 | ||
;; block1: | ||
;; movq %rbp, %rsp | ||
;; popq %rbp | ||
;; ret | ||
;; | ||
;; function u0:1: | ||
;; pushq %rbp | ||
;; unwind PushFrameRegs { offset_upward_to_caller_sp: 16 } | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r10 | ||
;; movq 0(%r10), %r10 | ||
;; cmpq %rsp, %r10 | ||
;; jnbe #trap=stk_ovf | ||
;; unwind DefineNewFrame { offset_upward_to_caller_sp: 16, offset_downward_to_clobbers: 0 } | ||
;; block0: | ||
;; vmovdqu const(0), %xmm7 | ||
;; movl %edx, %r10d | ||
;; movq 80(%rdi), %r11 | ||
;; vpinsrw $1, %xmm7, 0(%r11,%r10,1), %xmm0 | ||
;; jmp label1 | ||
;; block1: | ||
;; movq %rbp, %rsp | ||
;; popq %rbp | ||
;; ret | ||
;; | ||
;; function u0:2: | ||
;; pushq %rbp | ||
;; unwind PushFrameRegs { offset_upward_to_caller_sp: 16 } | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r10 | ||
;; movq 0(%r10), %r10 | ||
;; cmpq %rsp, %r10 | ||
;; jnbe #trap=stk_ovf | ||
;; unwind DefineNewFrame { offset_upward_to_caller_sp: 16, offset_downward_to_clobbers: 0 } | ||
;; block0: | ||
;; vmovdqu const(0), %xmm7 | ||
;; movl %edx, %r10d | ||
;; movq 80(%rdi), %r11 | ||
;; vpinsrd $1, %xmm7, 0(%r11,%r10,1), %xmm0 | ||
;; jmp label1 | ||
;; block1: | ||
;; movq %rbp, %rsp | ||
;; popq %rbp | ||
;; ret | ||
;; | ||
;; function u0:3: | ||
;; pushq %rbp | ||
;; unwind PushFrameRegs { offset_upward_to_caller_sp: 16 } | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r10 | ||
;; movq 0(%r10), %r10 | ||
;; cmpq %rsp, %r10 | ||
;; jnbe #trap=stk_ovf | ||
;; unwind DefineNewFrame { offset_upward_to_caller_sp: 16, offset_downward_to_clobbers: 0 } | ||
;; block0: | ||
;; vmovdqu const(0), %xmm7 | ||
;; movl %edx, %r10d | ||
;; movq 80(%rdi), %r11 | ||
;; vpinsrq $1, %xmm7, 0(%r11,%r10,1), %xmm0 | ||
;; jmp label1 | ||
;; block1: | ||
;; movq %rbp, %rsp | ||
;; popq %rbp | ||
;; ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
;;! target = "x86_64" | ||
;;! test = "compile" | ||
;;! flags = [ "-Oopt-level=0", "-Cpcc=y", "-Ccranelift-has-sse41=true", "-Ccranelift-has-avx=false" ] | ||
|
||
(module | ||
(memory 1 1) | ||
(func (param i32) (result v128) | ||
local.get 0 | ||
v128.const i32x4 0x29292928 0x206e6928 0x616d286d 0x206f7263 | ||
v128.load8_lane align=1 1) | ||
(func (param i32) (result v128) | ||
local.get 0 | ||
v128.const i32x4 0x29292928 0x206e6928 0x616d286d 0x206f7263 | ||
v128.load16_lane align=1 1) | ||
(func (param i32) (result v128) | ||
local.get 0 | ||
v128.const i32x4 0x29292928 0x206e6928 0x616d286d 0x206f7263 | ||
v128.load32_lane align=1 1) | ||
(func (param i32) (result v128) | ||
local.get 0 | ||
v128.const i32x4 0x29292928 0x206e6928 0x616d286d 0x206f7263 | ||
v128.load64_lane align=1 1)) | ||
;; function u0:0: | ||
;; pushq %rbp | ||
;; unwind PushFrameRegs { offset_upward_to_caller_sp: 16 } | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r10 | ||
;; movq 0(%r10), %r10 | ||
;; cmpq %rsp, %r10 | ||
;; jnbe #trap=stk_ovf | ||
;; unwind DefineNewFrame { offset_upward_to_caller_sp: 16, offset_downward_to_clobbers: 0 } | ||
;; block0: | ||
;; movdqu const(0), %xmm0 | ||
;; movl %edx, %r10d | ||
;; movq 80(%rdi), %r11 | ||
;; pinsrb $1, %xmm0, 0(%r11,%r10,1), %xmm0 | ||
;; jmp label1 | ||
;; block1: | ||
;; movq %rbp, %rsp | ||
;; popq %rbp | ||
;; ret | ||
;; | ||
;; function u0:1: | ||
;; pushq %rbp | ||
;; unwind PushFrameRegs { offset_upward_to_caller_sp: 16 } | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r10 | ||
;; movq 0(%r10), %r10 | ||
;; cmpq %rsp, %r10 | ||
;; jnbe #trap=stk_ovf | ||
;; unwind DefineNewFrame { offset_upward_to_caller_sp: 16, offset_downward_to_clobbers: 0 } | ||
;; block0: | ||
;; movdqu const(0), %xmm0 | ||
;; movl %edx, %r10d | ||
;; movq 80(%rdi), %r11 | ||
;; pinsrw $1, %xmm0, 0(%r11,%r10,1), %xmm0 | ||
;; jmp label1 | ||
;; block1: | ||
;; movq %rbp, %rsp | ||
;; popq %rbp | ||
;; ret | ||
;; | ||
;; function u0:2: | ||
;; pushq %rbp | ||
;; unwind PushFrameRegs { offset_upward_to_caller_sp: 16 } | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r10 | ||
;; movq 0(%r10), %r10 | ||
;; cmpq %rsp, %r10 | ||
;; jnbe #trap=stk_ovf | ||
;; unwind DefineNewFrame { offset_upward_to_caller_sp: 16, offset_downward_to_clobbers: 0 } | ||
;; block0: | ||
;; movdqu const(0), %xmm0 | ||
;; movl %edx, %r10d | ||
;; movq 80(%rdi), %r11 | ||
;; pinsrd $1, %xmm0, 0(%r11,%r10,1), %xmm0 | ||
;; jmp label1 | ||
;; block1: | ||
;; movq %rbp, %rsp | ||
;; popq %rbp | ||
;; ret | ||
;; | ||
;; function u0:3: | ||
;; pushq %rbp | ||
;; unwind PushFrameRegs { offset_upward_to_caller_sp: 16 } | ||
;; movq %rsp, %rbp | ||
;; movq 8(%rdi), %r10 | ||
;; movq 0(%r10), %r10 | ||
;; cmpq %rsp, %r10 | ||
;; jnbe #trap=stk_ovf | ||
;; unwind DefineNewFrame { offset_upward_to_caller_sp: 16, offset_downward_to_clobbers: 0 } | ||
;; block0: | ||
;; movdqu const(0), %xmm0 | ||
;; movl %edx, %r10d | ||
;; movq 80(%rdi), %r11 | ||
;; pinsrd.w $1, %xmm0, 0(%r11,%r10,1), %xmm0 | ||
;; jmp label1 | ||
;; block1: | ||
;; movq %rbp, %rsp | ||
;; popq %rbp | ||
;; ret |