This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: s390: larl for Simode on 64-bit
- From: DJ Delorie <dj at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 8 Jul 2015 23:26:34 -0400
- Subject: Re: s390: larl for Simode on 64-bit
- Authentication-results: sourceware.org; auth=none
- References: <201507082033 dot t68KXrdI028695 at greed dot delorie dot com> <559D8DBD dot 60508 at redhat dot com> <201507082105 dot t68L57dx030059 at greed dot delorie dot com> <559DE74A dot 9020702 at redhat dot com>
> So in effect, we have two pointer sizes, 64 being the default, but
> we can also get a 32 bit pointer via the syntax above? Wow, I'm
> surprised that works.
Yup, been that way for many years.
> And the only time we'd be able to use larl is a dereference of a
> pointer declared with the syntax above. Right
larl would be used to load the address of an object to *initialize*
such a pointer, but yes. Regular pointers still use larl but as a
DImode operation. I.e. larl will always load a 64-bit value into a
register, even if gcc will only use the 32 LSBs.
> OK for the trunk with a simple testcase. I think you can just scan
> the assembler output for the larl instruction.
Will do, but it's part of a bigger patch. I just wanted to make sure
there wasn't some side-effect of larl that precluded this use.