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

Unified Diff: src/arm/constants-arm.h

Issue 7489045: ARM: Fast path for compare against constant. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 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 | src/arm/lithium-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/constants-arm.h
===================================================================
--- src/arm/constants-arm.h (revision 8734)
+++ src/arm/constants-arm.h (working copy)
@@ -176,6 +176,21 @@
}
+inline bool EvalComparison(Condition cond, double op1, double op2) {
Mads Ager (chromium) 2011/07/27 13:05:05 Why not have this in the code generator and switch
Alexandre 2011/07/28 13:42:16 Done.
+ switch (cond) {
+ case eq: return (op1 == op2);
+ case ne: return (op1 != op2);
+ case lt: return (op1 < op2);
+ case gt: return (op1 > op2);
+ case le: return (op1 <= op2);
+ case ge: return (op1 >= op2);
+ default:
+ UNREACHABLE();
+ return false;
+ }
+}
+
+
// -----------------------------------------------------------------------------
// Instructions encoding.
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698