| 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 // Detect features of the target CPU. Set safe defaults if the serializer | 505 // Detect features of the target CPU. Set safe defaults if the serializer |
| 506 // is enabled (snapshots must be portable). | 506 // is enabled (snapshots must be portable). |
| 507 static void Probe(); | 507 static void Probe(); |
| 508 | 508 |
| 509 // Check whether a feature is supported by the target CPU. | 509 // Check whether a feature is supported by the target CPU. |
| 510 static bool IsSupported(CpuFeature f) { | 510 static bool IsSupported(CpuFeature f) { |
| 511 ASSERT(initialized_); | 511 ASSERT(initialized_); |
| 512 if (f == VFP3 && !FLAG_enable_vfp3) return false; | 512 if (f == VFP3 && !FLAG_enable_vfp3) return false; |
| 513 if (f == VFP2 && !FLAG_enable_vfp2) return false; | 513 if (f == VFP2 && !FLAG_enable_vfp2) return false; |
| 514 if (f == SUDIV && !FLAG_enable_sudiv) return false; | 514 if (f == SUDIV && !FLAG_enable_sudiv) return false; |
| 515 if (f == UNALIGNED_ACCESSES && !FLAG_enable_unaligned_accesses) { |
| 516 return false; |
| 517 } |
| 515 return (supported_ & (1u << f)) != 0; | 518 return (supported_ & (1u << f)) != 0; |
| 516 } | 519 } |
| 517 | 520 |
| 518 #ifdef DEBUG | 521 #ifdef DEBUG |
| 519 // Check whether a feature is currently enabled. | 522 // Check whether a feature is currently enabled. |
| 520 static bool IsEnabled(CpuFeature f) { | 523 static bool IsEnabled(CpuFeature f) { |
| 521 ASSERT(initialized_); | 524 ASSERT(initialized_); |
| 522 Isolate* isolate = Isolate::UncheckedCurrent(); | 525 Isolate* isolate = Isolate::UncheckedCurrent(); |
| 523 if (isolate == NULL) { | 526 if (isolate == NULL) { |
| 524 // When no isolate is available, work as if we're running in | 527 // When no isolate is available, work as if we're running in |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 public: | 1478 public: |
| 1476 explicit EnsureSpace(Assembler* assembler) { | 1479 explicit EnsureSpace(Assembler* assembler) { |
| 1477 assembler->CheckBuffer(); | 1480 assembler->CheckBuffer(); |
| 1478 } | 1481 } |
| 1479 }; | 1482 }; |
| 1480 | 1483 |
| 1481 | 1484 |
| 1482 } } // namespace v8::internal | 1485 } } // namespace v8::internal |
| 1483 | 1486 |
| 1484 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1487 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |