| 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 are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 return kAllocationIndexByRegisterCode[reg.code()]; | 102 return kAllocationIndexByRegisterCode[reg.code()]; |
| 103 } | 103 } |
| 104 | 104 |
| 105 static Register FromAllocationIndex(int index) { | 105 static Register FromAllocationIndex(int index) { |
| 106 ASSERT(index >= 0 && index < kNumAllocatableRegisters); | 106 ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
| 107 Register result = { kRegisterCodeByAllocationIndex[index] }; | 107 Register result = { kRegisterCodeByAllocationIndex[index] }; |
| 108 return result; | 108 return result; |
| 109 } | 109 } |
| 110 | 110 |
| 111 static int ToRspIndexForPushAll(Register reg) { | 111 static int ToRspIndexForPushAll(Register reg) { |
| 112 return kRspIndexForPushAllByRegisterCode[reg.code()]; | 112 // TODO(ager): Refactor this so we can use the right constants for |
| 113 // this computation. Move it to the macro assembler as on ARM. |
| 114 return kRspIndexForPushAllByRegisterCode[reg.code()] + 5; |
| 113 } | 115 } |
| 114 | 116 |
| 115 static const char* AllocationIndexToString(int index) { | 117 static const char* AllocationIndexToString(int index) { |
| 116 ASSERT(index >= 0 && index < kNumAllocatableRegisters); | 118 ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
| 117 const char* const names[] = { | 119 const char* const names[] = { |
| 118 "rax", | 120 "rax", |
| 119 "rbx", | 121 "rbx", |
| 120 "rdx", | 122 "rdx", |
| 121 "rcx", | 123 "rcx", |
| 122 "rdi", | 124 "rdi", |
| (...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 private: | 1580 private: |
| 1579 Assembler* assembler_; | 1581 Assembler* assembler_; |
| 1580 #ifdef DEBUG | 1582 #ifdef DEBUG |
| 1581 int space_before_; | 1583 int space_before_; |
| 1582 #endif | 1584 #endif |
| 1583 }; | 1585 }; |
| 1584 | 1586 |
| 1585 } } // namespace v8::internal | 1587 } } // namespace v8::internal |
| 1586 | 1588 |
| 1587 #endif // V8_X64_ASSEMBLER_X64_H_ | 1589 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |