Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp

Issue 183273009: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp ('k') | lib/Target/R600/Processors.td » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
diff --git a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
index cb4cf0ce3886d9d721fb8b299ed9a5f74584aae2..271a97473445f1a347dd2700f30a83194cb388ae 100644
--- a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
+++ b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
@@ -36,12 +36,13 @@ class R600MCCodeEmitter : public AMDGPUMCCodeEmitter {
const MCInstrInfo &MCII;
const MCRegisterInfo &MRI;
const MCSubtargetInfo &STI;
+ MCContext &Ctx;
public:
R600MCCodeEmitter(const MCInstrInfo &mcii, const MCRegisterInfo &mri,
- const MCSubtargetInfo &sti)
- : MCII(mcii), MRI(mri), STI(sti) { }
+ const MCSubtargetInfo &sti, MCContext &ctx)
+ : MCII(mcii), MRI(mri), STI(sti), Ctx(ctx) { }
/// \brief Encode the instruction and write it to the OS.
virtual void EncodeInstruction(const MCInst &MI, raw_ostream &OS,
@@ -98,8 +99,9 @@ enum TextureTypes {
MCCodeEmitter *llvm::createR600MCCodeEmitter(const MCInstrInfo &MCII,
const MCRegisterInfo &MRI,
- const MCSubtargetInfo &STI) {
- return new R600MCCodeEmitter(MCII, MRI, STI);
+ const MCSubtargetInfo &STI,
+ MCContext &Ctx) {
+ return new R600MCCodeEmitter(MCII, MRI, STI, Ctx);
}
void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
@@ -179,13 +181,6 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
Emit((u_int32_t) 0, OS);
} else {
uint64_t Inst = getBinaryCodeForInstr(MI, Fixups);
- if ((STI.getFeatureBits() & AMDGPU::FeatureR600ALUInst) &&
- ((Desc.TSFlags & R600_InstFlag::OP1) ||
- Desc.TSFlags & R600_InstFlag::OP2)) {
- uint64_t ISAOpCode = Inst & (0x3FFULL << 39);
- Inst &= ~(0x3FFULL << 39);
- Inst |= ISAOpCode << 1;
- }
Emit(Inst, OS);
}
}
« no previous file with comments | « lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp ('k') | lib/Target/R600/Processors.td » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698