Mercurial > hg > truffle
comparison src/cpu/x86/vm/x86_32.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 |
---|---|
12627 OpcRegReg(0x33,EAX,EAX), | 12627 OpcRegReg(0x33,EAX,EAX), |
12628 Opcode(0xF3), Opcode(0xAB) ); | 12628 Opcode(0xF3), Opcode(0xAB) ); |
12629 ins_pipe( pipe_slow ); | 12629 ins_pipe( pipe_slow ); |
12630 %} | 12630 %} |
12631 | 12631 |
12632 instruct string_compare(eDIRegP str1, eCXRegI cnt1, eSIRegP str2, eBXRegI cnt2, | 12632 instruct string_compare(eDIRegP str1, eCXRegI cnt1, eSIRegP str2, eDXRegI cnt2, |
12633 eAXRegI result, regXD tmp1, regXD tmp2, eFlagsReg cr) %{ | 12633 eAXRegI result, regXD tmp1, eFlagsReg cr) %{ |
12634 match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2))); | 12634 match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2))); |
12635 effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL cr); | 12635 effect(TEMP tmp1, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL cr); |
12636 | 12636 |
12637 format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result // KILL $tmp1, $tmp2" %} | 12637 format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result // KILL $tmp1" %} |
12638 ins_encode %{ | 12638 ins_encode %{ |
12639 __ string_compare($str1$$Register, $str2$$Register, | 12639 __ string_compare($str1$$Register, $str2$$Register, |
12640 $cnt1$$Register, $cnt2$$Register, $result$$Register, | 12640 $cnt1$$Register, $cnt2$$Register, $result$$Register, |
12641 $tmp1$$XMMRegister, $tmp2$$XMMRegister); | 12641 $tmp1$$XMMRegister); |
12642 %} | 12642 %} |
12643 ins_pipe( pipe_slow ); | 12643 ins_pipe( pipe_slow ); |
12644 %} | 12644 %} |
12645 | 12645 |
12646 // fast string equals | 12646 // fast string equals |