OLD | NEW |
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } else { | 225 } else { |
226 str(src1, MemOperand(sp, 4, NegPreIndex), cond); | 226 str(src1, MemOperand(sp, 4, NegPreIndex), cond); |
227 Push(src2, src3, src4, cond); | 227 Push(src2, src3, src4, cond); |
228 } | 228 } |
229 } | 229 } |
230 | 230 |
231 // Push and pop the registers that can hold pointers, as defined by the | 231 // Push and pop the registers that can hold pointers, as defined by the |
232 // RegList constant kSafepointSavedRegisters. | 232 // RegList constant kSafepointSavedRegisters. |
233 void PushSafepointRegisters(); | 233 void PushSafepointRegisters(); |
234 void PopSafepointRegisters(); | 234 void PopSafepointRegisters(); |
| 235 void PushSafepointRegistersAndDoubles(); |
| 236 void PopSafepointRegistersAndDoubles(); |
| 237 |
235 static int SafepointRegisterStackIndex(int reg_code); | 238 static int SafepointRegisterStackIndex(int reg_code); |
236 | 239 |
237 // Load two consecutive registers with two consecutive memory locations. | 240 // Load two consecutive registers with two consecutive memory locations. |
238 void Ldrd(Register dst1, | 241 void Ldrd(Register dst1, |
239 Register dst2, | 242 Register dst2, |
240 const MemOperand& src, | 243 const MemOperand& src, |
241 Condition cond = al); | 244 Condition cond = al); |
242 | 245 |
243 // Store two consecutive registers to two consecutive memory locations. | 246 // Store two consecutive registers to two consecutive memory locations. |
244 void Strd(Register src1, | 247 void Strd(Register src1, |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } | 712 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } |
710 bool allow_stub_calls() { return allow_stub_calls_; } | 713 bool allow_stub_calls() { return allow_stub_calls_; } |
711 | 714 |
712 // --------------------------------------------------------------------------- | 715 // --------------------------------------------------------------------------- |
713 // Smi utilities | 716 // Smi utilities |
714 | 717 |
715 void SmiTag(Register reg, SBit s = LeaveCC) { | 718 void SmiTag(Register reg, SBit s = LeaveCC) { |
716 add(reg, reg, Operand(reg), s); | 719 add(reg, reg, Operand(reg), s); |
717 } | 720 } |
718 | 721 |
| 722 // Try to convert int32 to smi. If the value is to large, preserve |
| 723 // the original value and jump to not_a_smi. Destroys scratch and |
| 724 // sets flags. |
| 725 void TrySmiTag(Register reg, Label* not_a_smi, Register scratch) { |
| 726 mov(scratch, reg); |
| 727 SmiTag(scratch, SetCC); |
| 728 b(vs, not_a_smi); |
| 729 mov(reg, scratch); |
| 730 } |
| 731 |
719 void SmiUntag(Register reg) { | 732 void SmiUntag(Register reg) { |
720 mov(reg, Operand(reg, ASR, kSmiTagSize)); | 733 mov(reg, Operand(reg, ASR, kSmiTagSize)); |
721 } | 734 } |
722 | 735 |
723 // Jump if either of the registers contain a non-smi. | 736 // Jump if either of the registers contain a non-smi. |
724 void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi); | 737 void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi); |
725 // Jump if either of the registers contain a smi. | 738 // Jump if either of the registers contain a smi. |
726 void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi); | 739 void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi); |
727 | 740 |
728 // Abort execution if argument is a smi. Used in debug code. | 741 // Abort execution if argument is a smi. Used in debug code. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 865 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
853 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 866 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
854 #else | 867 #else |
855 #define ACCESS_MASM(masm) masm-> | 868 #define ACCESS_MASM(masm) masm-> |
856 #endif | 869 #endif |
857 | 870 |
858 | 871 |
859 } } // namespace v8::internal | 872 } } // namespace v8::internal |
860 | 873 |
861 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 874 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
OLD | NEW |