| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 __ and_(rdx, Immediate(3)); | 83 __ and_(rdx, Immediate(3)); |
| 84 __ and_(rdx, Operand(rsp, 4)); | 84 __ and_(rdx, Operand(rsp, 4)); |
| 85 __ cmpq(rdx, Immediate(3)); | 85 __ cmpq(rdx, Immediate(3)); |
| 86 __ cmpq(rdx, Operand(rsp, 4)); | 86 __ cmpq(rdx, Operand(rsp, 4)); |
| 87 __ cmpq(Operand(rbp, rcx, times_4, 0), Immediate(1000)); | 87 __ cmpq(Operand(rbp, rcx, times_4, 0), Immediate(1000)); |
| 88 __ cmpb(rbx, Operand(rbp, rcx, times_2, 0)); | 88 __ cmpb(rbx, Operand(rbp, rcx, times_2, 0)); |
| 89 __ cmpb(Operand(rbp, rcx, times_2, 0), rbx); | 89 __ cmpb(Operand(rbp, rcx, times_2, 0), rbx); |
| 90 __ or_(rdx, Immediate(3)); | 90 __ or_(rdx, Immediate(3)); |
| 91 __ xor_(rdx, Immediate(3)); | 91 __ xor_(rdx, Immediate(3)); |
| 92 __ nop(); | 92 __ nop(); |
| 93 { | 93 __ cpuid(); |
| 94 CHECK(CpuFeatures::IsSupported(CPUID)); | |
| 95 CpuFeatures::Scope fscope(CPUID); | |
| 96 __ cpuid(); | |
| 97 } | |
| 98 __ movsxbq(rdx, Operand(rcx, 0)); | 94 __ movsxbq(rdx, Operand(rcx, 0)); |
| 99 __ movsxwq(rdx, Operand(rcx, 0)); | 95 __ movsxwq(rdx, Operand(rcx, 0)); |
| 100 __ movzxbl(rdx, Operand(rcx, 0)); | 96 __ movzxbl(rdx, Operand(rcx, 0)); |
| 101 __ movzxwl(rdx, Operand(rcx, 0)); | 97 __ movzxwl(rdx, Operand(rcx, 0)); |
| 102 __ movzxbq(rdx, Operand(rcx, 0)); | 98 __ movzxbq(rdx, Operand(rcx, 0)); |
| 103 __ movzxwq(rdx, Operand(rcx, 0)); | 99 __ movzxwq(rdx, Operand(rcx, 0)); |
| 104 | 100 |
| 105 __ nop(); | 101 __ nop(); |
| 106 __ imul(rdx, rcx); | 102 __ imul(rdx, rcx); |
| 107 __ shld(rdx, rcx); | 103 __ shld(rdx, rcx); |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 __ faddp(3); | 327 __ faddp(3); |
| 332 __ fsubp(3); | 328 __ fsubp(3); |
| 333 __ fmulp(3); | 329 __ fmulp(3); |
| 334 __ fdivp(3); | 330 __ fdivp(3); |
| 335 __ fcompp(); | 331 __ fcompp(); |
| 336 __ fwait(); | 332 __ fwait(); |
| 337 __ nop(); | 333 __ nop(); |
| 338 | 334 |
| 339 // SSE instruction | 335 // SSE instruction |
| 340 { | 336 { |
| 337 // Move operation |
| 341 __ cvttss2si(rdx, Operand(rbx, rcx, times_4, 10000)); | 338 __ cvttss2si(rdx, Operand(rbx, rcx, times_4, 10000)); |
| 342 __ cvttss2si(rdx, xmm1); | 339 __ cvttss2si(rdx, xmm1); |
| 343 __ movaps(xmm0, xmm1); | 340 __ movaps(xmm0, xmm1); |
| 344 | 341 |
| 342 // logic operation |
| 345 __ andps(xmm0, xmm1); | 343 __ andps(xmm0, xmm1); |
| 344 __ andps(xmm0, Operand(rbx, rcx, times_4, 10000)); |
| 346 __ orps(xmm0, xmm1); | 345 __ orps(xmm0, xmm1); |
| 346 __ ordps(xmm0, Operand(rbx, rcx, times_4, 10000)); |
| 347 __ xorps(xmm0, xmm1); | 347 __ xorps(xmm0, xmm1); |
| 348 __ xordps(xmm0, Operand(rbx, rcx, times_4, 10000)); |
| 349 |
| 350 // Arithmetic operation |
| 351 __ addps(xmm1, xmm0); |
| 352 __ addps(xmm1, Operand(rbx, rcx, times_4, 10000)); |
| 353 __ subps(xmm1, xmm0); |
| 354 __ subps(xmm1, Operand(rbx, rcx, times_4, 10000)); |
| 355 __ mulps(xmm1, xmm0); |
| 356 __ mulps(xmm1, Operand(rbx, ecx, times_4, 10000)); |
| 357 __ divps(xmm1, xmm0); |
| 358 __ divps(xmm1, Operand(rbx, rcx, times_4, 10000)); |
| 348 } | 359 } |
| 349 // SSE 2 instructions | 360 // SSE 2 instructions |
| 350 { | 361 { |
| 351 __ cvttsd2si(rdx, Operand(rbx, rcx, times_4, 10000)); | 362 __ cvttsd2si(rdx, Operand(rbx, rcx, times_4, 10000)); |
| 352 __ cvttsd2si(rdx, xmm1); | 363 __ cvttsd2si(rdx, xmm1); |
| 353 __ cvttsd2siq(rdx, xmm1); | 364 __ cvttsd2siq(rdx, xmm1); |
| 354 __ movsd(xmm1, Operand(rbx, rcx, times_4, 10000)); | 365 __ movsd(xmm1, Operand(rbx, rcx, times_4, 10000)); |
| 355 __ movsd(Operand(rbx, rcx, times_4, 10000), xmm1); | 366 __ movsd(Operand(rbx, rcx, times_4, 10000), xmm1); |
| 356 // 128 bit move instructions. | 367 // 128 bit move instructions. |
| 357 __ movdqa(xmm0, Operand(rbx, rcx, times_4, 10000)); | 368 __ movdqa(xmm0, Operand(rbx, rcx, times_4, 10000)); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 CHECK(code->IsCode()); | 420 CHECK(code->IsCode()); |
| 410 #ifdef OBJECT_PRINT | 421 #ifdef OBJECT_PRINT |
| 411 Code::cast(code)->Print(); | 422 Code::cast(code)->Print(); |
| 412 byte* begin = Code::cast(code)->instruction_start(); | 423 byte* begin = Code::cast(code)->instruction_start(); |
| 413 byte* end = begin + Code::cast(code)->instruction_size(); | 424 byte* end = begin + Code::cast(code)->instruction_size(); |
| 414 disasm::Disassembler::Disassemble(stdout, begin, end); | 425 disasm::Disassembler::Disassemble(stdout, begin, end); |
| 415 #endif | 426 #endif |
| 416 } | 427 } |
| 417 | 428 |
| 418 #undef __ | 429 #undef __ |
| OLD | NEW |