47 lines · plain
1# RUN: llvm-mc -triple powerpc64-unknown-linux-gnu --filetype=obj -o - %s | \2# RUN: llvm-objdump -D -r - | FileCheck --check-prefix=CHECK-BE %s3# RUN: llvm-mc -triple powerpc64le-unknown-linux-gnu --filetype=obj -o - %s | \4# RUN: llvm-objdump -D -r - | FileCheck --check-prefix=CHECK-LE %s5 6# The purpose of this test is to check that when an alignment nop is added7# 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 the9# same line as an unaligned 8 byte instruction. The desired behaviour is to have10# the alignment nop inserted after the 1: label but before the 2: label. The11# branch to 1: should jump to 3c: and the branch to 2: should jump to 40:.12 13 .text14_start:15 b 1f;16 b 2f;17 b 3f;18# CHECK-BE: 0: 48 00 00 3c19# CHECK-BE-NEXT: 4: 48 00 00 3c20# CHECK-BE-NEXT: 8: 48 00 00 4021# CHECK-LE: 0: 3c 00 00 4822# CHECK-LE-NEXT: 4: 3c 00 00 4823# CHECK-LE-NEXT: 8: 40 00 00 4824 trap25 trap26 trap27 trap28 trap29 trap30 trap31 trap32 trap33 trap34 trap35 trap361:372: paddi 1, 2, 8589934576, 0 # 8 Byte Instruction383:39 blr40# CHECK-BE: 3c: 60 00 00 00 nop41# CHECK-BE-NEXT: 40: 06 01 ff ff 38 22 ff f0 paddi 1, 2, 8589934576, 042# CHECK-BE-NEXT: 48: 4e 80 00 2043# CHECK-LE: 3c: 00 00 00 60 nop44# CHECK-LE-NEXT: 40: ff ff 01 06 f0 ff 22 38 paddi 1, 2, 8589934576, 045# CHECK-LE-NEXT: 48: 20 00 80 4e46 47