From fb490a0bcc391cfc8f9d4bffc3e977232ac77808 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. llvm-svn: 316454 --- llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp | 1 + llvm/test/MC/PowerPC/ppc-separator.s | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 llvm/test/MC/PowerPC/ppc-separator.s diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp index d30bf1a..8ac461b 100644 --- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp +++ b/llvm/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/llvm/test/MC/PowerPC/ppc-separator.s b/llvm/test/MC/PowerPC/ppc-separator.s new file mode 100644 index 0000000..d2291ec --- /dev/null +++ b/llvm/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.7.4