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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // Aliases for double registers. Defined using #define instead of | 232 // Aliases for double registers. Defined using #define instead of |
233 // "static const DoubleRegister&" because Clang complains otherwise when a | 233 // "static const DoubleRegister&" because Clang complains otherwise when a |
234 // compilation unit that includes this header doesn't use the variables. | 234 // compilation unit that includes this header doesn't use the variables. |
235 #define kDoubleRegZero d14 | 235 #define kDoubleRegZero d14 |
236 #define kScratchDoubleReg d13 | 236 #define kScratchDoubleReg d13 |
237 | 237 |
238 Register ToRegister(int num); | 238 Register ToRegister(int num); |
239 | 239 |
240 // Coprocessor register | 240 // Coprocessor register |
241 struct CRegister { | 241 struct CRegister { |
242 bool is_valid() const { return 0 <= reg_code && reg_code < 16; } | 242 bool is_valid() const { return 0 <= reg_code && reg_code < 8; } |
243 bool is(CRegister creg) const { return reg_code == creg.reg_code; } | 243 bool is(CRegister creg) const { return reg_code == creg.reg_code; } |
244 int code() const { | 244 int code() const { |
245 DCHECK(is_valid()); | 245 DCHECK(is_valid()); |
246 return reg_code; | 246 return reg_code; |
247 } | 247 } |
248 int bit() const { | 248 int bit() const { |
249 DCHECK(is_valid()); | 249 DCHECK(is_valid()); |
250 return 1 << reg_code; | 250 return 1 << reg_code; |
251 } | 251 } |
252 | 252 |
253 // Unfortunately we can't make this private in a struct. | 253 // Unfortunately we can't make this private in a struct. |
254 int reg_code; | 254 int reg_code; |
255 }; | 255 }; |
256 | 256 |
257 const CRegister no_creg = {-1}; | 257 const CRegister no_creg = {-1}; |
258 | 258 |
259 const CRegister cr0 = {0}; | 259 const CRegister cr0 = {0}; |
260 const CRegister cr1 = {1}; | 260 const CRegister cr1 = {1}; |
261 const CRegister cr2 = {2}; | 261 const CRegister cr2 = {2}; |
262 const CRegister cr3 = {3}; | 262 const CRegister cr3 = {3}; |
263 const CRegister cr4 = {4}; | 263 const CRegister cr4 = {4}; |
264 const CRegister cr5 = {5}; | 264 const CRegister cr5 = {5}; |
265 const CRegister cr6 = {6}; | 265 const CRegister cr6 = {6}; |
266 const CRegister cr7 = {7}; | 266 const CRegister cr7 = {7}; |
267 const CRegister cr8 = {8}; | |
268 const CRegister cr9 = {9}; | |
269 const CRegister cr10 = {10}; | |
270 const CRegister cr11 = {11}; | |
271 const CRegister cr12 = {12}; | |
272 const CRegister cr13 = {13}; | |
273 const CRegister cr14 = {14}; | |
274 const CRegister cr15 = {15}; | |
275 | 267 |
276 // TODO(john.yan) Define SIMD registers. | 268 // TODO(john.yan) Define SIMD registers. |
277 typedef DoubleRegister Simd128Register; | 269 typedef DoubleRegister Simd128Register; |
278 | 270 |
279 // ----------------------------------------------------------------------------- | 271 // ----------------------------------------------------------------------------- |
280 // Machine instruction Operands | 272 // Machine instruction Operands |
281 | 273 |
282 #if V8_TARGET_ARCH_S390X | 274 #if V8_TARGET_ARCH_S390X |
283 const RelocInfo::Mode kRelocInfo_NONEPTR = RelocInfo::NONE64; | 275 const RelocInfo::Mode kRelocInfo_NONEPTR = RelocInfo::NONE64; |
284 #else | 276 #else |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 // Use --trace-deopt to enable. | 1238 // Use --trace-deopt to enable. |
1247 void RecordDeoptReason(const int reason, int raw_position); | 1239 void RecordDeoptReason(const int reason, int raw_position); |
1248 | 1240 |
1249 // Writes a single byte or word of data in the code stream. Used | 1241 // Writes a single byte or word of data in the code stream. Used |
1250 // for inline tables, e.g., jump-tables. | 1242 // for inline tables, e.g., jump-tables. |
1251 void db(uint8_t data); | 1243 void db(uint8_t data); |
1252 void dd(uint32_t data); | 1244 void dd(uint32_t data); |
1253 void dq(uint64_t data); | 1245 void dq(uint64_t data); |
1254 void dp(uintptr_t data); | 1246 void dp(uintptr_t data); |
1255 | 1247 |
1256 PositionsRecorder* positions_recorder() { return &positions_recorder_; } | 1248 AssemblerPositionsRecorder* positions_recorder() { |
| 1249 return &positions_recorder_; |
| 1250 } |
1257 | 1251 |
1258 void PatchConstantPoolAccessInstruction(int pc_offset, int offset, | 1252 void PatchConstantPoolAccessInstruction(int pc_offset, int offset, |
1259 ConstantPoolEntry::Access access, | 1253 ConstantPoolEntry::Access access, |
1260 ConstantPoolEntry::Type type) { | 1254 ConstantPoolEntry::Type type) { |
1261 // No embedded constant pool support. | 1255 // No embedded constant pool support. |
1262 UNREACHABLE(); | 1256 UNREACHABLE(); |
1263 } | 1257 } |
1264 | 1258 |
1265 // Read/patch instructions | 1259 // Read/patch instructions |
1266 SixByteInstr instr_at(int pos) { | 1260 SixByteInstr instr_at(int pos) { |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 int max_reach_from(int pos); | 1438 int max_reach_from(int pos); |
1445 void bind_to(Label* L, int pos); | 1439 void bind_to(Label* L, int pos); |
1446 void next(Label* L); | 1440 void next(Label* L); |
1447 | 1441 |
1448 friend class RegExpMacroAssemblerS390; | 1442 friend class RegExpMacroAssemblerS390; |
1449 friend class RelocInfo; | 1443 friend class RelocInfo; |
1450 friend class CodePatcher; | 1444 friend class CodePatcher; |
1451 | 1445 |
1452 List<Handle<Code> > code_targets_; | 1446 List<Handle<Code> > code_targets_; |
1453 | 1447 |
1454 PositionsRecorder positions_recorder_; | 1448 AssemblerPositionsRecorder positions_recorder_; |
1455 friend class PositionsRecorder; | 1449 friend class AssemblerPositionsRecorder; |
1456 friend class EnsureSpace; | 1450 friend class EnsureSpace; |
1457 }; | 1451 }; |
1458 | 1452 |
1459 class EnsureSpace BASE_EMBEDDED { | 1453 class EnsureSpace BASE_EMBEDDED { |
1460 public: | 1454 public: |
1461 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } | 1455 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } |
1462 }; | 1456 }; |
1463 | 1457 |
1464 } // namespace internal | 1458 } // namespace internal |
1465 } // namespace v8 | 1459 } // namespace v8 |
1466 | 1460 |
1467 #endif // V8_S390_ASSEMBLER_S390_H_ | 1461 #endif // V8_S390_ASSEMBLER_S390_H_ |
OLD | NEW |