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

Side by Side Diff: src/x64/codegen-x64.cc

Issue 1081010: Use bit fields to calculate compare stub minor key (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 9087 matching lines...) Expand 10 before | Expand all | Expand 10 after
9098 } 9098 }
9099 9099
9100 9100
9101 Handle<Code> GetBinaryOpStub(int key, BinaryOpIC::TypeInfo type_info) { 9101 Handle<Code> GetBinaryOpStub(int key, BinaryOpIC::TypeInfo type_info) {
9102 GenericBinaryOpStub stub(key, type_info); 9102 GenericBinaryOpStub stub(key, type_info);
9103 return stub.GetCode(); 9103 return stub.GetCode();
9104 } 9104 }
9105 9105
9106 9106
9107 int CompareStub::MinorKey() { 9107 int CompareStub::MinorKey() {
9108 // Encode the three parameters in a unique 16 bit value. 9108 // Encode the three parameters in a unique 16 bit value. To avoid duplicate
9109 // stubs the never NaN NaN condition is only taken into account if the
9110 // condition is equals.
9109 ASSERT(static_cast<unsigned>(cc_) < (1 << 14)); 9111 ASSERT(static_cast<unsigned>(cc_) < (1 << 14));
9110 int nnn_value = (never_nan_nan_ ? 2 : 0); 9112 return ConditionField::encode(static_cast<unsigned>(cc_))
9111 if (cc_ != equal) nnn_value = 0; // Avoid duplicate stubs. 9113 | StrictField::encode(strict_)
9112 return (static_cast<unsigned>(cc_) << 2) | nnn_value | (strict_ ? 1 : 0); 9114 | NeverNanNanField::encode(cc_ == equal ? never_nan_nan_ : false);
9113 } 9115 }
9114 9116
9115 9117
9116 const char* CompareStub::GetName() { 9118 const char* CompareStub::GetName() {
9117 switch (cc_) { 9119 switch (cc_) {
9118 case less: return "CompareStub_LT"; 9120 case less: return "CompareStub_LT";
9119 case greater: return "CompareStub_GT"; 9121 case greater: return "CompareStub_GT";
9120 case less_equal: return "CompareStub_LE"; 9122 case less_equal: return "CompareStub_LE";
9121 case greater_equal: return "CompareStub_GE"; 9123 case greater_equal: return "CompareStub_GE";
9122 case not_equal: { 9124 case not_equal: {
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
9988 // Call the function from C++. 9990 // Call the function from C++.
9989 return FUNCTION_CAST<ModuloFunction>(buffer); 9991 return FUNCTION_CAST<ModuloFunction>(buffer);
9990 } 9992 }
9991 9993
9992 #endif 9994 #endif
9993 9995
9994 9996
9995 #undef __ 9997 #undef __
9996 9998
9997 } } // namespace v8::internal 9999 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698