From: Saleem Abdulrasool Date: Fri, 20 Dec 2013 07:21:16 +0000 (+0000) Subject: ARM IAS: add support for the .pool directive X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6692ce18e83ee2b4116d651eb3a9a557cd6a754f;p=oota-llvm.git ARM IAS: add support for the .pool directive The .pool directive is an alias for the .ltorg directive used to create a literal pool. Simply treat .pool as if .ltorg was passed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197787 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index e67311f655d..d3b6c78e17c 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -7910,7 +7910,7 @@ bool ARMAsmParser::ParseDirective(AsmToken DirectiveID) { return parseDirectiveInst(DirectiveID.getLoc(), 'n'); else if (IDVal == ".inst.w") return parseDirectiveInst(DirectiveID.getLoc(), 'w'); - else if (IDVal == ".ltorg") + else if (IDVal == ".ltorg" || IDVal == ".pool") return parseDirectiveLtorg(DirectiveID.getLoc()); return true; } @@ -8464,7 +8464,7 @@ bool ARMAsmParser::parseDirectiveInst(SMLoc Loc, char Suffix) { } /// parseDirectiveLtorg -/// ::= .ltorg +/// ::= .ltorg | .pool bool ARMAsmParser::parseDirectiveLtorg(SMLoc L) { MCStreamer &Streamer = getParser().getStreamer(); const MCSection *Section = Streamer.getCurrentSection().first; diff --git a/test/MC/ARM/pool.s b/test/MC/ARM/pool.s new file mode 100644 index 00000000000..926b4f10e4e --- /dev/null +++ b/test/MC/ARM/pool.s @@ -0,0 +1,18 @@ +@ RUN: llvm-mc -triple thumbv7-linux-gnueabi -o - %s | FileCheck %s + + .syntax unified + + .align 2 + .global pool + .type pool,%function +pool: + ldr r0, =0xba5eba11 + bx lr + .pool + +@ CHECK-LABEL: pool +@ CHECK: ldr r0, .Ltmp0 +@ CHECK: .align 2 +@ CHECK-LABEL: .Ltmp0: +@ CHECK: .long 3126770193 +