Revision f230a1cf deps/v8/test/cctest/test-disasm-x64.cc

View differences:

deps/v8/test/cctest/test-disasm-x64.cc
50 50
  CcTest::InitializeVM();
51 51
  v8::HandleScope scope;
52 52
  v8::internal::byte buffer[2048];
53
  Assembler assm(Isolate::Current(), buffer, sizeof buffer);
53
  Assembler assm(CcTest::i_isolate(), buffer, sizeof buffer);
54 54
  DummyStaticFunction(NULL);  // just bloody use it (DELETE; debugging)
55 55

  
56 56
  // Short immediate instructions
......
239 239
  __ bind(&L2);
240 240
  __ call(Operand(rbx, rcx, times_4, 10000));
241 241
  __ nop();
242
  Handle<Code> ic(Isolate::Current()->builtins()->builtin(
242
  Handle<Code> ic(CcTest::i_isolate()->builtins()->builtin(
243 243
      Builtins::kLoadIC_Initialize));
244 244
  __ call(ic, RelocInfo::CODE_TARGET);
245 245
  __ nop();
......
335 335
  __ fcompp();
336 336
  __ fwait();
337 337
  __ nop();
338

  
339
  // SSE instruction
338 340
  {
339
    if (CpuFeatures::IsSupported(SSE2)) {
340
      CpuFeatures::Scope fscope(SSE2);
341
      __ cvttss2si(rdx, Operand(rbx, rcx, times_4, 10000));
342
      __ cvttss2si(rdx, xmm1);
343
      __ cvttsd2si(rdx, Operand(rbx, rcx, times_4, 10000));
344
      __ cvttsd2si(rdx, xmm1);
345
      __ cvttsd2siq(rdx, xmm1);
346
      __ addsd(xmm1, xmm0);
347
      __ mulsd(xmm1, xmm0);
348
      __ subsd(xmm1, xmm0);
349
      __ divsd(xmm1, xmm0);
350
      __ movsd(xmm1, Operand(rbx, rcx, times_4, 10000));
351
      __ movsd(Operand(rbx, rcx, times_4, 10000), xmm1);
352
      __ ucomisd(xmm0, xmm1);
353

  
354
      // 128 bit move instructions.
355
      __ movdqa(xmm0, Operand(rbx, rcx, times_4, 10000));
356
      __ movdqa(Operand(rbx, rcx, times_4, 10000), xmm0);
357
    }
341
    __ cvttss2si(rdx, Operand(rbx, rcx, times_4, 10000));
342
    __ cvttss2si(rdx, xmm1);
343
    __ movaps(xmm0, xmm1);
344

  
345
    __ andps(xmm0, xmm1);
346
  }
347
  // SSE 2 instructions
348
  {
349
    __ cvttsd2si(rdx, Operand(rbx, rcx, times_4, 10000));
350
    __ cvttsd2si(rdx, xmm1);
351
    __ cvttsd2siq(rdx, xmm1);
352
    __ movsd(xmm1, Operand(rbx, rcx, times_4, 10000));
353
    __ movsd(Operand(rbx, rcx, times_4, 10000), xmm1);
354
    // 128 bit move instructions.
355
    __ movdqa(xmm0, Operand(rbx, rcx, times_4, 10000));
356
    __ movdqa(Operand(rbx, rcx, times_4, 10000), xmm0);
357

  
358
    __ addsd(xmm1, xmm0);
359
    __ mulsd(xmm1, xmm0);
360
    __ subsd(xmm1, xmm0);
361
    __ divsd(xmm1, xmm0);
362
    __ ucomisd(xmm0, xmm1);
363

  
364
    __ andpd(xmm0, xmm1);
358 365
  }
359 366

  
360 367
  // cmov.
361 368
  {
362
    if (CpuFeatures::IsSupported(CMOV)) {
363
      CpuFeatures::Scope use_cmov(CMOV);
364
      __ cmovq(overflow, rax, Operand(rax, 0));
365
      __ cmovq(no_overflow, rax, Operand(rax, 1));
366
      __ cmovq(below, rax, Operand(rax, 2));
367
      __ cmovq(above_equal, rax, Operand(rax, 3));
368
      __ cmovq(equal, rax, Operand(rbx, 0));
369
      __ cmovq(not_equal, rax, Operand(rbx, 1));
370
      __ cmovq(below_equal, rax, Operand(rbx, 2));
371
      __ cmovq(above, rax, Operand(rbx, 3));
372
      __ cmovq(sign, rax, Operand(rcx, 0));
373
      __ cmovq(not_sign, rax, Operand(rcx, 1));
374
      __ cmovq(parity_even, rax, Operand(rcx, 2));
375
      __ cmovq(parity_odd, rax, Operand(rcx, 3));
376
      __ cmovq(less, rax, Operand(rdx, 0));
377
      __ cmovq(greater_equal, rax, Operand(rdx, 1));
378
      __ cmovq(less_equal, rax, Operand(rdx, 2));
379
      __ cmovq(greater, rax, Operand(rdx, 3));
380
    }
369
    __ cmovq(overflow, rax, Operand(rax, 0));
370
    __ cmovq(no_overflow, rax, Operand(rax, 1));
371
    __ cmovq(below, rax, Operand(rax, 2));
372
    __ cmovq(above_equal, rax, Operand(rax, 3));
373
    __ cmovq(equal, rax, Operand(rbx, 0));
374
    __ cmovq(not_equal, rax, Operand(rbx, 1));
375
    __ cmovq(below_equal, rax, Operand(rbx, 2));
376
    __ cmovq(above, rax, Operand(rbx, 3));
377
    __ cmovq(sign, rax, Operand(rcx, 0));
378
    __ cmovq(not_sign, rax, Operand(rcx, 1));
379
    __ cmovq(parity_even, rax, Operand(rcx, 2));
380
    __ cmovq(parity_odd, rax, Operand(rcx, 3));
381
    __ cmovq(less, rax, Operand(rdx, 0));
382
    __ cmovq(greater_equal, rax, Operand(rdx, 1));
383
    __ cmovq(less_equal, rax, Operand(rdx, 2));
384
    __ cmovq(greater, rax, Operand(rdx, 3));
381 385
  }
382 386

  
383
  // andpd, etc.
384 387
  {
385
    if (CpuFeatures::IsSupported(SSE2)) {
386
      CpuFeatures::Scope fscope(SSE2);
387
      __ andpd(xmm0, xmm1);
388
      __ andpd(xmm1, xmm2);
389

  
390
      __ movaps(xmm0, xmm1);
391
      __ movaps(xmm1, xmm2);
388
    if (CpuFeatures::IsSupported(SSE4_1)) {
389
      CpuFeatureScope scope(&assm, SSE4_1);
390
      __ extractps(rax, xmm1, 0);
392 391
    }
393 392
  }
394 393

  
......
401 400

  
402 401
  CodeDesc desc;
403 402
  assm.GetCode(&desc);
404
  Object* code = HEAP->CreateCode(
403
  Object* code = CcTest::heap()->CreateCode(
405 404
      desc,
406 405
      Code::ComputeFlags(Code::STUB),
407 406
      Handle<Code>())->ToObjectChecked();

Also available in: Unified diff