[aarch64-port-dev ] RFR: Fix SEGV with volatile field accesses
Andrew Dinn
adinn at redhat.com
Thu Feb 20 02:38:17 PST 2014
Hi Ed,
On 20/02/14 10:19, Andrew Dinn wrote:
> I think I have seen this problem before and I thought I came up with a
> way of fixing it. . . .
Ok, the case I was thinking of is one you can see above when we have a
MachCallNode. It implements a method ret_addr_offset() that allows the
location of the ret instruction to be computed relative to current
offset. The default implementation needs to be explicitly overridden in
the ad file if the ret does not appear at offset 0.
I think it would be safer and clearer to implement a similar solution i.e.
when a MachNode responds yes to mach->is_NullCheck() in
Compile::fill_buffer (that's the routine you quoted from output.cpp)
call mach->null_check_offset() to compute the offset to the null_check
instruction and add that in.
provide a default implementation on MachNode to return offset 0.
add a redefinition of null_check_offset() for the relevant machine
load nodes to the ad file (as is done for ret_addr_offset() q.v.).
Whatever we do we need to change generic code. So, I would prefer this
as an explicit way of marking what we are doing here. Your solution
works but I feel it is is much easier to misunderstand.
Andrew Haley, any thoughts on this?
regards,
Andrew Dinn
-----------
More information about the aarch64-port-dev
mailing list