src/dst register for andI_rReg_imm255 and andI_rReg_imm65535

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Mon Sep 21 12:35:08 PDT 2009

The src is not register, it is Int constant which could be immediate
value. We use "movzbl  $dst, $dst" to avoid immediate value and reduce
the instruction size.

instruct andI_rReg_imm255(rRegI dst, immI_255 src)
   match(Set dst (AndI dst src));

The spill you see is to preserve the original value (which should be
used later again) since the dst will be modified. The spill
should not be related to int constant value "src".

Could you show assembler?


Christian Thalinger wrote:
> Vladimir Kozlov wrote:
>> Christian,
>> Can you tell more about the problem you see?
>> The instructions you pointing use dst register only:
>> "movzbl  $dst, $dst\t# int & 0xFF"
> Right.  Well, it's not a problem, I just wonder why it does not use the
> src register:
> "movzbl  $dst, $src\t# int & 0xFF"
> but instead we have to emit a spill instruction to move src to dst.
> -- Christian

More information about the hotspot-compiler-dev mailing list