RFR: 8179444: AArch64: Put zero_words on a diet

Andrew Dinn adinn at redhat.com
Fri May 5 15:20:31 UTC 2017


On 05/05/17 16:06, Andrew Haley wrote:
> On 05/05/17 10:47, Andrew Dinn wrote:
>> On 03/05/17 18:05, Andrew Haley wrote:
>>> New version, corrected:
>>> . . .
>>> http://cr.openjdk.java.net/~aph/8179444-2/
>>>
>>> OK?
>>
>> The patch looks good (not an official review) except that I don't
>> understand one detail. Why does MacroAssembler::zero_words include this?
>>
>> +    RuntimeAddress zero_blocks =
>> RuntimeAddress(StubRoutines::aarch64::zero_blocks());
>> +    assert(zero_blocks.target() != NULL, "zero_blocks stub has not been
>> generated");
>> +    if (StubRoutines::aarch64::complete()) {
>> +      trampoline_call(zero_blocks);
>> +    } else {
>> +      bl(zero_blocks);
>> +    }
> 
> Trampoline calls only work from compiler-generated code, so we have to
> do something different when we're generating the stubs.  I suppose I
> could have had two versions of MacroAssembler::zero_words or added a
> parameter to say we're generating stubs.  Would that be clearer?

Ok, I see now. Two versions of the methods seems like overkill. A
comment before the if explaining what is going on is probably all that
is needed. For example:

+    // if stubs are complete then we are generating under
+    // the compiler so we need to use a trampoline_call
+    // otherwise we have to use a normal call
+    if (StubRoutines::aarch64::complete()) {
+      trampoline_call(zero_blocks);
+    } else {

I have not yet tested the patch. I will do so and report back.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the hotspot-dev mailing list