RFR: 8173472: AArch64: C1 comparisons with null only use 32-bit instructions

David Holmes david.holmes at oracle.com
Mon Jan 30 01:06:40 UTC 2017


On 27/01/2017 11:36 PM, Andrew Haley wrote:
> On 27/01/17 11:17, Stuart Monteith wrote:
>> I'm probably missing some knowledge, but this code looks a little
>> inconsistent from a superficial reading of the code:
>>
>> 1936       case T_ADDRESS:
>> 1937         imm = opr2->as_constant_ptr()->as_jint();
>> 1938         break;
>>
>> should this be handled as_jlong() or should it be setting "is_32bit = true" ?
>
> No.  Oddly, as_jint() is used for addresses.
>
>   jint      as_jint()    const         { type_check(T_INT, T_ADDRESS); return _value.get_jint(); }
>
> I don't get it either, but if you look through the C1 source you'll
> see that as_jint() is used consistently.  Even here:
>
>     case T_ADDRESS: {
> #ifdef _LP64
>       scope_values->append(new ConstantLongValue(c->as_jint()));
> #else
>       scope_values->append(new ConstantIntValue(c->as_jint()));
> #endif
>       return 1;
>     }

IIRC C1 was 32-bit only - maybe even never officially supported on 
64-bit, just as part of tiered ?? Is this code buggy or just quirky?

David

> Andrew.
>


More information about the hotspot-dev mailing list