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

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

Issue 14295004: Remove bogus CPU scope. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | 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 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 4332 matching lines...) Expand 10 before | Expand all | Expand 10 after
4343 } else { 4343 } else {
4344 key = ToRegister(instr->key()); 4344 key = ToRegister(instr->key());
4345 } 4345 }
4346 int element_size_shift = ElementsKindToShiftSize(elements_kind); 4346 int element_size_shift = ElementsKindToShiftSize(elements_kind);
4347 int shift_size = (instr->hydrogen()->key()->representation().IsTagged()) 4347 int shift_size = (instr->hydrogen()->key()->representation().IsTagged())
4348 ? (element_size_shift - kSmiTagSize) : element_size_shift; 4348 ? (element_size_shift - kSmiTagSize) : element_size_shift;
4349 int additional_offset = instr->additional_index() << element_size_shift; 4349 int additional_offset = instr->additional_index() << element_size_shift;
4350 4350
4351 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || 4351 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS ||
4352 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { 4352 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) {
4353 CpuFeatureScope scope(masm(), VFP3);
4354 DwVfpRegister value(ToDoubleRegister(instr->value())); 4353 DwVfpRegister value(ToDoubleRegister(instr->value()));
4355 Operand operand(key_is_constant 4354 Operand operand(key_is_constant
4356 ? Operand(constant_key << element_size_shift) 4355 ? Operand(constant_key << element_size_shift)
4357 : Operand(key, LSL, shift_size)); 4356 : Operand(key, LSL, shift_size));
4358 __ add(scratch0(), external_pointer, operand); 4357 __ add(scratch0(), external_pointer, operand);
4359 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { 4358 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) {
4360 __ vcvt_f32_f64(double_scratch0().low(), value); 4359 __ vcvt_f32_f64(double_scratch0().low(), value);
4361 __ vstr(double_scratch0().low(), scratch0(), additional_offset); 4360 __ vstr(double_scratch0().low(), scratch0(), additional_offset);
4362 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS 4361 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS
4363 __ vstr(value, scratch0(), additional_offset); 4362 __ vstr(value, scratch0(), additional_offset);
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
5035 __ b(&done); 5034 __ b(&done);
5036 5035
5037 __ bind(&heap_number); 5036 __ bind(&heap_number);
5038 __ sub(scratch1, input_reg, Operand(kHeapObjectTag)); 5037 __ sub(scratch1, input_reg, Operand(kHeapObjectTag));
5039 __ vldr(double_scratch2, scratch1, HeapNumber::kValueOffset); 5038 __ vldr(double_scratch2, scratch1, HeapNumber::kValueOffset);
5040 5039
5041 __ ECMAToInt32(input_reg, double_scratch2, double_scratch, 5040 __ ECMAToInt32(input_reg, double_scratch2, double_scratch,
5042 scratch1, scratch2, scratch3); 5041 scratch1, scratch2, scratch3);
5043 5042
5044 } else { 5043 } else {
5045 CpuFeatureScope scope(masm(), VFP3);
5046 // Deoptimize if we don't have a heap number. 5044 // Deoptimize if we don't have a heap number.
5047 DeoptimizeIf(ne, instr->environment()); 5045 DeoptimizeIf(ne, instr->environment());
5048 5046
5049 __ sub(ip, input_reg, Operand(kHeapObjectTag)); 5047 __ sub(ip, input_reg, Operand(kHeapObjectTag));
5050 __ vldr(double_scratch, ip, HeapNumber::kValueOffset); 5048 __ vldr(double_scratch, ip, HeapNumber::kValueOffset);
5051 __ TryDoubleToInt32Exact(input_reg, double_scratch, double_scratch2); 5049 __ TryDoubleToInt32Exact(input_reg, double_scratch, double_scratch2);
5052 DeoptimizeIf(ne, instr->environment()); 5050 DeoptimizeIf(ne, instr->environment());
5053 5051
5054 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 5052 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
5055 __ cmp(input_reg, Operand::Zero()); 5053 __ cmp(input_reg, Operand::Zero());
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
5996 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 5994 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
5997 __ ldr(result, FieldMemOperand(scratch, 5995 __ ldr(result, FieldMemOperand(scratch,
5998 FixedArray::kHeaderSize - kPointerSize)); 5996 FixedArray::kHeaderSize - kPointerSize));
5999 __ bind(&done); 5997 __ bind(&done);
6000 } 5998 }
6001 5999
6002 6000
6003 #undef __ 6001 #undef __
6004 6002
6005 } } // namespace v8::internal 6003 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698