diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-07-09 07:59:25 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-07-09 07:59:25 +0000 |
commit | ff16df71f50231c79c379a146dc55b4d6867cbd9 (patch) | |
tree | f10fb5043fcbfeb17e088715c5e23d31d4078783 /test/MC/PowerPC | |
parent | 11c29bafd584da2e39ee5d885ca2d53035bc1372 (diff) |
[PowerPC] Support .llong and fix .word
This adds support for the .llong PowerPC-specifc assembler directive.
In doing so, I notices that .word is currently incorrect: it is
supposed to define a 2-byte data element, not a 4-byte one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/PowerPC')
-rw-r--r-- | test/MC/PowerPC/ppc-llong.s | 28 | ||||
-rw-r--r-- | test/MC/PowerPC/ppc-word.s | 28 | ||||
-rw-r--r-- | test/MC/PowerPC/ppc64-fixup-apply.s | 2 |
3 files changed, 57 insertions, 1 deletions
diff --git a/test/MC/PowerPC/ppc-llong.s b/test/MC/PowerPC/ppc-llong.s new file mode 100644 index 00000000000..0838e424fba --- /dev/null +++ b/test/MC/PowerPC/ppc-llong.s @@ -0,0 +1,28 @@ + +# RUN: llvm-mc -triple powerpc-unknown-unknown -filetype=obj %s | \ +# RUN: llvm-readobj -s -sd | FileCheck %s +# RUN: llvm-mc -triple powerpc64-unknown-unknown -filetype=obj %s | \ +# RUN: llvm-readobj -s -sd | FileCheck %s + +.data +.llong 0 + +# CHECK: Section { +# CHECK: Name: .data +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ +# CHECK-NEXT: SHF_ALLOC +# CHECK-NEXT: SHF_WRITE +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: +# CHECK-NEXT: Size: 8 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 4 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 00000000 00000000 +# CHECK-NEXT: ) +# CHECK-NEXT: } + diff --git a/test/MC/PowerPC/ppc-word.s b/test/MC/PowerPC/ppc-word.s new file mode 100644 index 00000000000..773fa14bc41 --- /dev/null +++ b/test/MC/PowerPC/ppc-word.s @@ -0,0 +1,28 @@ + +# RUN: llvm-mc -triple powerpc-unknown-unknown -filetype=obj %s | \ +# RUN: llvm-readobj -s -sd | FileCheck %s +# RUN: llvm-mc -triple powerpc64-unknown-unknown -filetype=obj %s | \ +# RUN: llvm-readobj -s -sd | FileCheck %s + +.data +.word 0 + +# CHECK: Section { +# CHECK: Name: .data +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ +# CHECK-NEXT: SHF_ALLOC +# CHECK-NEXT: SHF_WRITE +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: +# CHECK-NEXT: Size: 2 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 4 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 0000 +# CHECK-NEXT: ) +# CHECK-NEXT: } + diff --git a/test/MC/PowerPC/ppc64-fixup-apply.s b/test/MC/PowerPC/ppc64-fixup-apply.s index 8d3a980116b..ba141e4227a 100644 --- a/test/MC/PowerPC/ppc64-fixup-apply.s +++ b/test/MC/PowerPC/ppc64-fixup-apply.s @@ -48,7 +48,7 @@ addis 1, 1, target7@highesta .data .quad v1 -.word v2 +.long v2 .short v3 .byte v4 |