| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // compilation unit that includes this header doesn't use the variables. | 249 // compilation unit that includes this header doesn't use the variables. |
| 250 #define kFirstCalleeSavedDoubleReg d14 | 250 #define kFirstCalleeSavedDoubleReg d14 |
| 251 #define kLastCalleeSavedDoubleReg d31 | 251 #define kLastCalleeSavedDoubleReg d31 |
| 252 #define kDoubleRegZero d14 | 252 #define kDoubleRegZero d14 |
| 253 #define kScratchDoubleReg d13 | 253 #define kScratchDoubleReg d13 |
| 254 | 254 |
| 255 Register ToRegister(int num); | 255 Register ToRegister(int num); |
| 256 | 256 |
| 257 // Coprocessor register | 257 // Coprocessor register |
| 258 struct CRegister { | 258 struct CRegister { |
| 259 bool is_valid() const { return 0 <= reg_code && reg_code < 16; } | 259 bool is_valid() const { return 0 <= reg_code && reg_code < 8; } |
| 260 bool is(CRegister creg) const { return reg_code == creg.reg_code; } | 260 bool is(CRegister creg) const { return reg_code == creg.reg_code; } |
| 261 int code() const { | 261 int code() const { |
| 262 DCHECK(is_valid()); | 262 DCHECK(is_valid()); |
| 263 return reg_code; | 263 return reg_code; |
| 264 } | 264 } |
| 265 int bit() const { | 265 int bit() const { |
| 266 DCHECK(is_valid()); | 266 DCHECK(is_valid()); |
| 267 return 1 << reg_code; | 267 return 1 << reg_code; |
| 268 } | 268 } |
| 269 | 269 |
| 270 // Unfortunately we can't make this private in a struct. | 270 // Unfortunately we can't make this private in a struct. |
| 271 int reg_code; | 271 int reg_code; |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 | 274 |
| 275 const CRegister no_creg = {-1}; | 275 const CRegister no_creg = {-1}; |
| 276 | 276 |
| 277 const CRegister cr0 = {0}; | 277 const CRegister cr0 = {0}; |
| 278 const CRegister cr1 = {1}; | 278 const CRegister cr1 = {1}; |
| 279 const CRegister cr2 = {2}; | 279 const CRegister cr2 = {2}; |
| 280 const CRegister cr3 = {3}; | 280 const CRegister cr3 = {3}; |
| 281 const CRegister cr4 = {4}; | 281 const CRegister cr4 = {4}; |
| 282 const CRegister cr5 = {5}; | 282 const CRegister cr5 = {5}; |
| 283 const CRegister cr6 = {6}; | 283 const CRegister cr6 = {6}; |
| 284 const CRegister cr7 = {7}; | 284 const CRegister cr7 = {7}; |
| 285 const CRegister cr8 = {8}; | |
| 286 const CRegister cr9 = {9}; | |
| 287 const CRegister cr10 = {10}; | |
| 288 const CRegister cr11 = {11}; | |
| 289 const CRegister cr12 = {12}; | |
| 290 const CRegister cr13 = {13}; | |
| 291 const CRegister cr14 = {14}; | |
| 292 const CRegister cr15 = {15}; | |
| 293 | 285 |
| 294 // TODO(ppc) Define SIMD registers. | 286 // TODO(ppc) Define SIMD registers. |
| 295 typedef DoubleRegister Simd128Register; | 287 typedef DoubleRegister Simd128Register; |
| 296 | 288 |
| 297 // ----------------------------------------------------------------------------- | 289 // ----------------------------------------------------------------------------- |
| 298 // Machine instruction Operands | 290 // Machine instruction Operands |
| 299 | 291 |
| 300 #if V8_TARGET_ARCH_PPC64 | 292 #if V8_TARGET_ARCH_PPC64 |
| 301 const RelocInfo::Mode kRelocInfo_NONEPTR = RelocInfo::NONE64; | 293 const RelocInfo::Mode kRelocInfo_NONEPTR = RelocInfo::NONE64; |
| 302 #else | 294 #else |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 | 1470 |
| 1479 | 1471 |
| 1480 class EnsureSpace BASE_EMBEDDED { | 1472 class EnsureSpace BASE_EMBEDDED { |
| 1481 public: | 1473 public: |
| 1482 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } | 1474 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } |
| 1483 }; | 1475 }; |
| 1484 } // namespace internal | 1476 } // namespace internal |
| 1485 } // namespace v8 | 1477 } // namespace v8 |
| 1486 | 1478 |
| 1487 #endif // V8_PPC_ASSEMBLER_PPC_H_ | 1479 #endif // V8_PPC_ASSEMBLER_PPC_H_ |
| OLD | NEW |