--- a/hotspot/src/cpu/x86/vm/x86_32.ad Wed Mar 19 15:14:36 2008 -0700
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad Wed Mar 19 15:33:25 2008 -0700
@@ -10970,7 +10970,7 @@
%}
instruct convI2XD_reg(regXD dst, eRegI src) %{
- predicate( UseSSE>=2 );
+ predicate( UseSSE>=2 && !UseXmmI2D );
match(Set dst (ConvI2D src));
format %{ "CVTSI2SD $dst,$src" %}
opcode(0xF2, 0x0F, 0x2A);
@@ -10987,6 +10987,20 @@
ins_pipe( pipe_slow );
%}
+instruct convXI2XD_reg(regXD dst, eRegI src)
+%{
+ predicate( UseSSE>=2 && UseXmmI2D );
+ match(Set dst (ConvI2D src));
+
+ format %{ "MOVD $dst,$src\n\t"
+ "CVTDQ2PD $dst,$dst\t# i2d" %}
+ ins_encode %{
+ __ movd($dst$$XMMRegister, $src$$Register);
+ __ cvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe(pipe_slow); // XXX
+%}
+
instruct convI2D_mem(regD dst, memory mem) %{
predicate( UseSSE<=1 && !Compile::current()->select_24_bit_instr());
match(Set dst (ConvI2D (LoadI mem)));
@@ -11062,7 +11076,7 @@
// Convert an int to a float in xmm; no rounding step needed.
instruct convI2X_reg(regX dst, eRegI src) %{
- predicate(UseSSE>=1);
+ predicate( UseSSE==1 || UseSSE>=2 && !UseXmmI2F );
match(Set dst (ConvI2F src));
format %{ "CVTSI2SS $dst, $src" %}
@@ -11071,6 +11085,20 @@
ins_pipe( pipe_slow );
%}
+ instruct convXI2X_reg(regX dst, eRegI src)
+%{
+ predicate( UseSSE>=2 && UseXmmI2F );
+ match(Set dst (ConvI2F src));
+
+ format %{ "MOVD $dst,$src\n\t"
+ "CVTDQ2PS $dst,$dst\t# i2f" %}
+ ins_encode %{
+ __ movd($dst$$XMMRegister, $src$$Register);
+ __ cvtdq2ps($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe(pipe_slow); // XXX
+%}
+
instruct convI2L_reg( eRegL dst, eRegI src, eFlagsReg cr) %{
match(Set dst (ConvI2L src));
effect(KILL cr);