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

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

Issue 6117003: ARM: Add instruction VFPCompareAndSetFlags to macro assembler (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 4649 matching lines...) Expand 10 before | Expand all | Expand 10 after
4660 // If exponent is positive we are done. 4660 // If exponent is positive we are done.
4661 __ cmp(exponent, Operand(0, RelocInfo::NONE)); 4661 __ cmp(exponent, Operand(0, RelocInfo::NONE));
4662 __ b(ge, &allocate_return); 4662 __ b(ge, &allocate_return);
4663 4663
4664 // If exponent is negative result is 1/result (d2 already holds 1.0 in that 4664 // If exponent is negative result is 1/result (d2 already holds 1.0 in that
4665 // case). However if d0 has reached infinity this will not provide the 4665 // case). However if d0 has reached infinity this will not provide the
4666 // correct result, so call runtime if that is the case. 4666 // correct result, so call runtime if that is the case.
4667 __ mov(scratch2, Operand(0x7FF00000)); 4667 __ mov(scratch2, Operand(0x7FF00000));
4668 __ mov(scratch1, Operand(0, RelocInfo::NONE)); 4668 __ mov(scratch1, Operand(0, RelocInfo::NONE));
4669 __ vmov(d1, scratch1, scratch2); // Load infinity into d1. 4669 __ vmov(d1, scratch1, scratch2); // Load infinity into d1.
4670 __ vcmp(d0, d1); 4670 __ VFPCompareAndSetFlags(d0, d1);
4671 __ vmrs(pc);
4672 runtime.Branch(eq); // d0 reached infinity. 4671 runtime.Branch(eq); // d0 reached infinity.
4673 __ vdiv(d0, d2, d0); 4672 __ vdiv(d0, d2, d0);
4674 __ b(&allocate_return); 4673 __ b(&allocate_return);
4675 4674
4676 __ bind(&exponent_nonsmi); 4675 __ bind(&exponent_nonsmi);
4677 // Special handling of raising to the power of -0.5 and 0.5. First check 4676 // Special handling of raising to the power of -0.5 and 0.5. First check
4678 // that the value is a heap number and that the lower bits (which for both 4677 // that the value is a heap number and that the lower bits (which for both
4679 // values are zero). 4678 // values are zero).
4680 heap_number_map = r6; 4679 heap_number_map = r6;
4681 __ LoadRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); 4680 __ LoadRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
7368 BinaryOpIC::GetName(runtime_operands_type_)); 7367 BinaryOpIC::GetName(runtime_operands_type_));
7369 return name_; 7368 return name_;
7370 } 7369 }
7371 7370
7372 7371
7373 #undef __ 7372 #undef __
7374 7373
7375 } } // namespace v8::internal 7374 } } // namespace v8::internal
7376 7375
7377 #endif // V8_TARGET_ARCH_ARM 7376 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698