--- a/hotspot/src/cpu/x86/vm/x86_32.ad Tue Apr 20 13:26:33 2010 -0700
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad Mon Apr 26 11:27:21 2010 -0700
@@ -1,5 +1,5 @@
//
-// Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
+// Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
@@ -6272,6 +6272,30 @@
ins_pipe( ialu_reg_reg);
%}
+instruct bytes_reverse_unsigned_short(eRegI dst) %{
+ match(Set dst (ReverseBytesUS dst));
+
+ format %{ "BSWAP $dst\n\t"
+ "SHR $dst,16\n\t" %}
+ ins_encode %{
+ __ bswapl($dst$$Register);
+ __ shrl($dst$$Register, 16);
+ %}
+ ins_pipe( ialu_reg );
+%}
+
+instruct bytes_reverse_short(eRegI dst) %{
+ match(Set dst (ReverseBytesS dst));
+
+ format %{ "BSWAP $dst\n\t"
+ "SAR $dst,16\n\t" %}
+ ins_encode %{
+ __ bswapl($dst$$Register);
+ __ sarl($dst$$Register, 16);
+ %}
+ ins_pipe( ialu_reg );
+%}
+
//---------- Zeros Count Instructions ------------------------------------------