Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/x86_32.ad @ 7637:b30b3c2a0cf2
6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
Summary: Use SSE4.2 and AVX2 instructions for encodeArray intrinsic.
Reviewed-by: roland
author | kvn |
---|---|
date | Tue, 22 Jan 2013 15:34:16 -0800 |
parents | 00af3a3a8df4 |
children | e961c11b85fe |
comparison
equal
deleted
inserted
replaced
7636:a7114d3d712e | 7637:b30b3c2a0cf2 |
---|---|
11685 $tmp1$$XMMRegister, $tmp2$$XMMRegister); | 11685 $tmp1$$XMMRegister, $tmp2$$XMMRegister); |
11686 %} | 11686 %} |
11687 ins_pipe( pipe_slow ); | 11687 ins_pipe( pipe_slow ); |
11688 %} | 11688 %} |
11689 | 11689 |
11690 // encode char[] to byte[] in ISO_8859_1 | |
11691 instruct encode_iso_array(eSIRegP src, eDIRegP dst, eDXRegI len, | |
11692 regD tmp1, regD tmp2, regD tmp3, regD tmp4, | |
11693 eCXRegI tmp5, eAXRegI result, eFlagsReg cr) %{ | |
11694 match(Set result (EncodeISOArray src (Binary dst len))); | |
11695 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, USE_KILL src, USE_KILL dst, USE_KILL len, KILL tmp5, KILL cr); | |
11696 | |
11697 format %{ "Encode array $src,$dst,$len -> $result // KILL ECX, EDX, $tmp1, $tmp2, $tmp3, $tmp4, ESI, EDI " %} | |
11698 ins_encode %{ | |
11699 __ encode_iso_array($src$$Register, $dst$$Register, $len$$Register, | |
11700 $tmp1$$XMMRegister, $tmp2$$XMMRegister, $tmp3$$XMMRegister, | |
11701 $tmp4$$XMMRegister, $tmp5$$Register, $result$$Register); | |
11702 %} | |
11703 ins_pipe( pipe_slow ); | |
11704 %} | |
11705 | |
11706 | |
11690 //----------Control Flow Instructions------------------------------------------ | 11707 //----------Control Flow Instructions------------------------------------------ |
11691 // Signed compare Instructions | 11708 // Signed compare Instructions |
11692 instruct compI_eReg(eFlagsReg cr, rRegI op1, rRegI op2) %{ | 11709 instruct compI_eReg(eFlagsReg cr, rRegI op1, rRegI op2) %{ |
11693 match(Set cr (CmpI op1 op2)); | 11710 match(Set cr (CmpI op1 op2)); |
11694 effect( DEF cr, USE op1, USE op2 ); | 11711 effect( DEF cr, USE op1, USE op2 ); |