Mercurial > hg > truffle
comparison src/cpu/x86/vm/x86_64.ad @ 7482:989155e2d07a
Merge with hs25-b15.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 16 Jan 2013 01:34:24 +0100 |
parents | 00af3a3a8df4 |
children | b30b3c2a0cf2 |
comparison
equal
deleted
inserted
replaced
7381:6761a8f854a4 | 7482:989155e2d07a |
---|---|
10372 // ======================================================================= | 10372 // ======================================================================= |
10373 // fast clearing of an array | 10373 // fast clearing of an array |
10374 instruct rep_stos(rcx_RegL cnt, rdi_RegP base, rax_RegI zero, Universe dummy, | 10374 instruct rep_stos(rcx_RegL cnt, rdi_RegP base, rax_RegI zero, Universe dummy, |
10375 rFlagsReg cr) | 10375 rFlagsReg cr) |
10376 %{ | 10376 %{ |
10377 predicate(!UseFastStosb); | |
10377 match(Set dummy (ClearArray cnt base)); | 10378 match(Set dummy (ClearArray cnt base)); |
10378 effect(USE_KILL cnt, USE_KILL base, KILL zero, KILL cr); | 10379 effect(USE_KILL cnt, USE_KILL base, KILL zero, KILL cr); |
10379 | 10380 |
10380 format %{ "xorl rax, rax\t# ClearArray:\n\t" | 10381 format %{ "xorq rax, rax\t# ClearArray:\n\t" |
10381 "rep stosq\t# Store rax to *rdi++ while rcx--" %} | 10382 "rep stosq\t# Store rax to *rdi++ while rcx--" %} |
10382 ins_encode(opc_reg_reg(0x33, RAX, RAX), // xorl %eax, %eax | 10383 ins_encode %{ |
10383 Opcode(0xF3), Opcode(0x48), Opcode(0xAB)); // rep REX_W stos | 10384 __ clear_mem($base$$Register, $cnt$$Register, $zero$$Register); |
10385 %} | |
10384 ins_pipe(pipe_slow); | 10386 ins_pipe(pipe_slow); |
10387 %} | |
10388 | |
10389 instruct rep_fast_stosb(rcx_RegL cnt, rdi_RegP base, rax_RegI zero, Universe dummy, | |
10390 rFlagsReg cr) | |
10391 %{ | |
10392 predicate(UseFastStosb); | |
10393 match(Set dummy (ClearArray cnt base)); | |
10394 effect(USE_KILL cnt, USE_KILL base, KILL zero, KILL cr); | |
10395 format %{ "xorq rax, rax\t# ClearArray:\n\t" | |
10396 "shlq rcx,3\t# Convert doublewords to bytes\n\t" | |
10397 "rep stosb\t# Store rax to *rdi++ while rcx--" %} | |
10398 ins_encode %{ | |
10399 __ clear_mem($base$$Register, $cnt$$Register, $zero$$Register); | |
10400 %} | |
10401 ins_pipe( pipe_slow ); | |
10385 %} | 10402 %} |
10386 | 10403 |
10387 instruct string_compare(rdi_RegP str1, rcx_RegI cnt1, rsi_RegP str2, rdx_RegI cnt2, | 10404 instruct string_compare(rdi_RegP str1, rcx_RegI cnt1, rsi_RegP str2, rdx_RegI cnt2, |
10388 rax_RegI result, regD tmp1, rFlagsReg cr) | 10405 rax_RegI result, regD tmp1, rFlagsReg cr) |
10389 %{ | 10406 %{ |