mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
9cf21dc31e
Summary: The standard data emission directives (e.g. .short, .long) in the AIX assembler have the unintended consequence of aligning their output to the natural byte boundary. This cause problems because we aren't expecting behavior from the Data*bitsDirectives, so the final alignment of data isn't correct in some cases on AIX. This patch updated the Data*bitsDirectives to use .vbyte pseudo-ops instead to emit the data, since we will emit the .align directives as needed. We update the existing testcases and add a test for emission of struct data. Reviewers: hubert.reinterpretcast, Xiangling_L, jasonliu Reviewed By: hubert.reinterpretcast, jasonliu Subscribers: wuzish, nemanjai, hiraditya, kbarton, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80934
35 lines
1.0 KiB
LLVM
35 lines
1.0 KiB
LLVM
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck --check-prefix=CHECK64 %s
|
|
|
|
@foo_ptr = global void (...)* @foo
|
|
declare void @foo(...)
|
|
|
|
@bar_ptr1 = global void (...)* bitcast (void ()* @bar to void (...)*)
|
|
define void @bar() {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
|
|
;CHECK: .csect .data[RW],2
|
|
;CHECK-NEXT: .globl foo_ptr
|
|
;CHECK-NEXT: .align 2
|
|
;CHECK-NEXT: foo_ptr:
|
|
;CHECK-NEXT: .vbyte 4, foo[DS]
|
|
;CHECK-NEXT: .globl bar_ptr1
|
|
;CHECK-NEXT: .align 2
|
|
;CHECK-NEXT: bar_ptr1:
|
|
;CHECK-NEXT: .vbyte 4, bar[DS]
|
|
;CHECK-NEXT: .extern foo[DS]
|
|
|
|
;CHECK64: .csect .data[RW],3
|
|
;CHECK64-NEXT: .globl foo_ptr
|
|
;CHECK64-NEXT: .align 3
|
|
;CHECK64-NEXT: foo_ptr:
|
|
;CHECK64-NEXT: .vbyte 8, foo[DS]
|
|
;CHECK64-NEXT: .globl bar_ptr1
|
|
;CHECK64-NEXT: .align 3
|
|
;CHECK64-NEXT: bar_ptr1:
|
|
;CHECK64-NEXT: .vbyte 8, bar[DS]
|
|
;CHECK64-NEXT: .extern foo[DS]
|