aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <anton@korobeynikov.info>2019-01-15 20:10:46 +0000
committerAnton Korobeynikov <anton@korobeynikov.info>2019-01-15 20:10:46 +0000
commitc9e9e28487b217b4807929f2fcfd8aaa9feddb7b (patch)
tree6c9dd0effe5dc3de094ff05c06ccb234926d909f
parent3bbdd87c88d710bfb3e96cd8eabfaf3079c3f696 (diff)
[MSP430] Recognize '{' as a line separator
msp430-as supports multiple assembly statements on the same line separated by a '{' character. llvm-svn: 351233
-rw-r--r--llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp1
-rw-r--r--llvm/test/MC/MSP430/msp430-separator.s15
2 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
index 82e6731ecd78..36e9a9c31075 100644
--- a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
+++ b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
@@ -20,6 +20,7 @@ MSP430MCAsmInfo::MSP430MCAsmInfo(const Triple &TT) {
CodePointerSize = CalleeSaveStackSlotSize = 2;
CommentString = ";";
+ SeparatorString = "{";
AlignmentIsInBytes = false;
UsesELFSectionDirectiveForBSS = true;
diff --git a/llvm/test/MC/MSP430/msp430-separator.s b/llvm/test/MC/MSP430/msp430-separator.s
new file mode 100644
index 000000000000..498e86e1df3b
--- /dev/null
+++ b/llvm/test/MC/MSP430/msp430-separator.s
@@ -0,0 +1,15 @@
+; RUN: llvm-mc -triple msp430 < %s | FileCheck %s
+
+; MSP430 supports multiple assembly statements on the same line
+; separated by a '{' character.
+
+; Check that the '{' is recognized as a line separator and
+; multiple statements correctly parsed.
+
+_foo:
+; CHECK: foo
+; CHECK: add r10, r11
+; CHECK-NEXT: call r11
+; CHECK-NEXT: mov r11, 2(r1)
+add r10, r11 { call r11 { mov r11, 2(r1)
+ret