mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
262321d1ff
This patch lets the llvm tools handle the new HVX target features that are added by frontend (clang). The target-features are of the form "hvx-length64b" for 64 Byte HVX mode, "hvx-length128b" for 128 Byte mode HVX. "hvx-double" is an alias to "hvx-length128b" and is soon will be deprecated. The hvx version target feature is upgated form "+hvx" to "+hvxv{version_number}. Eg: "+hvxv62" For the correct HVX code generation, the user must use the following target features. For 64B mode: "+hvxv62" "+hvx-length64b" For 128B mode: "+hvxv62" "+hvx-length128b" Clang picks a default length if none is specified. If for some reason, no hvx-length is specified to llvm, the compilation will bail out. There is a corresponding clang patch. Differential Revision: https://reviews.llvm.org/D38851 llvm-svn: 316101
61 lines
1.3 KiB
ArmAsm
61 lines
1.3 KiB
ArmAsm
# RUN: llvm-mc -triple=hexagon -filetype=obj -mhvx %s | llvm-objdump -mhvx -d - | FileCheck %s
|
|
|
|
# Verify that the .align directive emits the proper insn packets.
|
|
|
|
{ r1 = sub(#1, r1) }
|
|
# CHECK: 76414021 { r1 = sub(#1,r1)
|
|
# CHECK-NEXT: 7f004000 nop
|
|
# CHECK-NEXT: 7f004000 nop
|
|
# CHECK-NEXT: 7f00c000 nop }
|
|
|
|
.align 16
|
|
{ r1 = sub(#1, r1)
|
|
r2 = sub(#1, r2) }
|
|
# CHECK: 76414021 { r1 = sub(#1,r1)
|
|
# CHECK-NEXT: 76424022 r2 = sub(#1,r2)
|
|
# CHECK-NEXT: 7f004000 nop
|
|
# CHECK-NEXT: 7f00c000 nop }
|
|
|
|
.p2align 5
|
|
{ r1 = sub(#1, r1)
|
|
r2 = sub(#1, r2)
|
|
r3 = sub(#1, r3) }
|
|
# CHECK: 76434023 r3 = sub(#1,r3)
|
|
# CHECK-NEXT: 7f00c000 nop }
|
|
|
|
.align 16
|
|
{ r1 = sub(#1, r1)
|
|
r2 = sub(#1, r2)
|
|
r3 = sub(#1, r3)
|
|
r4 = sub(#1, r4) }
|
|
|
|
# Don't pad packets that can't be padded e.g. solo insts
|
|
# CHECK: 9200c020 { r0 = vextract(v0,r0) }
|
|
r0 = vextract(v0, r0)
|
|
.align 128
|
|
# CHECK: 76414021 { r1 = sub(#1,r1)
|
|
# CHECK-NEXT: 7f00c000 nop }
|
|
{ r1 = sub(#1, r1) }
|
|
|
|
#CHECK: { r1 = sub(#1,r1)
|
|
#CHECK: r2 = sub(#1,r2)
|
|
#CHECK: r3 = sub(#1,r3) }
|
|
.falign
|
|
.align 8
|
|
{ r1 = sub(#1, r1)
|
|
r2 = sub(#1, r2)
|
|
r3 = sub(#1, r3) }
|
|
|
|
# CHECK: { immext(#0)
|
|
# CHECK: r0 = sub(##1,r0)
|
|
# CHECK: immext(#0)
|
|
# CHECK: r1 = sub(##1,r1) }
|
|
# CHECK: { nop
|
|
# CHECK: nop
|
|
# CHECK: nop }
|
|
# CHECK: { r0 = sub(#1,r0) }
|
|
{ r0 = sub (##1, r0)
|
|
r1 = sub (##1, r1) }
|
|
.align 16
|
|
{ r0 = sub (#1, r0) }
|