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

Unified Diff: src/IceTargetLoweringX86Base.h

Issue 1326013002: Refactor Lo and Hi out of Variable. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Refactor Hi and Lo out of Variable Created 5 years, 3 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 | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX86Base.h
diff --git a/src/IceTargetLoweringX86Base.h b/src/IceTargetLoweringX86Base.h
index 32c3e3bc5f4fdb860dcdc70b0e52489ab4043632..eb4eedd4a056b38a279e4a576a5547e5523d2118 100644
--- a/src/IceTargetLoweringX86Base.h
+++ b/src/IceTargetLoweringX86Base.h
@@ -92,6 +92,10 @@ public:
return Utils::applyAlignment(typeWidthInBytes(Ty), WordSizeInBytes);
}
+ bool shouldSplitToVariable64On32(Type Ty) const override {
+ return Traits::Is64Bit ? false : Ty == IceType_i64;
+ }
+
SizeT getMinJumpTableSize() const override { return 4; }
void emitVariable(const Variable *Var) const override;
@@ -104,21 +108,6 @@ public:
void emit(const ConstantDouble *C) const final;
void initNodeForLowering(CfgNode *Node) override;
- /// x86-32: Ensure that a 64-bit Variable has been split into 2 32-bit
- /// Variables, creating them if necessary. This is needed for all I64
- /// operations, and it is needed for pushing F64 arguments for function calls
- /// using the 32-bit push instruction (though the latter could be done by
- /// directly writing to the stack).
- ///
- /// x86-64: Complains loudly if invoked because the cpu can handle 64-bit
- /// types natively.
- template <typename T = Traits>
- typename std::enable_if<!T::Is64Bit, void>::type split64(Variable *Var);
- template <typename T = Traits>
- typename std::enable_if<T::Is64Bit, void>::type split64(Variable *) {
- llvm::report_fatal_error(
- "Hey, yo! This is x86-64. Watcha doin'? (split64)");
- }
template <typename T = Traits>
typename std::enable_if<!T::Is64Bit, Operand>::type *
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698