United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6805950 Typos in andL_rReg_imm instructions in x86_64.ad
JDK-6805950 : Typos in andL_rReg_imm instructions in x86_64.ad

Details
Type:
Bug
Submit Date:
2009-02-16
Status:
Resolved
Updated Date:
2010-07-29
Project Name:
JDK
Resolved Date:
2009-02-27
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P5
Resolution:
Fixed
Affected Versions:
hs15
Fixed Versions:
hs15 (b02)

Related Reports
Backport:
Backport:

Sub Tasks

Description
There are two typos in andL_rReg_imm instructions in x86_64.ad.

The first one generates confusing output with PrintOptoAssembly:

009   	movzbq  RAX, #255	# long & 0xFF

and the second generates a non-matching instruction (see rRegI):

instruct andL_rReg_imm65535(rRegI dst, immL_65535 src)

                                    

Comments
SUGGESTED FIX

The fix is trivial and produces the expected output:

--- test.bbef4344adb2/src/cpu/x86/vm/x86_64.ad	2009-02-16 13:58:14.166262213 +0100
+++ /export/home/twisti/hotspot-comp/test/src/cpu/x86/vm/x86_64.ad	2009-02-16 13:37:43.595432518 +0100
@@ -9490,14 +9490,14 @@ instruct andL_rReg_imm255(rRegL dst, imm
 %{
   match(Set dst (AndL dst src));
 
-  format %{ "movzbq  $dst, $src\t# long & 0xFF" %}
+  format %{ "movzbq  $dst, $dst\t# long & 0xFF" %}
   opcode(0x0F, 0xB6);
   ins_encode(REX_reg_reg_wide(dst, dst), OpcP, OpcS, reg_reg(dst, dst));
   ins_pipe(ialu_reg);
 %}
 
 // And Register with Immediate 65535
-instruct andL_rReg_imm65535(rRegI dst, immL_65535 src)
+instruct andL_rReg_imm65535(rRegL dst, immL_65535 src)
 %{
   match(Set dst (AndL dst src));
                                     
2009-02-16
EVALUATION

The fix is trivial as suggested.
                                     
2009-02-16
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/2cacccded90f
                                     
2009-02-17



Hardware and Software, Engineered to Work Together