OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
438 set_reg(31, value, Reg31IsStackPointer); | 438 set_reg(31, value, Reg31IsStackPointer); |
439 } | 439 } |
440 | 440 |
441 int64_t sp() { return xreg(31, Reg31IsStackPointer); } | 441 int64_t sp() { return xreg(31, Reg31IsStackPointer); } |
442 int64_t jssp() { return xreg(kJSSPCode, Reg31IsStackPointer); } | 442 int64_t jssp() { return xreg(kJSSPCode, Reg31IsStackPointer); } |
443 int64_t fp() { | 443 int64_t fp() { |
444 return xreg(kFramePointerRegCode, Reg31IsStackPointer); | 444 return xreg(kFramePointerRegCode, Reg31IsStackPointer); |
445 } | 445 } |
446 Instruction* lr() { return reg<Instruction*>(kLinkRegCode); } | 446 Instruction* lr() { return reg<Instruction*>(kLinkRegCode); } |
447 | 447 |
448 Address get_sp() { return reinterpret_cast<Address>(sp()); } | |
Rodolph Perfetta
2014/02/12 01:08:51
Late DBC, on a64 you can avoid the cast:
Addres
| |
449 | |
448 // Return 'size' bits of the value of a floating-point register, as the | 450 // Return 'size' bits of the value of a floating-point register, as the |
449 // specified type. The value is zero-extended to fill the result. | 451 // specified type. The value is zero-extended to fill the result. |
450 // | 452 // |
451 // The only supported values of 'size' are kDRegSize and kSRegSize. | 453 // The only supported values of 'size' are kDRegSize and kSRegSize. |
452 template<typename T> | 454 template<typename T> |
453 T fpreg(unsigned size, unsigned code) const { | 455 T fpreg(unsigned size, unsigned code) const { |
454 unsigned size_in_bytes = size / 8; | 456 unsigned size_in_bytes = size / 8; |
455 ASSERT(size_in_bytes <= sizeof(T)); | 457 ASSERT(size_in_bytes <= sizeof(T)); |
456 ASSERT((size == kDRegSize) || (size == kSRegSize)); | 458 ASSERT((size == kDRegSize) || (size == kSRegSize)); |
457 ASSERT(code < kNumberOfFPRegisters); | 459 ASSERT(code < kNumberOfFPRegisters); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
854 static void UnregisterCTryCatch() { | 856 static void UnregisterCTryCatch() { |
855 Simulator::current(Isolate::Current())->PopAddress(); | 857 Simulator::current(Isolate::Current())->PopAddress(); |
856 } | 858 } |
857 }; | 859 }; |
858 | 860 |
859 #endif // !defined(USE_SIMULATOR) | 861 #endif // !defined(USE_SIMULATOR) |
860 | 862 |
861 } } // namespace v8::internal | 863 } } // namespace v8::internal |
862 | 864 |
863 #endif // V8_A64_SIMULATOR_A64_H_ | 865 #endif // V8_A64_SIMULATOR_A64_H_ |
OLD | NEW |