RFR: 8179444: AArch64: Put zero_words on a diet (original) (raw)
Andrew Dinn adinn at redhat.com
Fri May 5 15:20:31 UTC 2017
- Previous message: RFR: 8179444: AArch64: Put zero_words on a diet
- Next message: RFR: 8179444: AArch64: Put zero_words on a diet
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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::zerowords include this? + RuntimeAddress zeroblocks = RuntimeAddress(StubRoutines::aarch64::zeroblocks()); + assert(zeroblocks.target() != NULL, "zeroblocks stub has not been generated"); + if (StubRoutines::aarch64::complete()) { + trampolinecall(zeroblocks); + } else { + bl(zeroblocks); + } 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::zerowords 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
- Previous message: RFR: 8179444: AArch64: Put zero_words on a diet
- Next message: RFR: 8179444: AArch64: Put zero_words on a diet
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]