1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
llvm-mirror/test/MC/Sparc/sparc-directives.s
Daniel Cederman 58eb55fce6 [Sparc] Add .uahalf and .uaword directives
Summary:
Adding these makes it easier to assemble the output from GCC which
generates a lot of .uahalf and .uaword directives.

GAS treats .uahalf and .half the same unless the --enforce-aligned-data
flag is used. I could not find a similar flag for LLVM so it seems that
.half does not have any alignment requirement and is treated the same as
.uahalf should be. If that would change later on then the tests in
sparc-directives.s would fail due to bad alignment.

Reviewers: jyknight, asb

Reviewed By: jyknight

Subscribers: fedor.sergeev, jrtc27, llvm-commits

Differential Revision: https://reviews.llvm.org/D47319

llvm-svn: 333372
2018-05-28 12:42:55 +00:00

30 lines
822 B
ArmAsm

! RUN: llvm-mc %s -arch=sparc -show-encoding | FileCheck %s --check-prefix=SPARC32
! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s --check-prefix=SPARC64
! '.proc' is documented to do nothing in the binutils assembler.
! so it should do nothing for clang either, i.e. not be an error.
.proc 1
! SPARC32: .byte 24
! SPARC64: .byte 24
.byte 24
! SPARC32: .half 1024
! SPARC64: .half 1024
! SPARC32: .half 1024
! SPARC64: .half 1024
.half 1024
.uahalf 1024
! SPARC32: .word 65536
! SPARC64: .word 65536
! SPARC32: .word 65536
! SPARC64: .word 65536
.word 65536
.uaword 65536
! SPARC32: .word 65536
! SPARC64: .xword 65536
.nword 65536