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

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

Issue 14119008: ARM: VFP cleanup now that VFP2 is the baseline. (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
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 5033 matching lines...) Expand 10 before | Expand all | Expand 10 after
5044 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); 5044 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
5045 __ cmp(input_reg, Operand(ip)); 5045 __ cmp(input_reg, Operand(ip));
5046 DeoptimizeIf(ne, instr->environment()); 5046 DeoptimizeIf(ne, instr->environment());
5047 __ mov(input_reg, Operand::Zero()); 5047 __ mov(input_reg, Operand::Zero());
5048 __ b(&done); 5048 __ b(&done);
5049 5049
5050 __ bind(&heap_number); 5050 __ bind(&heap_number);
5051 __ sub(scratch1, input_reg, Operand(kHeapObjectTag)); 5051 __ sub(scratch1, input_reg, Operand(kHeapObjectTag));
5052 __ vldr(double_scratch2, scratch1, HeapNumber::kValueOffset); 5052 __ vldr(double_scratch2, scratch1, HeapNumber::kValueOffset);
5053 5053
5054 __ ECMAToInt32(input_reg, double_scratch2, double_scratch, 5054 __ ECMAToInt32(input_reg, double_scratch2,
5055 scratch1, scratch2, scratch3); 5055 scratch1, scratch2, scratch3, double_scratch);
5056 5056
5057 } else { 5057 } else {
5058 // Deoptimize if we don't have a heap number. 5058 // Deoptimize if we don't have a heap number.
5059 DeoptimizeIf(ne, instr->environment()); 5059 DeoptimizeIf(ne, instr->environment());
5060 5060
5061 __ sub(ip, input_reg, Operand(kHeapObjectTag)); 5061 __ sub(ip, input_reg, Operand(kHeapObjectTag));
5062 __ vldr(double_scratch, ip, HeapNumber::kValueOffset); 5062 __ vldr(double_scratch, ip, HeapNumber::kValueOffset);
5063 __ TryDoubleToInt32Exact(input_reg, double_scratch, double_scratch2); 5063 __ TryDoubleToInt32Exact(input_reg, double_scratch, double_scratch2);
5064 DeoptimizeIf(ne, instr->environment()); 5064 DeoptimizeIf(ne, instr->environment());
5065 5065
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
5142 Register result_reg = ToRegister(instr->result()); 5142 Register result_reg = ToRegister(instr->result());
5143 Register scratch1 = scratch0(); 5143 Register scratch1 = scratch0();
5144 Register scratch2 = ToRegister(instr->temp()); 5144 Register scratch2 = ToRegister(instr->temp());
5145 DwVfpRegister double_input = ToDoubleRegister(instr->value()); 5145 DwVfpRegister double_input = ToDoubleRegister(instr->value());
5146 DwVfpRegister double_scratch = double_scratch0(); 5146 DwVfpRegister double_scratch = double_scratch0();
5147 5147
5148 Label done; 5148 Label done;
5149 5149
5150 if (instr->truncating()) { 5150 if (instr->truncating()) {
5151 Register scratch3 = ToRegister(instr->temp2()); 5151 Register scratch3 = ToRegister(instr->temp2());
5152 __ ECMAToInt32(result_reg, double_input, double_scratch, 5152 __ ECMAToInt32(result_reg, double_input,
5153 scratch1, scratch2, scratch3); 5153 scratch1, scratch2, scratch3, double_scratch);
5154 } else { 5154 } else {
5155 __ TryDoubleToInt32Exact(result_reg, double_input, double_scratch); 5155 __ TryDoubleToInt32Exact(result_reg, double_input, double_scratch);
5156 // Deoptimize if the input wasn't a int32 (inside a double). 5156 // Deoptimize if the input wasn't a int32 (inside a double).
5157 DeoptimizeIf(ne, instr->environment()); 5157 DeoptimizeIf(ne, instr->environment());
5158 } 5158 }
5159 __ bind(&done); 5159 __ bind(&done);
5160 } 5160 }
5161 5161
5162 5162
5163 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 5163 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
6008 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 6008 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
6009 __ ldr(result, FieldMemOperand(scratch, 6009 __ ldr(result, FieldMemOperand(scratch,
6010 FixedArray::kHeaderSize - kPointerSize)); 6010 FixedArray::kHeaderSize - kPointerSize));
6011 __ bind(&done); 6011 __ bind(&done);
6012 } 6012 }
6013 6013
6014 6014
6015 #undef __ 6015 #undef __
6016 6016
6017 } } // namespace v8::internal 6017 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698