From 73cc65ab14c86ea34061c0206cf2b4a0f444e8e2 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Tue, 15 Jan 2019 20:10:46 +0000 Subject: [PATCH] [MSP430] Recognize '{' as a line separator msp430-as supports multiple assembly statements on the same line separated by a '{' character. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351233 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp | 1 + test/MC/MSP430/msp430-separator.s | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/MC/MSP430/msp430-separator.s diff --git a/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp b/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp index 82e6731ecd7..36e9a9c3107 100644 --- a/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp +++ b/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/test/MC/MSP430/msp430-separator.s b/test/MC/MSP430/msp430-separator.s new file mode 100644 index 00000000000..498e86e1df3 --- /dev/null +++ b/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 -- 2.50.1