summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp4
-rw-r--r--llvm/test/MC/ARM/pool.s18
2 files changed, 20 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index e67311f655d..d3b6c78e17c 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/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/llvm/test/MC/ARM/pool.s b/llvm/test/MC/ARM/pool.s
new file mode 100644
index 00000000000..926b4f10e4e
--- /dev/null
+++ b/llvm/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
+
OpenPOWER on IntegriCloud