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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 // Detect features of the target CPU. Set safe defaults if the serializer | 468 // Detect features of the target CPU. Set safe defaults if the serializer |
469 // is enabled (snapshots must be portable). | 469 // is enabled (snapshots must be portable). |
470 static void Probe(); | 470 static void Probe(); |
471 | 471 |
472 // Check whether a feature is supported by the target CPU. | 472 // Check whether a feature is supported by the target CPU. |
473 static bool IsSupported(CpuFeature f) { | 473 static bool IsSupported(CpuFeature f) { |
474 ASSERT(initialized_); | 474 ASSERT(initialized_); |
475 if (f == SSE3 && !FLAG_enable_sse3) return false; | 475 if (f == SSE3 && !FLAG_enable_sse3) return false; |
476 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; | 476 if (f == SSE4_1 && !FLAG_enable_sse4_1) return false; |
477 if (f == CMOV && !FLAG_enable_cmov) return false; | 477 if (f == CMOV && !FLAG_enable_cmov) return false; |
478 if (f == RDTSC && !FLAG_enable_rdtsc) return false; | |
479 if (f == SAHF && !FLAG_enable_sahf) return false; | 478 if (f == SAHF && !FLAG_enable_sahf) return false; |
480 return (supported_ & (static_cast<uint64_t>(1) << f)) != 0; | 479 return (supported_ & (static_cast<uint64_t>(1) << f)) != 0; |
481 } | 480 } |
482 | 481 |
483 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { | 482 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { |
484 ASSERT(initialized_); | 483 ASSERT(initialized_); |
485 return (found_by_runtime_probing_only_ & | 484 return (found_by_runtime_probing_only_ & |
486 (static_cast<uint64_t>(1) << f)) != 0; | 485 (static_cast<uint64_t>(1) << f)) != 0; |
487 } | 486 } |
488 | 487 |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 void bt(const Operand& dst, Register src); | 1168 void bt(const Operand& dst, Register src); |
1170 void bts(const Operand& dst, Register src); | 1169 void bts(const Operand& dst, Register src); |
1171 | 1170 |
1172 // Miscellaneous | 1171 // Miscellaneous |
1173 void clc(); | 1172 void clc(); |
1174 void cld(); | 1173 void cld(); |
1175 void cpuid(); | 1174 void cpuid(); |
1176 void hlt(); | 1175 void hlt(); |
1177 void int3(); | 1176 void int3(); |
1178 void nop(); | 1177 void nop(); |
1179 void rdtsc(); | |
1180 void ret(int imm16); | 1178 void ret(int imm16); |
1181 void setcc(Condition cc, Register reg); | 1179 void setcc(Condition cc, Register reg); |
1182 | 1180 |
1183 // Label operations & relative jumps (PPUM Appendix D) | 1181 // Label operations & relative jumps (PPUM Appendix D) |
1184 // | 1182 // |
1185 // Takes a branch opcode (cc) and a label (L) and generates | 1183 // Takes a branch opcode (cc) and a label (L) and generates |
1186 // either a backward branch or a forward branch and links it | 1184 // either a backward branch or a forward branch and links it |
1187 // to the label fixup chain. Usage: | 1185 // to the label fixup chain. Usage: |
1188 // | 1186 // |
1189 // Label L; // unbound label | 1187 // Label L; // unbound label |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1659 private: | 1657 private: |
1660 Assembler* assembler_; | 1658 Assembler* assembler_; |
1661 #ifdef DEBUG | 1659 #ifdef DEBUG |
1662 int space_before_; | 1660 int space_before_; |
1663 #endif | 1661 #endif |
1664 }; | 1662 }; |
1665 | 1663 |
1666 } } // namespace v8::internal | 1664 } } // namespace v8::internal |
1667 | 1665 |
1668 #endif // V8_X64_ASSEMBLER_X64_H_ | 1666 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |