summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsTargetStreamer.h
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2016-05-11 12:48:19 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2016-05-11 12:48:19 +0000
commitdf8510d4fab89085da13e7502aad786a55e857f9 (patch)
tree6ae6d3c03e16afce79cb0e172a637de972b6b411 /llvm/lib/Target/Mips/MipsTargetStreamer.h
parent8b4b8c28c2b787a6b27f2e6b38818c481f04e0eb (diff)
downloadbcm5719-llvm-df8510d4fab89085da13e7502aad786a55e857f9.tar.gz
bcm5719-llvm-df8510d4fab89085da13e7502aad786a55e857f9.zip
[mips][ias] Fix N32 and N64 .cprestore directive when inside .set noat region.
Summary: r268058 unintentionally made the retrieval of the current assembler temporary unconditional. This was fine for the existing tests but it broke the cases where the assembler temporary is not needed (N32/N64 or not PIC) and is unavailable due to a '.set noat' directive. This fixes FreeBSD's libc. Reviewers: emaste, sdardis, seanbruno Subscribers: dsanders, emaste, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D20093 llvm-svn: 269179
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetStreamer.h')
-rw-r--r--llvm/lib/Target/Mips/MipsTargetStreamer.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetStreamer.h b/llvm/lib/Target/Mips/MipsTargetStreamer.h
index 2b39da6ade5..26f38829413 100644
--- a/llvm/lib/Target/Mips/MipsTargetStreamer.h
+++ b/llvm/lib/Target/Mips/MipsTargetStreamer.h
@@ -81,8 +81,9 @@ public:
// PIC support
virtual void emitDirectiveCpLoad(unsigned RegNo);
- virtual void emitDirectiveCpRestore(int Offset, unsigned ATReg, SMLoc IDLoc,
- const MCSubtargetInfo *STI);
+ virtual bool emitDirectiveCpRestore(int Offset,
+ std::function<unsigned()> GetATReg,
+ SMLoc IDLoc, const MCSubtargetInfo *STI);
virtual void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
const MCSymbol &Sym, bool IsReg);
virtual void emitDirectiveCpreturn(unsigned SaveLocation,
@@ -235,8 +236,8 @@ public:
// PIC support
void emitDirectiveCpLoad(unsigned RegNo) override;
- void emitDirectiveCpRestore(int Offset, unsigned ATReg, SMLoc IDLoc,
- const MCSubtargetInfo *STI) override;
+ bool emitDirectiveCpRestore(int Offset, std::function<unsigned()> GetATReg,
+ SMLoc IDLoc, const MCSubtargetInfo *STI) override;
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
const MCSymbol &Sym, bool IsReg) override;
void emitDirectiveCpreturn(unsigned SaveLocation,
@@ -290,8 +291,8 @@ public:
// PIC support
void emitDirectiveCpLoad(unsigned RegNo) override;
- void emitDirectiveCpRestore(int Offset, unsigned ATReg, SMLoc IDLoc,
- const MCSubtargetInfo *STI) override;
+ bool emitDirectiveCpRestore(int Offset, std::function<unsigned()> GetATReg,
+ SMLoc IDLoc, const MCSubtargetInfo *STI) override;
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
const MCSymbol &Sym, bool IsReg) override;
void emitDirectiveCpreturn(unsigned SaveLocation,
OpenPOWER on IntegriCloud