1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[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
This commit is contained in:
Daniel Cederman 2018-05-28 12:42:55 +00:00
parent 6aee8a0262
commit 58eb55fce6
2 changed files with 8 additions and 0 deletions

View File

@ -109,7 +109,9 @@ public:
const MCTargetOptions &Options)
: MCTargetAsmParser(Options, sti, MII), Parser(parser) {
Parser.addAliasForDirective(".half", ".2byte");
Parser.addAliasForDirective(".uahalf", ".2byte");
Parser.addAliasForDirective(".word", ".4byte");
Parser.addAliasForDirective(".uaword", ".4byte");
Parser.addAliasForDirective(".nword", is64Bit() ? ".8byte" : ".4byte");
if (is64Bit())
Parser.addAliasForDirective(".xword", ".8byte");

View File

@ -9,13 +9,19 @@
! 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