From 67feb8cb261adcb0db53fdf2ccf7a5503553ee26 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 24 Oct 2017 16:19:56 +0000 Subject: [PATCH] PowerPC: support the separator character in the IAS PowerPC uses ; as a comment leader and the @ as a separator character. Support this properly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316454 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp | 1 + test/MC/PowerPC/ppc-separator.s | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 test/MC/PowerPC/ppc-separator.s diff --git a/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp b/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp index d30bf1a56e8..8ac461b96b8 100644 --- a/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp +++ b/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp @@ -24,6 +24,7 @@ PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit, const Triple& T) { } IsLittleEndian = false; + SeparatorString = "@"; CommentString = ";"; ExceptionsType = ExceptionHandling::DwarfCFI; diff --git a/test/MC/PowerPC/ppc-separator.s b/test/MC/PowerPC/ppc-separator.s new file mode 100644 index 00000000000..d2291ec6088 --- /dev/null +++ b/test/MC/PowerPC/ppc-separator.s @@ -0,0 +1,10 @@ +; RUN: llvm-mc -triple powerpc-apple-darwin -show-encoding -o - %s | FileCheck %s +; RUN: llvm-mc -triple powerpc64-apple-darwin -show-encoding -o - %s | FileCheck %s + +_label: + li r0, 0 @ li r1, 1 + +; CHECK: _label: +; CHECK: li r0, 0 ; encoding +; CHECK: li r1, 1 ; encoding + -- 2.50.1