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

Unified Diff: test/cctest/compiler/codegen-tester.h

Issue 470593002: Unify MachineType and RepType. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « test/cctest/compiler/call-tester.h ('k') | test/cctest/compiler/codegen-tester.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/codegen-tester.h
diff --git a/test/cctest/compiler/codegen-tester.h b/test/cctest/compiler/codegen-tester.h
index 300381b4939bc920fedc1d5888903785aa4d5c21..469f86c12c4a92ec531aab42ec1d22e9173289ec 100644
--- a/test/cctest/compiler/codegen-tester.h
+++ b/test/cctest/compiler/codegen-tester.h
@@ -91,11 +91,11 @@ class RawMachineAssemblerTester
: public MachineAssemblerTester<RawMachineAssembler>,
public CallHelper2<ReturnType, RawMachineAssemblerTester<ReturnType> > {
public:
- RawMachineAssemblerTester(MachineType p0 = kMachineLast,
- MachineType p1 = kMachineLast,
- MachineType p2 = kMachineLast,
- MachineType p3 = kMachineLast,
- MachineType p4 = kMachineLast)
+ RawMachineAssemblerTester(MachineType p0 = kMachNone,
+ MachineType p1 = kMachNone,
+ MachineType p2 = kMachNone,
+ MachineType p3 = kMachNone,
+ MachineType p4 = kMachNone)
: MachineAssemblerTester<RawMachineAssembler>(
ReturnValueTraits<ReturnType>::Representation(), p0, p1, p2, p3,
p4) {}
@@ -127,11 +127,11 @@ class StructuredMachineAssemblerTester
public CallHelper2<ReturnType,
StructuredMachineAssemblerTester<ReturnType> > {
public:
- StructuredMachineAssemblerTester(MachineType p0 = kMachineLast,
- MachineType p1 = kMachineLast,
- MachineType p2 = kMachineLast,
- MachineType p3 = kMachineLast,
- MachineType p4 = kMachineLast)
+ StructuredMachineAssemblerTester(MachineType p0 = kMachNone,
+ MachineType p1 = kMachNone,
+ MachineType p2 = kMachNone,
+ MachineType p3 = kMachNone,
+ MachineType p4 = kMachNone)
: MachineAssemblerTester<StructuredMachineAssembler>(
ReturnValueTraits<ReturnType>::Representation(), p0, p1, p2, p3,
p4) {}
@@ -201,15 +201,25 @@ class BinopTester {
// A helper class for testing code sequences that take two int parameters and
// return an int value.
class Int32BinopTester
- : public BinopTester<int32_t, kMachineWord32, USE_RETURN_REGISTER> {
+ : public BinopTester<int32_t, kMachInt32, USE_RETURN_REGISTER> {
public:
explicit Int32BinopTester(RawMachineAssemblerTester<int32_t>* tester)
- : BinopTester<int32_t, kMachineWord32, USE_RETURN_REGISTER>(tester) {}
+ : BinopTester<int32_t, kMachInt32, USE_RETURN_REGISTER>(tester) {}
+};
+
+
+// A helper class for testing code sequences that take two uint parameters and
+// return an uint value.
+class Uint32BinopTester
+ : public BinopTester<uint32_t, kMachUint32, USE_RETURN_REGISTER> {
+ public:
+ explicit Uint32BinopTester(RawMachineAssemblerTester<int32_t>* tester)
+ : BinopTester<uint32_t, kMachUint32, USE_RETURN_REGISTER>(tester) {}
- int32_t call(uint32_t a0, uint32_t a1) {
- p0 = static_cast<int32_t>(a0);
- p1 = static_cast<int32_t>(a1);
- return T->Call();
+ uint32_t call(uint32_t a0, uint32_t a1) {
+ p0 = a0;
+ p1 = a1;
+ return static_cast<uint32_t>(T->Call());
}
};
@@ -218,10 +228,10 @@ class Int32BinopTester
// return a double value.
// TODO(titzer): figure out how to return doubles correctly on ia32.
class Float64BinopTester
- : public BinopTester<double, kMachineFloat64, USE_RESULT_BUFFER> {
+ : public BinopTester<double, kMachFloat64, USE_RESULT_BUFFER> {
public:
explicit Float64BinopTester(RawMachineAssemblerTester<int32_t>* tester)
- : BinopTester<double, kMachineFloat64, USE_RESULT_BUFFER>(tester) {}
+ : BinopTester<double, kMachFloat64, USE_RESULT_BUFFER>(tester) {}
};
@@ -230,10 +240,10 @@ class Float64BinopTester
// TODO(titzer): pick word size of pointers based on V8_TARGET.
template <typename Type>
class PointerBinopTester
- : public BinopTester<Type*, kMachineWord32, USE_RETURN_REGISTER> {
+ : public BinopTester<Type*, kMachPtr, USE_RETURN_REGISTER> {
public:
explicit PointerBinopTester(RawMachineAssemblerTester<int32_t>* tester)
- : BinopTester<Type*, kMachineWord32, USE_RETURN_REGISTER>(tester) {}
+ : BinopTester<Type*, kMachPtr, USE_RETURN_REGISTER>(tester) {}
};
@@ -241,10 +251,10 @@ class PointerBinopTester
// return a tagged value.
template <typename Type>
class TaggedBinopTester
- : public BinopTester<Type*, kMachineTagged, USE_RETURN_REGISTER> {
+ : public BinopTester<Type*, kMachAnyTagged, USE_RETURN_REGISTER> {
public:
explicit TaggedBinopTester(RawMachineAssemblerTester<int32_t>* tester)
- : BinopTester<Type*, kMachineTagged, USE_RETURN_REGISTER>(tester) {}
+ : BinopTester<Type*, kMachAnyTagged, USE_RETURN_REGISTER>(tester) {}
};
// A helper class for testing compares. Wraps a machine opcode and provides
« no previous file with comments | « test/cctest/compiler/call-tester.h ('k') | test/cctest/compiler/codegen-tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698