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

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

Issue 9378006: Make sure that top bits are zero when storing untagged 32 bit values (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/lithium-gap-resolver-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3214 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 case DICTIONARY_ELEMENTS: 3225 case DICTIONARY_ELEMENTS:
3226 case NON_STRICT_ARGUMENTS_ELEMENTS: 3226 case NON_STRICT_ARGUMENTS_ELEMENTS:
3227 UNREACHABLE(); 3227 UNREACHABLE();
3228 break; 3228 break;
3229 } 3229 }
3230 } 3230 }
3231 } 3231 }
3232 3232
3233 3233
3234 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 3234 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
3235 if (instr->index()->IsConstantOperand()) { 3235 if (instr->length()->IsRegister()) {
3236 if (instr->length()->IsRegister()) { 3236 Register reg = ToRegister(instr->length());
3237 __ cmpq(ToRegister(instr->length()), 3237 if (FLAG_debug_code) {
3238 __ AbortIfNotZeroExtended(reg);
3239 }
3240 if (instr->index()->IsConstantOperand()) {
3241 __ cmpq(reg,
3238 Immediate(ToInteger32(LConstantOperand::cast(instr->index())))); 3242 Immediate(ToInteger32(LConstantOperand::cast(instr->index()))));
3239 } else { 3243 } else {
3244 Register reg2 = ToRegister(instr->index());
3245 if (FLAG_debug_code) {
3246 __ AbortIfNotZeroExtended(reg2);
3247 }
3248 __ cmpq(reg, reg2);
3249 }
3250 } else {
3251 if (instr->index()->IsConstantOperand()) {
3240 __ cmpq(ToOperand(instr->length()), 3252 __ cmpq(ToOperand(instr->length()),
3241 Immediate(ToInteger32(LConstantOperand::cast(instr->index())))); 3253 Immediate(ToInteger32(LConstantOperand::cast(instr->index()))));
3242 }
3243 } else {
3244 if (instr->length()->IsRegister()) {
3245 __ cmpq(ToRegister(instr->length()), ToRegister(instr->index()));
3246 } else { 3254 } else {
3247 __ cmpq(ToOperand(instr->length()), ToRegister(instr->index())); 3255 __ cmpq(ToOperand(instr->length()), ToRegister(instr->index()));
3248 } 3256 }
3249 } 3257 }
3250 DeoptimizeIf(below_equal, instr->environment()); 3258 DeoptimizeIf(below_equal, instr->environment());
3251 } 3259 }
3252 3260
3253 3261
3254 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 3262 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
3255 Register value = ToRegister(instr->value()); 3263 Register value = ToRegister(instr->value());
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
4404 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4412 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4405 ASSERT(osr_pc_offset_ == -1); 4413 ASSERT(osr_pc_offset_ == -1);
4406 osr_pc_offset_ = masm()->pc_offset(); 4414 osr_pc_offset_ = masm()->pc_offset();
4407 } 4415 }
4408 4416
4409 #undef __ 4417 #undef __
4410 4418
4411 } } // namespace v8::internal 4419 } } // namespace v8::internal
4412 4420
4413 #endif // V8_TARGET_ARCH_X64 4421 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/lithium-gap-resolver-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698