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

Unified Diff: src/compiler/c-linkage.cc

Issue 1701593003: [turbofan] Enforce that C calls do not use floating point params. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | test/unittests/compiler/instruction-selector-unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/c-linkage.cc
diff --git a/src/compiler/c-linkage.cc b/src/compiler/c-linkage.cc
index cb47a7228d4e3ad5ba45fb9e5f94ad386a4b8b60..e79639348b6530725344bd7ce1d58b1a75e4a0d1 100644
--- a/src/compiler/c-linkage.cc
+++ b/src/compiler/c-linkage.cc
@@ -136,20 +136,19 @@ CallDescriptor* Linkage::GetSimplifiedCDescriptor(
Zone* zone, const MachineSignature* msig, bool set_initialize_root_flag) {
LocationSignature::Builder locations(zone, msig->return_count(),
msig->parameter_count());
-#if 0 // TODO(titzer): instruction selector tests break here.
// Check the types of the signature.
// Currently no floating point parameters or returns are allowed because
// on x87 and ia32, the FP top of stack is involved.
-
for (size_t i = 0; i < msig->return_count(); i++) {
- MachineType type = RepresentationOf(msig->GetReturn(i));
- CHECK(type != kRepFloat32 && type != kRepFloat64);
+ MachineRepresentation rep = msig->GetReturn(i).representation();
+ CHECK_NE(MachineRepresentation::kFloat32, rep);
+ CHECK_NE(MachineRepresentation::kFloat64, rep);
}
for (size_t i = 0; i < msig->parameter_count(); i++) {
- MachineType type = RepresentationOf(msig->GetParam(i));
- CHECK(type != kRepFloat32 && type != kRepFloat64);
+ MachineRepresentation rep = msig->GetParam(i).representation();
+ CHECK_NE(MachineRepresentation::kFloat32, rep);
+ CHECK_NE(MachineRepresentation::kFloat64, rep);
}
-#endif
#ifdef UNSUPPORTED_C_LINKAGE
// This method should not be called on unknown architectures.
« no previous file with comments | « no previous file | test/unittests/compiler/instruction-selector-unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698