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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 ASSERT(is_valid()); | 120 ASSERT(is_valid()); |
121 return 1 << code_; | 121 return 1 << code_; |
122 } | 122 } |
123 | 123 |
124 // Unfortunately we can't make this private in a struct. | 124 // Unfortunately we can't make this private in a struct. |
125 int code_; | 125 int code_; |
126 }; | 126 }; |
127 | 127 |
128 const Register no_reg = { -1 }; | 128 const Register no_reg = { -1 }; |
129 | 129 |
130 const Register zero_reg = { 0 }; | 130 const Register zero_reg = { 0 }; // Always zero. |
131 const Register at = { 1 }; | 131 const Register at = { 1 }; // at: Reserved for synthetic instructions. |
132 const Register v0 = { 2 }; | 132 const Register v0 = { 2 }; // v0, v1: Used when returning multiple values |
133 const Register v1 = { 3 }; | 133 const Register v1 = { 3 }; // from subroutines. |
134 const Register a0 = { 4 }; | 134 const Register a0 = { 4 }; // a0 - a4: Used to pass non-FP parameters. |
135 const Register a1 = { 5 }; | 135 const Register a1 = { 5 }; |
136 const Register a2 = { 6 }; | 136 const Register a2 = { 6 }; |
137 const Register a3 = { 7 }; | 137 const Register a3 = { 7 }; |
138 const Register t0 = { 8 }; | 138 const Register t0 = { 8 }; // t0 - t9: Can be used without reservation, act |
139 const Register t1 = { 9 }; | 139 const Register t1 = { 9 }; // as temporary registers and are allowed to |
140 const Register t2 = { 10 }; | 140 const Register t2 = { 10 }; // be destroyed by subroutines. |
141 const Register t3 = { 11 }; | 141 const Register t3 = { 11 }; |
142 const Register t4 = { 12 }; | 142 const Register t4 = { 12 }; |
143 const Register t5 = { 13 }; | 143 const Register t5 = { 13 }; |
144 const Register t6 = { 14 }; | 144 const Register t6 = { 14 }; |
145 const Register t7 = { 15 }; | 145 const Register t7 = { 15 }; |
146 const Register s0 = { 16 }; | 146 const Register s0 = { 16 }; // s0 - s7: Subroutine register variables. |
147 const Register s1 = { 17 }; | 147 const Register s1 = { 17 }; // Subroutines that write to these registers |
148 const Register s2 = { 18 }; | 148 const Register s2 = { 18 }; // must restore their values before exiting so |
149 const Register s3 = { 19 }; | 149 const Register s3 = { 19 }; // that the caller can expect the values to be |
150 const Register s4 = { 20 }; | 150 const Register s4 = { 20 }; // preserved. |
151 const Register s5 = { 21 }; | 151 const Register s5 = { 21 }; |
152 const Register s6 = { 22 }; | 152 const Register s6 = { 22 }; |
153 const Register s7 = { 23 }; | 153 const Register s7 = { 23 }; |
154 const Register t8 = { 24 }; | 154 const Register t8 = { 24 }; |
155 const Register t9 = { 25 }; | 155 const Register t9 = { 25 }; |
156 const Register k0 = { 26 }; | 156 const Register k0 = { 26 }; // k0, k1: Reserved for system calls and |
157 const Register k1 = { 27 }; | 157 const Register k1 = { 27 }; // interrupt handlers. |
158 const Register gp = { 28 }; | 158 const Register gp = { 28 }; // gp: Reserved. |
159 const Register sp = { 29 }; | 159 const Register sp = { 29 }; // sp: Stack pointer. |
160 const Register s8_fp = { 30 }; | 160 const Register s8_fp = { 30 }; // fp: Frame pointer. |
161 const Register ra = { 31 }; | 161 const Register ra = { 31 }; // ra: Return address pointer. |
162 | 162 |
163 | 163 |
164 int ToNumber(Register reg); | 164 int ToNumber(Register reg); |
165 | 165 |
166 Register ToRegister(int num); | 166 Register ToRegister(int num); |
167 | 167 |
168 // Coprocessor register. | 168 // Coprocessor register. |
169 struct FPURegister { | 169 struct FPURegister { |
170 static const int kNumRegisters = v8::internal::kNumFPURegisters; | 170 static const int kNumRegisters = v8::internal::kNumFPURegisters; |
171 // f0 has been excluded from allocation. This is following ia32 | 171 // f0 has been excluded from allocation. This is following ia32 |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 class EnsureSpace BASE_EMBEDDED { | 1196 class EnsureSpace BASE_EMBEDDED { |
1197 public: | 1197 public: |
1198 explicit EnsureSpace(Assembler* assembler) { | 1198 explicit EnsureSpace(Assembler* assembler) { |
1199 assembler->CheckBuffer(); | 1199 assembler->CheckBuffer(); |
1200 } | 1200 } |
1201 }; | 1201 }; |
1202 | 1202 |
1203 } } // namespace v8::internal | 1203 } } // namespace v8::internal |
1204 | 1204 |
1205 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1205 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |