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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 9702027: Don't use an explicit s0 in ClampDoubleToUint8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | test/mjsunit/pixel-array-rounding.js » ('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 3629 matching lines...) Expand 10 before | Expand all | Expand 10 after
3640 Vmov(temp_double_reg, 255.0); 3640 Vmov(temp_double_reg, 255.0);
3641 VFPCompareAndSetFlags(input_reg, temp_double_reg); 3641 VFPCompareAndSetFlags(input_reg, temp_double_reg);
3642 b(le, &in_bounds); 3642 b(le, &in_bounds);
3643 mov(result_reg, Operand(255)); 3643 mov(result_reg, Operand(255));
3644 b(al, &done); 3644 b(al, &done);
3645 3645
3646 // In 0-255 range, round and truncate. 3646 // In 0-255 range, round and truncate.
3647 bind(&in_bounds); 3647 bind(&in_bounds);
3648 Vmov(temp_double_reg, 0.5); 3648 Vmov(temp_double_reg, 0.5);
3649 vadd(temp_double_reg, input_reg, temp_double_reg); 3649 vadd(temp_double_reg, input_reg, temp_double_reg);
3650 vcvt_u32_f64(s0, temp_double_reg); 3650 vcvt_u32_f64(temp_double_reg.low(), temp_double_reg);
3651 vmov(result_reg, s0); 3651 vmov(result_reg, temp_double_reg.low());
3652 bind(&done); 3652 bind(&done);
3653 } 3653 }
3654 3654
3655 3655
3656 void MacroAssembler::LoadInstanceDescriptors(Register map, 3656 void MacroAssembler::LoadInstanceDescriptors(Register map,
3657 Register descriptors) { 3657 Register descriptors) {
3658 ldr(descriptors, 3658 ldr(descriptors,
3659 FieldMemOperand(map, Map::kInstanceDescriptorsOrBitField3Offset)); 3659 FieldMemOperand(map, Map::kInstanceDescriptorsOrBitField3Offset));
3660 Label not_smi; 3660 Label not_smi;
3661 JumpIfNotSmi(descriptors, &not_smi); 3661 JumpIfNotSmi(descriptors, &not_smi);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
3756 void CodePatcher::EmitCondition(Condition cond) { 3756 void CodePatcher::EmitCondition(Condition cond) {
3757 Instr instr = Assembler::instr_at(masm_.pc_); 3757 Instr instr = Assembler::instr_at(masm_.pc_);
3758 instr = (instr & ~kCondMask) | cond; 3758 instr = (instr & ~kCondMask) | cond;
3759 masm_.emit(instr); 3759 masm_.emit(instr);
3760 } 3760 }
3761 3761
3762 3762
3763 } } // namespace v8::internal 3763 } } // namespace v8::internal
3764 3764
3765 #endif // V8_TARGET_ARCH_ARM 3765 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/pixel-array-rounding.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698