| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 #include "cpu.h" | 42 #include "cpu.h" |
| 43 #include "debug.h" | 43 #include "debug.h" |
| 44 | 44 |
| 45 | 45 |
| 46 namespace v8 { | 46 namespace v8 { |
| 47 namespace internal { | 47 namespace internal { |
| 48 | 48 |
| 49 | 49 |
| 50 int Register::NumAllocatableRegisters() { | 50 int Register::NumAllocatableRegisters() { |
| 51 if (CpuFeatures::IsSupported(VFP2)) { | 51 return kMaxNumAllocatableRegisters; |
| 52 return kMaxNumAllocatableRegisters; | |
| 53 } else { | |
| 54 return kMaxNumAllocatableRegisters - kGPRsPerNonVFP2Double; | |
| 55 } | |
| 56 } | 52 } |
| 57 | 53 |
| 58 | 54 |
| 59 int DwVfpRegister::NumRegisters() { | 55 int DwVfpRegister::NumRegisters() { |
| 60 if (CpuFeatures::IsSupported(VFP2)) { | 56 return CpuFeatures::IsSupported(VFP32DREGS) ? 32 : 16; |
| 61 return CpuFeatures::IsSupported(VFP32DREGS) ? 32 : 16; | |
| 62 } else { | |
| 63 return 1; | |
| 64 } | |
| 65 } | 57 } |
| 66 | 58 |
| 67 | 59 |
| 68 int DwVfpRegister::NumAllocatableRegisters() { | 60 int DwVfpRegister::NumAllocatableRegisters() { |
| 69 if (CpuFeatures::IsSupported(VFP2)) { | 61 return NumRegisters() - kNumReservedRegisters; |
| 70 return NumRegisters() - kNumReservedRegisters; | |
| 71 } else { | |
| 72 return 1; | |
| 73 } | |
| 74 } | 62 } |
| 75 | 63 |
| 76 | 64 |
| 77 int DwVfpRegister::ToAllocationIndex(DwVfpRegister reg) { | 65 int DwVfpRegister::ToAllocationIndex(DwVfpRegister reg) { |
| 78 ASSERT(!reg.is(kDoubleRegZero)); | 66 ASSERT(!reg.is(kDoubleRegZero)); |
| 79 ASSERT(!reg.is(kScratchDoubleReg)); | 67 ASSERT(!reg.is(kScratchDoubleReg)); |
| 80 if (reg.code() > kDoubleRegZero.code()) { | 68 if (reg.code() > kDoubleRegZero.code()) { |
| 81 return reg.code() - kNumReservedRegisters; | 69 return reg.code() - kNumReservedRegisters; |
| 82 } | 70 } |
| 83 return reg.code(); | 71 return reg.code(); |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 | 541 |
| 554 | 542 |
| 555 void Assembler::set_target_address_at(Address pc, Address target) { | 543 void Assembler::set_target_address_at(Address pc, Address target) { |
| 556 set_target_pointer_at(pc, target); | 544 set_target_pointer_at(pc, target); |
| 557 } | 545 } |
| 558 | 546 |
| 559 | 547 |
| 560 } } // namespace v8::internal | 548 } } // namespace v8::internal |
| 561 | 549 |
| 562 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ | 550 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ |
| OLD | NEW |