mirror of
https://github.com/golang/go
synced 2024-11-17 04:14:52 -07:00
cmd/internal/obj/arm64: add TRN1 and TRN2 instructions support
Add test cases. Fixes #51628 Change-Id: I433367d87e6bb5da5579c4be540079b92701c1fa Reviewed-on: https://go-review.googlesource.com/c/go/+/392294 Trust: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Trust: Fannie Zhang <Fannie.Zhang@arm.com>
This commit is contained in:
parent
44a0da4ff1
commit
49f16625c8
4
src/cmd/asm/internal/asm/testdata/arm64.s
vendored
4
src/cmd/asm/internal/asm/testdata/arm64.s
vendored
@ -241,6 +241,10 @@ TEXT foo(SB), DUPOK|NOSPLIT, $-8
|
||||
FADDS F2, F3, F4 // 6428221e
|
||||
FADDD F1, F2 // 4228611e
|
||||
VDUP V19.S[0], V17.S4 // 7106044e
|
||||
VTRN1 V3.D2, V2.D2, V20.D2 // 5428c34e
|
||||
VTRN2 V3.D2, V2.D2, V21.D2 // 5568c34e
|
||||
VTRN1 V5.D2, V4.D2, V22.D2 // 9628c54e
|
||||
VTRN2 V5.D2, V4.D2, V23.D2 // 9768c54e
|
||||
|
||||
|
||||
// special
|
||||
|
@ -1053,6 +1053,8 @@ const (
|
||||
AVUADDW2
|
||||
AVUADDW
|
||||
AVUSRA
|
||||
AVTRN1
|
||||
AVTRN2
|
||||
ALAST
|
||||
AB = obj.AJMP
|
||||
ABL = obj.ACALL
|
||||
|
@ -537,5 +537,7 @@ var Anames = []string{
|
||||
"VUADDW2",
|
||||
"VUADDW",
|
||||
"VUSRA",
|
||||
"VTRN1",
|
||||
"VTRN2",
|
||||
"LAST",
|
||||
}
|
||||
|
@ -2985,6 +2985,8 @@ func buildop(ctxt *obj.Link) {
|
||||
|
||||
case AVZIP1:
|
||||
oprangeset(AVZIP2, t)
|
||||
oprangeset(AVTRN1, t)
|
||||
oprangeset(AVTRN2, t)
|
||||
|
||||
case AVUXTL:
|
||||
oprangeset(AVUXTL2, t)
|
||||
@ -6179,6 +6181,12 @@ func (c *ctxt7) oprrr(p *obj.Prog, a obj.As) uint32 {
|
||||
|
||||
case AVUADDW, AVUADDW2:
|
||||
return 0x17<<25 | 1<<21 | 1<<12
|
||||
|
||||
case AVTRN1:
|
||||
return 7<<25 | 5<<11
|
||||
|
||||
case AVTRN2:
|
||||
return 7<<25 | 1<<14 | 5<<11
|
||||
}
|
||||
|
||||
c.ctxt.Diag("%v: bad rrr %d %v", p, a, a)
|
||||
|
Loading…
Reference in New Issue
Block a user