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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 // is enabled (snapshots must be portable). | 530 // is enabled (snapshots must be portable). |
531 static void Probe(); | 531 static void Probe(); |
532 | 532 |
533 // Check whether a feature is supported by the target CPU. | 533 // Check whether a feature is supported by the target CPU. |
534 static bool IsSupported(CpuFeature f) { | 534 static bool IsSupported(CpuFeature f) { |
535 ASSERT(initialized_); | 535 ASSERT(initialized_); |
536 if (f == SSE2 && !FLAG_enable_sse2) return false; | 536 if (f == SSE2 && !FLAG_enable_sse2) return false; |
537 if (f == SSE3 && !FLAG_enable_sse3) return false; | 537 if (f == SSE3 && !FLAG_enable_sse3) return false; |
538 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; | 538 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; |
539 if (f == CMOV && !FLAG_enable_cmov) return false; | 539 if (f == CMOV && !FLAG_enable_cmov) return false; |
540 if (f == RDTSC && !FLAG_enable_rdtsc) return false; | |
541 return (supported_ & (static_cast<uint64_t>(1) << f)) != 0; | 540 return (supported_ & (static_cast<uint64_t>(1) << f)) != 0; |
542 } | 541 } |
543 | 542 |
544 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { | 543 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { |
545 ASSERT(initialized_); | 544 ASSERT(initialized_); |
546 return (found_by_runtime_probing_only_ & | 545 return (found_by_runtime_probing_only_ & |
547 (static_cast<uint64_t>(1) << f)) != 0; | 546 (static_cast<uint64_t>(1) << f)) != 0; |
548 } | 547 } |
549 | 548 |
550 static bool IsSafeForSnapshot(CpuFeature f) { | 549 static bool IsSafeForSnapshot(CpuFeature f) { |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 | 862 |
864 // Bit operations. | 863 // Bit operations. |
865 void bt(const Operand& dst, Register src); | 864 void bt(const Operand& dst, Register src); |
866 void bts(Register dst, Register src) { bts(Operand(dst), src); } | 865 void bts(Register dst, Register src) { bts(Operand(dst), src); } |
867 void bts(const Operand& dst, Register src); | 866 void bts(const Operand& dst, Register src); |
868 | 867 |
869 // Miscellaneous | 868 // Miscellaneous |
870 void hlt(); | 869 void hlt(); |
871 void int3(); | 870 void int3(); |
872 void nop(); | 871 void nop(); |
873 void rdtsc(); | |
874 void ret(int imm16); | 872 void ret(int imm16); |
875 | 873 |
876 // Label operations & relative jumps (PPUM Appendix D) | 874 // Label operations & relative jumps (PPUM Appendix D) |
877 // | 875 // |
878 // Takes a branch opcode (cc) and a label (L) and generates | 876 // Takes a branch opcode (cc) and a label (L) and generates |
879 // either a backward branch or a forward branch and links it | 877 // either a backward branch or a forward branch and links it |
880 // to the label fixup chain. Usage: | 878 // to the label fixup chain. Usage: |
881 // | 879 // |
882 // Label L; // unbound label | 880 // Label L; // unbound label |
883 // j(cc, &L); // forward branch to unbound label | 881 // j(cc, &L); // forward branch to unbound label |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 private: | 1229 private: |
1232 Assembler* assembler_; | 1230 Assembler* assembler_; |
1233 #ifdef DEBUG | 1231 #ifdef DEBUG |
1234 int space_before_; | 1232 int space_before_; |
1235 #endif | 1233 #endif |
1236 }; | 1234 }; |
1237 | 1235 |
1238 } } // namespace v8::internal | 1236 } } // namespace v8::internal |
1239 | 1237 |
1240 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1238 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |