comparison src/cpu/x86/vm/x86_64.ad @ 2262:6bbaedb03534

7016474: string compare intrinsic improvements Reviewed-by: kvn
author never
date Wed, 09 Feb 2011 15:02:23 -0800
parents 2f644f85485d
children 41d4973cf100
comparison
equal deleted inserted replaced
2261:1957c1478794 2262:6bbaedb03534
11581 ins_encode(opc_reg_reg(0x33, RAX, RAX), // xorl %eax, %eax 11581 ins_encode(opc_reg_reg(0x33, RAX, RAX), // xorl %eax, %eax
11582 Opcode(0xF3), Opcode(0x48), Opcode(0xAB)); // rep REX_W stos 11582 Opcode(0xF3), Opcode(0x48), Opcode(0xAB)); // rep REX_W stos
11583 ins_pipe(pipe_slow); 11583 ins_pipe(pipe_slow);
11584 %} 11584 %}
11585 11585
11586 instruct string_compare(rdi_RegP str1, rcx_RegI cnt1, rsi_RegP str2, rbx_RegI cnt2, 11586 instruct string_compare(rdi_RegP str1, rcx_RegI cnt1, rsi_RegP str2, rdx_RegI cnt2,
11587 rax_RegI result, regD tmp1, regD tmp2, rFlagsReg cr) 11587 rax_RegI result, regD tmp1, rFlagsReg cr)
11588 %{ 11588 %{
11589 match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2))); 11589 match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2)));
11590 effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL cr); 11590 effect(TEMP tmp1, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL cr);
11591 11591
11592 format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result // KILL $tmp1, $tmp2" %} 11592 format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result // KILL $tmp1" %}
11593 ins_encode %{ 11593 ins_encode %{
11594 __ string_compare($str1$$Register, $str2$$Register, 11594 __ string_compare($str1$$Register, $str2$$Register,
11595 $cnt1$$Register, $cnt2$$Register, $result$$Register, 11595 $cnt1$$Register, $cnt2$$Register, $result$$Register,
11596 $tmp1$$XMMRegister, $tmp2$$XMMRegister); 11596 $tmp1$$XMMRegister);
11597 %} 11597 %}
11598 ins_pipe( pipe_slow ); 11598 ins_pipe( pipe_slow );
11599 %} 11599 %}
11600 11600
11601 instruct string_indexof(rdi_RegP str1, rdx_RegI cnt1, rsi_RegP str2, rax_RegI cnt2, 11601 instruct string_indexof(rdi_RegP str1, rdx_RegI cnt1, rsi_RegP str2, rax_RegI cnt2,