[aarch64-port-dev ] Weird thing in c1 compiler code
Edward Nevill
edward.nevill at linaro.org
Tue Aug 19 08:31:03 UTC 2014
On Mon, 2014-08-18 at 14:49 +0100, Andrew Dinn wrote:
> On 08/08/14 10:08, Andrew Haley wrote:
> > On 07/08/14 21:59, Andrew Haley wrote:
> >>> Specifically, why is the else if branch testing for T_DOUBLE?
> >> It shouldn't be: AFAICS that case is unreachable.
> >
> > Ah, but it might not be: it is possible to stash a double in an
> > integer register. That might be why it's there.
>
> Ok, that does indeed make sense -- although the same case is not present
> in the x86 code yet the same possibility is there with x86, no? (also,
> mutatis mutandis, with a float value and an integer register).
>
> I was just wondering if whoever added this case had a good reason why.
> Ed, maybe?
Beats me.
The change was added by Andrew on May 22 last year.
# HG changeset patch
# User aph
# Date 1369218144 -3600
# Wed May 22 11:22:24 2013 +0100
# Branch aarch64_c1
# Node ID 31a822a80cae49157ef2c02baabfd5018822b171
# Parent 9baee4e65ac5665fa3d8c6ba75d6b58018c317f4
More minor C1 bug fixes.
...
@@ -688,7 +703,7 @@
if (type == T_ARRAY || type == T_OBJECT) {
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
__ verify_oop(src->as_register());
- } else if (type == T_METADATA) {
+ } else if (type == T_METADATA || type == T_DOUBLE) {
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
} else {
__ strw(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
...
The change seems to have been added as a specific change. IE It does not seem to be the result of an accidental merge.
I guess the reasons are just lost in history.
Regards,
Ed.
More information about the aarch64-port-dev
mailing list