| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 __ and_(edx, Operand(esp, 4)); | 98 __ and_(edx, Operand(esp, 4)); |
| 99 __ cmp(edx, 3); | 99 __ cmp(edx, 3); |
| 100 __ cmp(edx, Operand(esp, 4)); | 100 __ cmp(edx, Operand(esp, 4)); |
| 101 __ cmp(Operand(ebp, ecx, times_4, 0), Immediate(1000)); | 101 __ cmp(Operand(ebp, ecx, times_4, 0), Immediate(1000)); |
| 102 Handle<FixedArray> foo2 = Factory::NewFixedArray(10, TENURED); | 102 Handle<FixedArray> foo2 = Factory::NewFixedArray(10, TENURED); |
| 103 __ cmp(ebx, foo2); | 103 __ cmp(ebx, foo2); |
| 104 __ or_(edx, 3); | 104 __ or_(edx, 3); |
| 105 __ xor_(edx, 3); | 105 __ xor_(edx, 3); |
| 106 __ nop(); | 106 __ nop(); |
| 107 { | 107 { |
| 108 CHECK(CpuFeatures::IsSupported(CpuFeatures::CPUID)); | 108 CHECK(CpuFeatures::IsSupported(CPUID)); |
| 109 CpuFeatures::Scope fscope(CpuFeatures::CPUID); | 109 CpuFeatures::Scope fscope(CPUID); |
| 110 __ cpuid(); | 110 __ cpuid(); |
| 111 } | 111 } |
| 112 { | 112 { |
| 113 CHECK(CpuFeatures::IsSupported(CpuFeatures::RDTSC)); | 113 CHECK(CpuFeatures::IsSupported(RDTSC)); |
| 114 CpuFeatures::Scope fscope(CpuFeatures::RDTSC); | 114 CpuFeatures::Scope fscope(RDTSC); |
| 115 __ rdtsc(); | 115 __ rdtsc(); |
| 116 } | 116 } |
| 117 __ movsx_b(edx, Operand(ecx)); | 117 __ movsx_b(edx, Operand(ecx)); |
| 118 __ movsx_w(edx, Operand(ecx)); | 118 __ movsx_w(edx, Operand(ecx)); |
| 119 __ movzx_b(edx, Operand(ecx)); | 119 __ movzx_b(edx, Operand(ecx)); |
| 120 __ movzx_w(edx, Operand(ecx)); | 120 __ movzx_w(edx, Operand(ecx)); |
| 121 | 121 |
| 122 __ nop(); | 122 __ nop(); |
| 123 __ imul(edx, Operand(ecx)); | 123 __ imul(edx, Operand(ecx)); |
| 124 __ shld(edx, Operand(ecx)); | 124 __ shld(edx, Operand(ecx)); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 __ fdiv(3); | 346 __ fdiv(3); |
| 347 | 347 |
| 348 __ faddp(3); | 348 __ faddp(3); |
| 349 __ fsubp(3); | 349 __ fsubp(3); |
| 350 __ fmulp(3); | 350 __ fmulp(3); |
| 351 __ fdivp(3); | 351 __ fdivp(3); |
| 352 __ fcompp(); | 352 __ fcompp(); |
| 353 __ fwait(); | 353 __ fwait(); |
| 354 __ nop(); | 354 __ nop(); |
| 355 { | 355 { |
| 356 CHECK(CpuFeatures::IsSupported(CpuFeatures::SSE2)); | 356 CHECK(CpuFeatures::IsSupported(SSE2)); |
| 357 CpuFeatures::Scope fscope(CpuFeatures::SSE2); | 357 CpuFeatures::Scope fscope(SSE2); |
| 358 __ cvttss2si(edx, Operand(ebx, ecx, times_4, 10000)); | 358 __ cvttss2si(edx, Operand(ebx, ecx, times_4, 10000)); |
| 359 __ cvtsi2sd(xmm1, Operand(ebx, ecx, times_4, 10000)); | 359 __ cvtsi2sd(xmm1, Operand(ebx, ecx, times_4, 10000)); |
| 360 __ addsd(xmm1, xmm0); | 360 __ addsd(xmm1, xmm0); |
| 361 __ mulsd(xmm1, xmm0); | 361 __ mulsd(xmm1, xmm0); |
| 362 __ subsd(xmm1, xmm0); | 362 __ subsd(xmm1, xmm0); |
| 363 __ divsd(xmm1, xmm0); | 363 __ divsd(xmm1, xmm0); |
| 364 __ movdbl(xmm1, Operand(ebx, ecx, times_4, 10000)); | 364 __ movdbl(xmm1, Operand(ebx, ecx, times_4, 10000)); |
| 365 __ movdbl(Operand(ebx, ecx, times_4, 10000), xmm1); | 365 __ movdbl(Operand(ebx, ecx, times_4, 10000), xmm1); |
| 366 __ comisd(xmm0, xmm1); | 366 __ comisd(xmm0, xmm1); |
| 367 } | 367 } |
| 368 | 368 |
| 369 // cmov. | 369 // cmov. |
| 370 { | 370 { |
| 371 CHECK(CpuFeatures::IsSupported(CpuFeatures::CMOV)); | 371 CHECK(CpuFeatures::IsSupported(CMOV)); |
| 372 CpuFeatures::Scope use_cmov(CpuFeatures::CMOV); | 372 CpuFeatures::Scope use_cmov(CMOV); |
| 373 __ cmov(overflow, eax, Operand(eax, 0)); | 373 __ cmov(overflow, eax, Operand(eax, 0)); |
| 374 __ cmov(no_overflow, eax, Operand(eax, 1)); | 374 __ cmov(no_overflow, eax, Operand(eax, 1)); |
| 375 __ cmov(below, eax, Operand(eax, 2)); | 375 __ cmov(below, eax, Operand(eax, 2)); |
| 376 __ cmov(above_equal, eax, Operand(eax, 3)); | 376 __ cmov(above_equal, eax, Operand(eax, 3)); |
| 377 __ cmov(equal, eax, Operand(ebx, 0)); | 377 __ cmov(equal, eax, Operand(ebx, 0)); |
| 378 __ cmov(not_equal, eax, Operand(ebx, 1)); | 378 __ cmov(not_equal, eax, Operand(ebx, 1)); |
| 379 __ cmov(below_equal, eax, Operand(ebx, 2)); | 379 __ cmov(below_equal, eax, Operand(ebx, 2)); |
| 380 __ cmov(above, eax, Operand(ebx, 3)); | 380 __ cmov(above, eax, Operand(ebx, 3)); |
| 381 __ cmov(sign, eax, Operand(ecx, 0)); | 381 __ cmov(sign, eax, Operand(ecx, 0)); |
| 382 __ cmov(not_sign, eax, Operand(ecx, 1)); | 382 __ cmov(not_sign, eax, Operand(ecx, 1)); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 399 CHECK(code->IsCode()); | 399 CHECK(code->IsCode()); |
| 400 #ifdef DEBUG | 400 #ifdef DEBUG |
| 401 Code::cast(code)->Print(); | 401 Code::cast(code)->Print(); |
| 402 byte* begin = Code::cast(code)->instruction_start(); | 402 byte* begin = Code::cast(code)->instruction_start(); |
| 403 byte* end = begin + Code::cast(code)->instruction_size(); | 403 byte* end = begin + Code::cast(code)->instruction_size(); |
| 404 disasm::Disassembler::Disassemble(stdout, begin, end); | 404 disasm::Disassembler::Disassemble(stdout, begin, end); |
| 405 #endif | 405 #endif |
| 406 } | 406 } |
| 407 | 407 |
| 408 #undef __ | 408 #undef __ |
| OLD | NEW |