1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/CodeGen/PowerPC/aix-emit-tracebacktable-vectorinfo_hasvarg.ll
zhijian 606d7e2aeb [AIX][XCOFF] Use bit order of has_vec and longtbtable bits as defined in AIX header debug.h
Summary:

  The bit order of the has_vec and longtbtable bits in the traceback table generated by the XL compiler flipped at some point after v12.1. This is different from the definition is the AIX header debug.h. The change in the XL compiler that caused the deviation from the OS header definition was unintentional. Since both orderings are extant and the XL compiler runtime also expects the ordering defined by the OS, we will correct the output from LLVM to match the defined ordering given by the OS (which is also consistent with the Assembler Language Reference). Mitigation for traceback tables encoded with the wrong ordering is required for either ordering.

Reviewers: XingXue, HubertTong
Differential Revision: https://reviews.llvm.org/D105487
2021-07-09 11:06:46 -04:00

37 lines
2.5 KiB
LLVM

; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr7 \
; RUN: -mattr=+altivec -vec-extabi -xcoff-traceback-table=true 2>&1 < %s | \
; RUN: FileCheck --check-prefixes=CHECK-ASM %s
;; void f(vector float vf, ...) {
;;}
define void @f(<4 x float> %vf, ...) #0 {
entry:
%vf.addr = alloca <4 x float>, align 16
store <4 x float> %vf, <4 x float>* %vf.addr, align 16
ret void
}
;CHECK-ASM: .vbyte 4, 0x00000000 # Traceback table begin
;CHECK-ASM-NEXT: .byte 0x00 # Version = 0
;CHECK-ASM-NEXT: .byte 0x09 # Language = CPlusPlus
;CHECK-ASM-NEXT: .byte 0x20 # -IsGlobaLinkage, -IsOutOfLineEpilogOrPrologue
;CHECK-ASM-NEXT: # +HasTraceBackTableOffset, -IsInternalProcedure
;CHECK-ASM-NEXT: # -HasControlledStorage, -IsTOCless
;CHECK-ASM-NEXT: # -IsFloatingPointPresent
;CHECK-ASM-NEXT: # -IsFloatingPointOperationLogOrAbortEnabled
;CHECK-ASM-NEXT: .byte 0x40 # -IsInterruptHandler, +IsFunctionNamePresent, -IsAllocaUsed
;CHECK-ASM-NEXT: # OnConditionDirective = 0, -IsCRSaved, -IsLRSaved
;CHECK-ASM-NEXT: .byte 0x80 # +IsBackChainStored, -IsFixup, NumOfFPRsSaved = 0
;CHECK-ASM-NEXT: .byte 0x40 # -HasExtensionTable, +HasVectorInfo, NumOfGPRsSaved = 0
;CHECK-ASM-NEXT: .byte 0x00 # NumberOfFixedParms = 0
;CHECK-ASM-NEXT: .byte 0x01 # NumberOfFPParms = 0, +HasParmsOnStack
;CHECK-ASM-NEXT: .vbyte 4, L..f0-.f # Function size
;CHECK-ASM-NEXT: .vbyte 2, 0x0001 # Function name len = 1
;CHECK-ASM-NEXT: .byte 102 # Function Name
;CHECK-ASM-NEXT: .byte 0x01 # NumOfVRsSaved = 0, -IsVRSavedOnStack, +HasVarArgs
;CHECK-ASM-NEXT: .byte 0x03 # NumOfVectorParams = 1, +HasVMXInstruction
;CHECK-ASM-NEXT: .vbyte 4, 0xc0000000 # Vector Parameter type = vf
;CHECK-ASM-NEXT: .vbyte 2, 0x0000 # Padding
;CHECK-ASM-NEXT: # -- End function