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

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

Issue 6606002: Merge revision 6500-6600 from bleeding_edge to the isolates branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
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
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 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after
4695 // Compare exponent with -0.5. 4695 // Compare exponent with -0.5.
4696 __ cmp(scratch1, Operand(0xbfe00000)); 4696 __ cmp(scratch1, Operand(0xbfe00000));
4697 __ b(ne, &not_minus_half); 4697 __ b(ne, &not_minus_half);
4698 4698
4699 // Get the double value from the base into vfp register d0. 4699 // Get the double value from the base into vfp register d0.
4700 __ ObjectToDoubleVFPRegister(base, d0, 4700 __ ObjectToDoubleVFPRegister(base, d0,
4701 scratch1, scratch2, heap_number_map, s0, 4701 scratch1, scratch2, heap_number_map, s0,
4702 runtime.entry_label(), 4702 runtime.entry_label(),
4703 AVOID_NANS_AND_INFINITIES); 4703 AVOID_NANS_AND_INFINITIES);
4704 4704
4705 // Convert -0 into +0 by adding +0.
4706 __ vmov(d2, 0.0);
4707 __ vadd(d0, d2, d0);
4705 // Load 1.0 into d2. 4708 // Load 1.0 into d2.
4706 __ vmov(d2, 1.0); 4709 __ vmov(d2, 1.0);
4707 4710
4708 // Calculate the reciprocal of the square root. 1/sqrt(x) = sqrt(1/x). 4711 // Calculate the reciprocal of the square root.
4712 __ vsqrt(d0, d0);
4709 __ vdiv(d0, d2, d0); 4713 __ vdiv(d0, d2, d0);
4710 __ vsqrt(d0, d0);
4711 4714
4712 __ b(&allocate_return); 4715 __ b(&allocate_return);
4713 4716
4714 __ bind(&not_minus_half); 4717 __ bind(&not_minus_half);
4715 // Compare exponent with 0.5. 4718 // Compare exponent with 0.5.
4716 __ cmp(scratch1, Operand(0x3fe00000)); 4719 __ cmp(scratch1, Operand(0x3fe00000));
4717 runtime.Branch(ne); 4720 runtime.Branch(ne);
4718 4721
4719 // Get the double value from the base into vfp register d0. 4722 // Get the double value from the base into vfp register d0.
4720 __ ObjectToDoubleVFPRegister(base, d0, 4723 __ ObjectToDoubleVFPRegister(base, d0,
4721 scratch1, scratch2, heap_number_map, s0, 4724 scratch1, scratch2, heap_number_map, s0,
4722 runtime.entry_label(), 4725 runtime.entry_label(),
4723 AVOID_NANS_AND_INFINITIES); 4726 AVOID_NANS_AND_INFINITIES);
4727 // Convert -0 into +0 by adding +0.
4728 __ vmov(d2, 0.0);
4729 __ vadd(d0, d2, d0);
4724 __ vsqrt(d0, d0); 4730 __ vsqrt(d0, d0);
4725 4731
4726 __ bind(&allocate_return); 4732 __ bind(&allocate_return);
4727 Register scratch3 = r5; 4733 Register scratch3 = r5;
4728 __ AllocateHeapNumberWithValue(scratch3, d0, scratch1, scratch2, 4734 __ AllocateHeapNumberWithValue(scratch3, d0, scratch1, scratch2,
4729 heap_number_map, runtime.entry_label()); 4735 heap_number_map, runtime.entry_label());
4730 __ mov(base, scratch3); 4736 __ mov(base, scratch3);
4731 done.Jump(); 4737 done.Jump();
4732 4738
4733 runtime.Bind(); 4739 runtime.Bind();
(...skipping 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after
7373 specialized_on_rhs_ ? "_ConstantRhs" : "", 7379 specialized_on_rhs_ ? "_ConstantRhs" : "",
7374 BinaryOpIC::GetName(runtime_operands_type_)); 7380 BinaryOpIC::GetName(runtime_operands_type_));
7375 return name_; 7381 return name_;
7376 } 7382 }
7377 7383
7378 #undef __ 7384 #undef __
7379 7385
7380 } } // namespace v8::internal 7386 } } // namespace v8::internal
7381 7387
7382 #endif // V8_TARGET_ARCH_ARM 7388 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/deoptimizer-arm.cc » ('j') | src/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698