1# RUN: llvm-mc -triple powerpc64-unknown-linux-gnu --filetype=obj -o - %s | \ 2# RUN: llvm-objdump -D -r - | FileCheck --check-prefix=CHECK-BE %s 3# RUN: llvm-mc -triple powerpc64le-unknown-linux-gnu --filetype=obj -o - %s | \ 4# RUN: llvm-objdump -D -r - | FileCheck --check-prefix=CHECK-LE %s 5 6# The purpose of this test is to check that when an alignment nop is added 7# it is added correctly with resepect to the labels in the .s file. 8# The test contains 3 labels at the end (1:, 2:, 3:). The label 2: is on the 9# same line as an unaligned 8 byte instruction. The desired behaviour is to have 10# the alignment nop inserted after the 1: label but before the 2: label. The 11# branch to 1: should jump to 3c: and the branch to 2: should jump to 40:. 12 13 .text 14_start: 15 b 1f; 16 b 2f; 17 b 3f; 18# CHECK-BE: 0: 48 00 00 3c 19# CHECK-BE-NEXT: 4: 48 00 00 3c 20# CHECK-BE-NEXT: 8: 48 00 00 40 21# CHECK-LE: 0: 3c 00 00 48 22# CHECK-LE-NEXT: 4: 3c 00 00 48 23# CHECK-LE-NEXT: 8: 40 00 00 48 24 trap 25 trap 26 trap 27 trap 28 trap 29 trap 30 trap 31 trap 32 trap 33 trap 34 trap 35 trap 361: 372: paddi 1, 2, 8589934576, 0 # 8 Byte Instruction 383: 39 blr 40# CHECK-BE: 3c: 60 00 00 00 nop 41# CHECK-BE-NEXT: 40: 06 01 ff ff 42# CHECK-BE-NEXT: 44: 38 22 ff f0 43# CHECK-BE-NEXT: 48: 4e 80 00 20 44# CHECK-LE: 3c: 00 00 00 60 nop 45# CHECK-LE-NEXT: 40: ff ff 01 06 46# CHECK-LE-NEXT: 44: f0 ff 22 38 47# CHECK-LE-NEXT: 48: 20 00 80 4e 48 49