mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.simd] simd: reorganize cvt rules
Comment and reorder rules for better bookkeeping. This CL changes nothing in the generated code. Change-Id: Iae04fda584a35fde5e3d54e4882d49614c9e4650 Reviewed-on: https://go-review.googlesource.com/c/go/+/697696 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
58cfc2a5f6
commit
6af8881adb
2 changed files with 34 additions and 35 deletions
|
|
@ -1,24 +1,24 @@
|
|||
!sum
|
||||
# Non-truncating conversions
|
||||
# Could be widening int<->int or uint<->uint conversions or float<->int|uint conversions.
|
||||
- go: ConvertToInt32
|
||||
commutative: false
|
||||
documentation: !string |-
|
||||
// NAME converts element values to int32.
|
||||
|
||||
- go: ConvertToUint32
|
||||
commutative: false
|
||||
documentation: !string |-
|
||||
// NAME converts element values to uint32.
|
||||
|
||||
- go: ConvertToUint16
|
||||
commutative: false
|
||||
documentation: !string |-
|
||||
// NAME converts element values to uint16.
|
||||
|
||||
# Truncating conversions, int<->int or uint<->uint.
|
||||
- go: ConvertToUint16x8
|
||||
commutative: false
|
||||
documentation: !string |-
|
||||
// NAME converts 8 lowest vector element values to uint16.
|
||||
|
||||
- go: ConvertToUint32x4
|
||||
commutative: false
|
||||
documentation: !string |-
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
!sum
|
||||
# Float <-> Int conversions
|
||||
# TODO: this right now only has Float32 -> Int32|Uint32, more to add.
|
||||
- go: ConvertToInt32
|
||||
asm: "VCVTTPS2DQ"
|
||||
in:
|
||||
|
|
@ -20,7 +22,9 @@
|
|||
base: uint
|
||||
elemBits: 32
|
||||
|
||||
- go: ConvertToUint16x8
|
||||
# Uint -> Uint widening conversions.
|
||||
# TODO: this right now only has uint8 -> uint16 and uint16->uint32.
|
||||
- go: ConvertToUint16
|
||||
asm: "VPMOVZXBW"
|
||||
in:
|
||||
- &u8x16
|
||||
|
|
@ -28,17 +32,7 @@
|
|||
elemBits: 8
|
||||
bits: 128
|
||||
out:
|
||||
-
|
||||
base: uint
|
||||
elemBits: 16
|
||||
bits: 128
|
||||
|
||||
- go: ConvertToUint16
|
||||
asm: "VPMOVZXBW"
|
||||
in:
|
||||
- *u8x16
|
||||
out:
|
||||
-
|
||||
- &u16x16
|
||||
base: uint
|
||||
elemBits: 16
|
||||
bits: 256
|
||||
|
|
@ -46,17 +40,17 @@
|
|||
- go: ConvertToUint16
|
||||
asm: "VPMOVZXBW"
|
||||
in:
|
||||
-
|
||||
- &u8x32
|
||||
base: uint
|
||||
elemBits: 8
|
||||
bits: 256
|
||||
out:
|
||||
-
|
||||
- &u16x32
|
||||
base: uint
|
||||
elemBits: 16
|
||||
bits: 512
|
||||
|
||||
- go: ConvertToUint32x4
|
||||
- go: ConvertToUint32
|
||||
asm: "VPMOVZXWD"
|
||||
in:
|
||||
- &u16x8
|
||||
|
|
@ -64,30 +58,35 @@
|
|||
elemBits: 16
|
||||
bits: 128
|
||||
out:
|
||||
-
|
||||
- &u32x8
|
||||
base: uint
|
||||
elemBits: 32
|
||||
bits: 128
|
||||
bits: 256
|
||||
|
||||
- go: ConvertToUint32
|
||||
asm: "VPMOVZXWD"
|
||||
in:
|
||||
- *u16x16
|
||||
out:
|
||||
- &u32x16
|
||||
base: uint
|
||||
elemBits: 32
|
||||
bits: 512
|
||||
|
||||
# Truncating conversions.
|
||||
# TODO: this right now only has uint8->uint16 and uint16->uint32.
|
||||
- go: ConvertToUint16x8
|
||||
asm: "VPMOVZXBW"
|
||||
in:
|
||||
- *u8x16
|
||||
out:
|
||||
- *u16x8
|
||||
- go: ConvertToUint32x4
|
||||
asm: "VPMOVZXWD"
|
||||
in:
|
||||
- *u16x8
|
||||
out:
|
||||
-
|
||||
- &u32x4
|
||||
base: uint
|
||||
elemBits: 32
|
||||
bits: 256
|
||||
|
||||
- go: ConvertToUint32
|
||||
asm: "VPMOVZXWD"
|
||||
in:
|
||||
-
|
||||
base: uint
|
||||
elemBits: 16
|
||||
bits: 256
|
||||
out:
|
||||
-
|
||||
base: uint
|
||||
elemBits: 32
|
||||
bits: 512
|
||||
bits: 128
|
||||
Loading…
Add table
Add a link
Reference in a new issue