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

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

Issue 2885002: ARM: Use the vsqrt instruction when available... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 5 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 | « src/arm/disasm-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 TAG_OBJECT = 1 << 0, 60 TAG_OBJECT = 1 << 0,
61 // The content of the result register already contains the allocation top in 61 // The content of the result register already contains the allocation top in
62 // new space. 62 // new space.
63 RESULT_CONTAINS_TOP = 1 << 1, 63 RESULT_CONTAINS_TOP = 1 << 1,
64 // Specify that the requested size of the space to allocate is specified in 64 // Specify that the requested size of the space to allocate is specified in
65 // words instead of bytes. 65 // words instead of bytes.
66 SIZE_IN_WORDS = 1 << 2 66 SIZE_IN_WORDS = 1 << 2
67 }; 67 };
68 68
69 69
70 // Flags used for the ObjectToDoubleVFPRegister function.
71 enum ObjectToDoubleFlags {
72 // No special flags.
73 NO_OBJECT_TO_DOUBLE_FLAGS = 0,
74 // Object is known to be a non smi.
75 OBJECT_NOT_SMI = 1 << 0,
76 // Don't load NaNs or infinities, branch to the non number case instead.
77 AVOID_NANS_AND_INFINITIES = 1 << 1
78 };
79
80
70 // MacroAssembler implements a collection of frequently used macros. 81 // MacroAssembler implements a collection of frequently used macros.
71 class MacroAssembler: public Assembler { 82 class MacroAssembler: public Assembler {
72 public: 83 public:
73 MacroAssembler(void* buffer, int size); 84 MacroAssembler(void* buffer, int size);
74 85
75 // Jump, Call, and Ret pseudo instructions implementing inter-working. 86 // Jump, Call, and Ret pseudo instructions implementing inter-working.
76 void Jump(Register target, Condition cond = al); 87 void Jump(Register target, Condition cond = al);
77 void Jump(byte* target, RelocInfo::Mode rmode, Condition cond = al); 88 void Jump(byte* target, RelocInfo::Mode rmode, Condition cond = al);
78 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); 89 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al);
79 void Call(Register target, Condition cond = al); 90 void Call(Register target, Condition cond = al);
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 Label* gc_required); 385 Label* gc_required);
375 386
376 // Allocates a heap number or jumps to the gc_required label if the young 387 // Allocates a heap number or jumps to the gc_required label if the young
377 // space is full and a scavenge is needed. All registers are clobbered also 388 // space is full and a scavenge is needed. All registers are clobbered also
378 // when control continues at the gc_required label. 389 // when control continues at the gc_required label.
379 void AllocateHeapNumber(Register result, 390 void AllocateHeapNumber(Register result,
380 Register scratch1, 391 Register scratch1,
381 Register scratch2, 392 Register scratch2,
382 Register heap_number_map, 393 Register heap_number_map,
383 Label* gc_required); 394 Label* gc_required);
395 void AllocateHeapNumberWithValue(Register result,
396 DwVfpRegister value,
397 Register scratch1,
398 Register scratch2,
399 Register heap_number_map,
400 Label* gc_required);
401
384 402
385 // --------------------------------------------------------------------------- 403 // ---------------------------------------------------------------------------
386 // Support functions. 404 // Support functions.
387 405
388 // Try to get function prototype of a function and puts the value in 406 // Try to get function prototype of a function and puts the value in
389 // the result register. Checks that the function really is a 407 // the result register. Checks that the function really is a
390 // function and jumps to the miss label if the fast checks fail. The 408 // function and jumps to the miss label if the fast checks fail. The
391 // function register will be untouched; the other registers may be 409 // function register will be untouched; the other registers may be
392 // clobbered. 410 // clobbered.
393 void TryGetFunctionPrototype(Register function, 411 void TryGetFunctionPrototype(Register function,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 void IllegalOperation(int num_arguments); 480 void IllegalOperation(int num_arguments);
463 481
464 // Get the number of least significant bits from a register 482 // Get the number of least significant bits from a register
465 void GetLeastBitsFromSmi(Register dst, Register src, int num_least_bits); 483 void GetLeastBitsFromSmi(Register dst, Register src, int num_least_bits);
466 484
467 // Uses VFP instructions to Convert a Smi to a double. 485 // Uses VFP instructions to Convert a Smi to a double.
468 void IntegerToDoubleConversionWithVFP3(Register inReg, 486 void IntegerToDoubleConversionWithVFP3(Register inReg,
469 Register outHighReg, 487 Register outHighReg,
470 Register outLowReg); 488 Register outLowReg);
471 489
490 // Load the value of a number object into a VFP double register. If the object
491 // is not a number a jump to the label not_number is performed and the VFP
492 // double register is unchanged.
493 void ObjectToDoubleVFPRegister(
494 Register object,
495 DwVfpRegister value,
496 Register scratch1,
497 Register scratch2,
498 Register heap_number_map,
499 SwVfpRegister scratch3,
500 Label* not_number,
501 ObjectToDoubleFlags flags = NO_OBJECT_TO_DOUBLE_FLAGS);
502
503 // Load the value of a smi object into a VFP double register. The register
504 // scratch1 can be the same register as smi in which case smi will hold the
505 // untagged value afterwards.
506 void SmiToDoubleVFPRegister(Register smi,
507 DwVfpRegister value,
508 Register scratch1,
509 SwVfpRegister scratch2);
510
472 // Count leading zeros in a 32 bit word. On ARM5 and later it uses the clz 511 // Count leading zeros in a 32 bit word. On ARM5 and later it uses the clz
473 // instruction. On pre-ARM5 hardware this routine gives the wrong answer 512 // instruction. On pre-ARM5 hardware this routine gives the wrong answer
474 // for 0 (31 instead of 32). Source and scratch can be the same in which case 513 // for 0 (31 instead of 32). Source and scratch can be the same in which case
475 // the source is clobbered. Source and zeros can also be the same in which 514 // the source is clobbered. Source and zeros can also be the same in which
476 // case scratch should be a different register. 515 // case scratch should be a different register.
477 void CountLeadingZeros(Register zeros, 516 void CountLeadingZeros(Register zeros,
478 Register source, 517 Register source,
479 Register scratch); 518 Register scratch);
480 519
481 // --------------------------------------------------------------------------- 520 // ---------------------------------------------------------------------------
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 724 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
686 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 725 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
687 #else 726 #else
688 #define ACCESS_MASM(masm) masm-> 727 #define ACCESS_MASM(masm) masm->
689 #endif 728 #endif
690 729
691 730
692 } } // namespace v8::internal 731 } } // namespace v8::internal
693 732
694 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 733 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/disasm-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698