This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: var-tracking and s390's LM(G)
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 04 Feb 2014 12:21:14 +0000
- Subject: Re: var-tracking and s390's LM(G)
- Authentication-results: sourceware.org; auth=none
- References: <874n4ff92i dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <20140204110456 dot GF12671 at tucnak dot redhat dot com> <87ha8fdsd6 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <20140204114438 dot GG12671 at tucnak dot redhat dot com>
Jakub Jelinek <jakub@redhat.com> writes:
>> But then we wouldn't be able to use var-tracking when __builtin_eh_return
>> is used, since in that case replacing the (set (reg ...) (mem ...))
>> with a (plus ...) would be incorrect -- the value we're loading from the
>> stack will have had a variable adjustment applied. And I know from painful
>> experience that being able to debug the unwind code is very useful. :-)
>
> Aren't functions using EH_RETURN typically using frame pointer?
Sorry, forgot to respond to this bit. On s390, _Unwind_RaiseException and
_Unwind_ForcedUnwind don't use a frame pointer, at least not on trunk.
%r11 is used as a general scratch register instead. E.g.:
00002ba8 <_Unwind_ForcedUnwind>:
2ba8: 90 6f f0 18 stm %r6,%r15,24(%r15)
2bac: 0d d0 basr %r13,%r0
2bae: 60 40 f0 50 std %f4,80(%r15)
2bb2: 60 60 f0 58 std %f6,88(%r15)
2bb6: a7 fa fd f8 ahi %r15,-520
2bba: 58 c0 d0 9e l %r12,158(%r13)
2bbe: 58 10 d0 9a l %r1,154(%r13)
2bc2: 18 b2 lr %r11,%r2
...
2c10: 98 6f f2 20 lm %r6,%r15,544(%r15)
2c14: 07 f4 br %r4
Thanks,
Richard