OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const char* result; | 80 const char* result; |
81 if ((0 <= reg) && (reg < kNumRegisters)) { | 81 if ((0 <= reg) && (reg < kNumRegisters)) { |
82 result = names_[reg]; | 82 result = names_[reg]; |
83 } else { | 83 } else { |
84 result = "noreg"; | 84 result = "noreg"; |
85 } | 85 } |
86 return result; | 86 return result; |
87 } | 87 } |
88 | 88 |
89 | 89 |
90 // Support for VFP registers s0 to s31 (d0 to d15). | 90 // Support for VFP registers s0 to s31 (d0 to d15) and d16-d31. |
91 // Note that "sN:sM" is the same as "dN/2" | 91 // Note that "sN:sM" is the same as "dN/2" up to d15. |
92 // These register names are defined in a way to match the native disassembler | 92 // These register names are defined in a way to match the native disassembler |
93 // formatting. See for example the command "objdump -d <binary file>". | 93 // formatting. See for example the command "objdump -d <binary file>". |
94 const char* VFPRegisters::names_[kNumVFPRegisters] = { | 94 const char* VFPRegisters::names_[kNumVFPRegisters] = { |
95 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", | 95 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", |
96 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", | 96 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", |
97 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", | 97 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23", |
98 "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31", | 98 "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31", |
99 "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", | 99 "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", |
100 "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15" | 100 "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15", |
| 101 "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", |
| 102 "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31" |
101 }; | 103 }; |
102 | 104 |
103 | 105 |
104 const char* VFPRegisters::Name(int reg, bool is_double) { | 106 const char* VFPRegisters::Name(int reg, bool is_double) { |
105 ASSERT((0 <= reg) && (reg < kNumVFPRegisters)); | 107 ASSERT((0 <= reg) && (reg < kNumVFPRegisters)); |
106 return names_[reg + (is_double ? kNumVFPSingleRegisters : 0)]; | 108 return names_[reg + (is_double ? kNumVFPSingleRegisters : 0)]; |
107 } | 109 } |
108 | 110 |
109 | 111 |
110 int VFPRegisters::Number(const char* name, bool* is_double) { | 112 int VFPRegisters::Number(const char* name, bool* is_double) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 } | 145 } |
144 | 146 |
145 // No register with the requested name found. | 147 // No register with the requested name found. |
146 return kNoRegister; | 148 return kNoRegister; |
147 } | 149 } |
148 | 150 |
149 | 151 |
150 } } // namespace v8::internal | 152 } } // namespace v8::internal |
151 | 153 |
152 #endif // V8_TARGET_ARCH_ARM | 154 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |