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

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

Issue 6672039: Fixed incorrect assumption about BIT_AND on smis on ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.2/
Patch Set: Created 9 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/version.cc » ('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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 new DeferredInlineSmiOperation(op, int_value, reversed, mode, tos); 1166 new DeferredInlineSmiOperation(op, int_value, reversed, mode, tos);
1167 __ tst(tos, Operand(kSmiTagMask)); 1167 __ tst(tos, Operand(kSmiTagMask));
1168 deferred->Branch(ne); 1168 deferred->Branch(ne);
1169 switch (op) { 1169 switch (op) {
1170 case Token::BIT_OR: __ orr(tos, tos, Operand(value)); break; 1170 case Token::BIT_OR: __ orr(tos, tos, Operand(value)); break;
1171 case Token::BIT_XOR: __ eor(tos, tos, Operand(value)); break; 1171 case Token::BIT_XOR: __ eor(tos, tos, Operand(value)); break;
1172 case Token::BIT_AND: __ And(tos, tos, Operand(value)); break; 1172 case Token::BIT_AND: __ And(tos, tos, Operand(value)); break;
1173 default: UNREACHABLE(); 1173 default: UNREACHABLE();
1174 } 1174 }
1175 deferred->BindExit(); 1175 deferred->BindExit();
1176 TypeInfo result_type = 1176 TypeInfo result_type = TypeInfo::Integer32();
1177 (op == Token::BIT_AND) ? TypeInfo::Smi() : TypeInfo::Integer32(); 1177 if (op == Token::BIT_AND && int_value >= 0) {
1178 result_type = TypeInfo::Smi();
1179 }
1178 frame_->EmitPush(tos, result_type); 1180 frame_->EmitPush(tos, result_type);
1179 } 1181 }
1180 break; 1182 break;
1181 } 1183 }
1182 1184
1183 case Token::SHL: 1185 case Token::SHL:
1184 if (reversed) { 1186 if (reversed) {
1185 ASSERT(both_sides_are_smi); 1187 ASSERT(both_sides_are_smi);
1186 int max_shift = 0; 1188 int max_shift = 0;
1187 int max_result = int_value == 0 ? 1 : int_value; 1189 int max_result = int_value == 0 ? 1 : int_value;
(...skipping 10074 matching lines...) Expand 10 before | Expand all | Expand 10 after
11262 __ bind(&string_add_runtime); 11264 __ bind(&string_add_runtime);
11263 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); 11265 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
11264 } 11266 }
11265 11267
11266 11268
11267 #undef __ 11269 #undef __
11268 11270
11269 } } // namespace v8::internal 11271 } } // namespace v8::internal
11270 11272
11271 #endif // V8_TARGET_ARCH_ARM 11273 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698