[PATCH] D56634: [MSP430] Recoginze '{' as a line separator

Kristina Bessonova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 12 03:00:59 PST 2019


krisb created this revision.
krisb added a reviewer: asl.
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D56634

Files:
  lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
  test/MC/MSP430/msp430-separator.s


Index: test/MC/MSP430/msp430-separator.s
===================================================================
--- /dev/null
+++ 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
Index: lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
===================================================================
--- lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
+++ lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
@@ -20,6 +20,7 @@
   CodePointerSize = CalleeSaveStackSlotSize = 2;
 
   CommentString = ";";
+  SeparatorString = "{";
 
   AlignmentIsInBytes = false;
   UsesELFSectionDirectiveForBSS = true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56634.181431.patch
Type: text/x-patch
Size: 1019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190112/be0fbce4/attachment.bin>


More information about the llvm-commits mailing list