[llvm-branch-commits] [llvm-branch] r231464 - Revert r231463 and r231462.
Daniel Sanders
daniel.sanders at imgtec.com
Fri Mar 6 03:47:55 PST 2015
Author: dsanders
Date: Fri Mar 6 05:47:54 2015
New Revision: 231464
URL: http://llvm.org/viewvc/llvm-project?rev=231464&view=rev
Log:
Revert r231463 and r231462.
The build fails after merging them due to two missing functions.
Added:
llvm/branches/release_35/test/CodeGen/Mips/fptr2.ll
- copied unchanged from r231461, llvm/branches/release_35/test/CodeGen/Mips/fptr2.ll
Removed:
llvm/branches/release_35/test/CodeGen/Mips/inlineasm-assembler-directives.ll
Modified:
llvm/branches/release_35/include/llvm/CodeGen/AsmPrinter.h
llvm/branches/release_35/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
llvm/branches/release_35/lib/Target/Mips/Mips16HardFloat.cpp
llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp
llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.h
llvm/branches/release_35/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll
llvm/branches/release_35/test/CodeGen/Mips/inlineasmmemop.ll
Modified: llvm/branches/release_35/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/include/llvm/CodeGen/AsmPrinter.h?rev=231464&r1=231463&r2=231464&view=diff
==============================================================================
--- llvm/branches/release_35/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/branches/release_35/include/llvm/CodeGen/AsmPrinter.h Fri Mar 6 05:47:54 2015
@@ -461,10 +461,6 @@ public:
unsigned AsmVariant, const char *ExtraCode,
raw_ostream &OS);
- /// Let the target do anything it needs to do before emitting inlineasm.
- /// \p StartInfo - the subtarget info before parsing inline asm
- virtual void emitInlineAsmStart(const MCSubtargetInfo &StartInfo) const;
-
/// Let the target do anything it needs to do after emitting inlineasm.
/// This callback can be used restore the original mode in case the
/// inlineasm contains directives to switch modes.
Modified: llvm/branches/release_35/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp?rev=231464&r1=231463&r2=231464&view=diff
==============================================================================
--- llvm/branches/release_35/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (original)
+++ llvm/branches/release_35/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Fri Mar 6 05:47:54 2015
@@ -89,7 +89,6 @@ void AsmPrinter::EmitInlineAsm(StringRef
assert(MCAI && "No MCAsmInfo");
if (!MCAI->useIntegratedAssembler() &&
!OutStreamer.isIntegratedAssemblerRequired()) {
- emitInlineAsmStart(TM.getSubtarget<MCSubtargetInfo>());
OutStreamer.EmitRawText(Str);
emitInlineAsmEnd(TM.getSubtarget<MCSubtargetInfo>(), nullptr);
return;
@@ -148,7 +147,6 @@ void AsmPrinter::EmitInlineAsm(StringRef
Parser->setAssemblerDialect(Dialect);
Parser->setTargetParser(*TAP.get());
- emitInlineAsmStart(STIOrig);
// Don't implicitly switch to the text section before the asm.
int Res = Parser->Run(/*NoInitialTextSection*/ true,
/*NoFinalize*/ true);
@@ -563,7 +561,5 @@ bool AsmPrinter::PrintAsmMemoryOperand(c
return true;
}
-void AsmPrinter::emitInlineAsmStart(const MCSubtargetInfo &StartInfo) const {}
-
void AsmPrinter::emitInlineAsmEnd(const MCSubtargetInfo &StartInfo,
const MCSubtargetInfo *EndInfo) const {}
Modified: llvm/branches/release_35/lib/Target/Mips/Mips16HardFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/lib/Target/Mips/Mips16HardFloat.cpp?rev=231464&r1=231463&r2=231464&view=diff
==============================================================================
--- llvm/branches/release_35/lib/Target/Mips/Mips16HardFloat.cpp (original)
+++ llvm/branches/release_35/lib/Target/Mips/Mips16HardFloat.cpp Fri Mar 6 05:47:54 2015
@@ -458,6 +458,7 @@ static void createFPFnStub(Function *F,
FStub->setSection(SectionName);
BasicBlock *BB = BasicBlock::Create(Context, "entry", FStub);
InlineAsmHelper IAH(Context, BB);
+ IAH.Out(" .set macro");
if (PicMode) {
IAH.Out(".set noreorder");
IAH.Out(".cpload $$25");
@@ -466,6 +467,7 @@ static void createFPFnStub(Function *F,
IAH.Out("la $$25," + LocalName);
}
else {
+ IAH.Out(".set reorder");
IAH.Out("la $$25," + Name);
}
swapFPIntParams(PV, M, IAH, LE, false);
Modified: llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp?rev=231464&r1=231463&r2=231464&view=diff
==============================================================================
--- llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.cpp Fri Mar 6 05:47:54 2015
@@ -53,7 +53,7 @@ using namespace llvm;
#define DEBUG_TYPE "mips-asm-printer"
-MipsTargetStreamer &MipsAsmPrinter::getTargetStreamer() const {
+MipsTargetStreamer &MipsAsmPrinter::getTargetStreamer() {
return static_cast<MipsTargetStreamer &>(*OutStreamer.getTargetStreamer());
}
@@ -721,29 +721,6 @@ void MipsAsmPrinter::EmitStartOfAsmFile(
Subtarget->isABI_O32());
}
-void MipsAsmPrinter::emitInlineAsmStart(
- const MCSubtargetInfo &StartInfo) const {
- MipsTargetStreamer &TS = getTargetStreamer();
-
- // GCC's choice of assembler options for inline assembly code ('at', 'macro'
- // and 'reorder') is different from LLVM's choice for generated code ('noat',
- // 'nomacro' and 'noreorder').
- // In order to maintain compatibility with inline assembly code which depends
- // on GCC's assembler options being used, we have to switch to those options
- // for the duration of the inline assembly block and then switch back.
- TS.emitDirectiveSetPush();
- TS.emitDirectiveSetAt();
- TS.emitDirectiveSetMacro();
- TS.emitDirectiveSetReorder();
- OutStreamer.AddBlankLine();
-}
-
-void MipsAsmPrinter::emitInlineAsmEnd(const MCSubtargetInfo &StartInfo,
- const MCSubtargetInfo *EndInfo) const {
- OutStreamer.AddBlankLine();
- getTargetStreamer().emitDirectiveSetPop();
-}
-
void MipsAsmPrinter::EmitJal(MCSymbol *Symbol) {
MCInst I;
I.setOpcode(Mips::JAL);
Modified: llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.h?rev=231464&r1=231463&r2=231464&view=diff
==============================================================================
--- llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.h (original)
+++ llvm/branches/release_35/lib/Target/Mips/MipsAsmPrinter.h Fri Mar 6 05:47:54 2015
@@ -31,7 +31,7 @@ class Module;
class raw_ostream;
class LLVM_LIBRARY_VISIBILITY MipsAsmPrinter : public AsmPrinter {
- MipsTargetStreamer &getTargetStreamer() const;
+ MipsTargetStreamer &getTargetStreamer();
void EmitInstrWithMacroNoAT(const MachineInstr *MI);
@@ -60,11 +60,6 @@ private:
std::map<const char *, const llvm::Mips16HardFloatInfo::FuncSignature *>
StubsNeeded;
- void emitInlineAsmStart(const MCSubtargetInfo &StartInfo) const override;
-
- void emitInlineAsmEnd(const MCSubtargetInfo &StartInfo,
- const MCSubtargetInfo *EndInfo) const override;
-
void EmitJal(MCSymbol *Symbol);
void EmitInstrReg(unsigned Opcode, unsigned Reg);
Removed: llvm/branches/release_35/test/CodeGen/Mips/inlineasm-assembler-directives.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/test/CodeGen/Mips/inlineasm-assembler-directives.ll?rev=231463&view=auto
==============================================================================
--- llvm/branches/release_35/test/CodeGen/Mips/inlineasm-assembler-directives.ll (original)
+++ llvm/branches/release_35/test/CodeGen/Mips/inlineasm-assembler-directives.ll (removed)
@@ -1,23 +0,0 @@
-; RUN: llc -march=mips < %s | FileCheck %s
-
-; Check for the emission of appropriate assembler directives before and
-; after the inline assembly code.
-define void @f() nounwind {
-entry:
-; CHECK: #APP
-; CHECK-NEXT: .set push
-; CHECK-NEXT: .set at
-; CHECK-NEXT: .set macro
-; CHECK-NEXT: .set reorder
-; CHECK: addi $9, ${{[2-9][0-9]?}}, 8
-; CHECK: subi ${{[2-9][0-9]?}}, $9, 6
-; CHECK: .set pop
-; CHECK-NEXT: #NO_APP
- %a = alloca i32, align 4
- %b = alloca i32, align 4
- store i32 20, i32* %a, align 4
- %0 = load i32* %a, align 4
- %1 = call i32 asm sideeffect "addi $$9, $1, 8\0A\09subi $0, $$9, 6", "=r,r,~{$1}"(i32 %0)
- store i32 %1, i32* %b, align 4
- ret void
-}
Modified: llvm/branches/release_35/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll?rev=231464&r1=231463&r2=231464&view=diff
==============================================================================
--- llvm/branches/release_35/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll (original)
+++ llvm/branches/release_35/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll Fri Mar 6 05:47:54 2015
@@ -32,10 +32,10 @@ entry:
; Now l with 1024: make sure register lo is picked. We do this by checking the instruction
; after the inline expression for a mflo to pull the value out of lo.
-; CHECK: #APP
-; CHECK: mtlo ${{[0-9]+}}
+; CHECK: #APP
+; CHECK-NEXT: mtlo ${{[0-9]+}}
; CHECK-NEXT: madd ${{[0-9]+}},${{[0-9]+}}
-; CHECK: #NO_APP
+; CHECK-NEXT: #NO_APP
; CHECK-NEXT: mflo ${{[0-9]+}}
%bosco = alloca i32, align 4
call i32 asm sideeffect "\09mtlo $3 \0A\09\09madd $1,$2 ", "=l,r,r,r"(i32 7, i32 6, i32 44) nounwind
Modified: llvm/branches/release_35/test/CodeGen/Mips/inlineasmmemop.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/test/CodeGen/Mips/inlineasmmemop.ll?rev=231464&r1=231463&r2=231464&view=diff
==============================================================================
--- llvm/branches/release_35/test/CodeGen/Mips/inlineasmmemop.ll (original)
+++ llvm/branches/release_35/test/CodeGen/Mips/inlineasmmemop.ll Fri Mar 6 05:47:54 2015
@@ -5,7 +5,6 @@
define i32 @f1(i32 %x) nounwind {
entry:
-; CHECK-LABEL: f1:
; CHECK: addiu $[[T0:[0-9]+]], $sp
; CHECK: #APP
; CHECK: sw $4, 0($[[T0]])
@@ -23,18 +22,17 @@ entry:
ret i32 %0
}
-; CHECK-LABEL: main:
; "D": Second word of double word. This works for any memory element
; double or single.
; CHECK: #APP
-; CHECK: lw ${{[0-9]+}},4(${{[0-9]+}});
-; CHECK: #NO_APP
+; CHECK-NEXT: lw ${{[0-9]+}},4(${{[0-9]+}});
+; CHECK-NEXT: #NO_APP
; No "D": First word of double word. This works for any memory element
; double or single.
; CHECK: #APP
-; CHECK: lw ${{[0-9]+}},0(${{[0-9]+}});
-; CHECK: #NO_APP
+; CHECK-NEXT: lw ${{[0-9]+}},0(${{[0-9]+}});
+; CHECK-NEXT: #NO_APP
;int b[8] = {0,1,2,3,4,5,6,7};
;int main()
More information about the llvm-branch-commits
mailing list