| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 struct SSE2Check { | 614 struct SSE2Check { |
| 615 SSE2Check() | 615 SSE2Check() |
| 616 { | 616 { |
| 617 int flags; | 617 int flags; |
| 618 #if COMPILER(MSVC) | 618 #if COMPILER(MSVC) |
| 619 _asm { | 619 _asm { |
| 620 mov eax, 1 // cpuid function 1 gives us the standard feature set | 620 mov eax, 1 // cpuid function 1 gives us the standard feature set |
| 621 cpuid; | 621 cpuid; |
| 622 mov flags, edx; | 622 mov flags, edx; |
| 623 } | 623 } |
| 624 #elif COMPILER(GCC) |
| 625 asm ( |
| 626 "movl $0x1, %%eax;" |
| 627 "pushl %%ebx;" |
| 628 "cpuid;" |
| 629 "popl %%ebx;" |
| 630 "movl %%edx, %0;" |
| 631 : "=g" (flags) |
| 632 : |
| 633 : "%eax", "%ecx", "%edx" |
| 634 ); |
| 624 #else | 635 #else |
| 625 flags = 0; | 636 flags = 0; |
| 626 // FIXME: Add GCC code to do above asm | |
| 627 #endif | 637 #endif |
| 628 present = (flags & SSE2FeatureBit) != 0; | 638 present = (flags & SSE2FeatureBit) != 0; |
| 629 } | 639 } |
| 630 bool present; | 640 bool present; |
| 631 }; | 641 }; |
| 632 static SSE2Check check; | 642 static SSE2Check check; |
| 633 return check.present; | 643 return check.present; |
| 634 } | 644 } |
| 635 | 645 |
| 636 #endif | 646 #endif |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 void JIT::compileFastArithSlow_op_sub(Instruction* currentInstruction, Vector<Sl
owCaseEntry>::iterator& iter) | 991 void JIT::compileFastArithSlow_op_sub(Instruction* currentInstruction, Vector<Sl
owCaseEntry>::iterator& iter) |
| 982 { | 992 { |
| 983 compileBinaryArithOpSlowCase(op_sub, iter, currentInstruction[1].u.operand,
currentInstruction[2].u.operand, currentInstruction[3].u.operand, OperandTypes::
fromInt(currentInstruction[4].u.operand)); | 993 compileBinaryArithOpSlowCase(op_sub, iter, currentInstruction[1].u.operand,
currentInstruction[2].u.operand, currentInstruction[3].u.operand, OperandTypes::
fromInt(currentInstruction[4].u.operand)); |
| 984 } | 994 } |
| 985 | 995 |
| 986 #endif | 996 #endif |
| 987 | 997 |
| 988 } // namespace JSC | 998 } // namespace JSC |
| 989 | 999 |
| 990 #endif // ENABLE(JIT) | 1000 #endif // ENABLE(JIT) |
| OLD | NEW |