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

Side by Side Diff: src/arm/codegen-arm.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 | « no previous file | src/codegen.h » ('j') | 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 7141 matching lines...) Expand 10 before | Expand all | Expand 10 after
7152 return "CompareStub_EQ"; 7152 return "CompareStub_EQ";
7153 } 7153 }
7154 } 7154 }
7155 } 7155 }
7156 default: return "CompareStub"; 7156 default: return "CompareStub";
7157 } 7157 }
7158 } 7158 }
7159 7159
7160 7160
7161 int CompareStub::MinorKey() { 7161 int CompareStub::MinorKey() {
7162 // Encode the three parameters in a unique 16 bit value. 7162 // Encode the three parameters in a unique 16 bit value. To avoid duplicate
7163 ASSERT((static_cast<unsigned>(cc_) >> 26) < (1 << 16)); 7163 // stubs the never NaN NaN condition is only taken into account if the
7164 int nnn_value = (never_nan_nan_ ? 2 : 0); 7164 // condition is equals.
7165 if (cc_ != eq) nnn_value = 0; // Avoid duplicate stubs. 7165 ASSERT((static_cast<unsigned>(cc_) >> 28) < (1 << 14));
7166 return (static_cast<unsigned>(cc_) >> 26) | nnn_value | (strict_ ? 1 : 0); 7166 return ConditionField::encode(static_cast<unsigned>(cc_) >> 28)
7167 | StrictField::encode(strict_)
7168 | NeverNanNanField::encode(cc_ == eq ? never_nan_nan_ : false);
7169
7167 } 7170 }
7168 7171
7169 7172
7170 void StringStubBase::GenerateCopyCharacters(MacroAssembler* masm, 7173 void StringStubBase::GenerateCopyCharacters(MacroAssembler* masm,
7171 Register dest, 7174 Register dest,
7172 Register src, 7175 Register src,
7173 Register count, 7176 Register count,
7174 Register scratch, 7177 Register scratch,
7175 bool ascii) { 7178 bool ascii) {
7176 Label loop; 7179 Label loop;
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
8042 8045
8043 // Just jump to runtime to add the two strings. 8046 // Just jump to runtime to add the two strings.
8044 __ bind(&string_add_runtime); 8047 __ bind(&string_add_runtime);
8045 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); 8048 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
8046 } 8049 }
8047 8050
8048 8051
8049 #undef __ 8052 #undef __
8050 8053
8051 } } // namespace v8::internal 8054 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698