public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: .cfi_startproc simple
@ 2004-12-15 16:07 Jan Beulich
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2004-12-15 16:07 UTC (permalink / raw)
  To: rth; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

>>> Richard Henderson <rth@redhat.com> 15.12.04 00:05:54 >>>
>On Tue, Dec 14, 2004 at 03:56:19PM +0100, Jan Beulich wrote:
>> Now, any suggestion on the approach to fix this? Just zero out the
two
>> fields (register and offset)?
>
>Yes.  "simple" means a completely blank slate.  No target trickery.

Built and tested on i686-pc-linux-gnu.

Jan

gas/
2004-12-15 Jan Beulich  <jbeulich@novell.com>

	* dw2gencfi.c (dot.cfi.startproc): Clear cur_cfa_offset so
	'.cfi_startproc simple' doesn't inherit the old value.

---
/home/jbeulich/src/binutils/mainline/2004-12-03.13.35/gas/dw2gencfi.c	2004-10-08
08:52:54.000000000 +0200
+++ 2004-12-03.13.35/gas/dw2gencfi.c	2004-12-15 16:59:42.858295384
+0100
@@ -607,6 +607,7 @@ dot_cfi_startproc (int ignored ATTRIBUTE
     }
   demand_empty_rest_of_line ();
 
+  cur_cfa_offset = 0;
   if (!simple)
     tc_cfi_frame_initial_instructions ();
 }


[-- Attachment #2: binutils-mainline-cfi-clear-cur_cfa_offset.patch --]
[-- Type: application/octet-stream, Size: 585 bytes --]

Built and tested on i686-pc-linux-gnu.

Jan

gas/
2004-12-15 Jan Beulich  <jbeulich@novell.com>

	* dw2gencfi.c (dot.cfi.startproc): Clear cur_cfa_offset so
	'.cfi_startproc simple' doesn't inherit the old value.

--- /home/jbeulich/src/binutils/mainline/2004-12-03.13.35/gas/dw2gencfi.c	2004-10-08 08:52:54.000000000 +0200
+++ 2004-12-03.13.35/gas/dw2gencfi.c	2004-12-15 16:59:42.858295384 +0100
@@ -607,6 +607,7 @@ dot_cfi_startproc (int ignored ATTRIBUTE
     }
   demand_empty_rest_of_line ();
 
+  cur_cfa_offset = 0;
   if (!simple)
     tc_cfi_frame_initial_instructions ();
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: .cfi_startproc simple
       [not found] <s1c06118.035@emea1-mh.id2.novell.com>
@ 2004-12-15 17:35 ` Richard Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2004-12-15 17:35 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Wed, Dec 15, 2004 at 05:07:12PM +0100, Jan Beulich wrote:
> 	* dw2gencfi.c (dot.cfi.startproc): Clear cur_cfa_offset so
> 	'.cfi_startproc simple' doesn't inherit the old value.

Ok.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: .cfi_startproc simple
  2004-12-14 14:56 Jan Beulich
@ 2004-12-14 23:06 ` Richard Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2004-12-14 23:06 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Tue, Dec 14, 2004 at 03:56:19PM +0100, Jan Beulich wrote:
> Now, any suggestion on the approach to fix this? Just zero out the two
> fields (register and offset)?

Yes.  "simple" means a completely blank slate.  No target trickery.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: .cfi_startproc simple
@ 2004-12-14 14:56 Jan Beulich
  2004-12-14 23:06 ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2004-12-14 14:56 UTC (permalink / raw)
  To: binutils

Now, any suggestion on the approach to fix this? Just zero out the two
fields (register and offset)? Or have the target specific code
initialize them, too (just to different values than without the 'simple'
modifier)? In the latter case, I wouldn't even know how I would have to
approach this, since this would require changing all targets, and I
obviously wouldn't know for most of them what the appropriate
register/offset combination would be.

Thanks, Jan

>>> Richard Henderson <rth@redhat.com> 29.11.04 19:55:19 >>>
On Mon, Nov 29, 2004 at 11:35:12AM +0100, Jan Beulich wrote:
> Is it intentional that this directive inherits (rather than clears)
the
> previous procedure's exit state (namely cur_cfa_offset)?

No.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: .cfi_startproc simple
  2004-11-29 10:36 Jan Beulich
@ 2004-11-29 18:55 ` Richard Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2004-11-29 18:55 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Mon, Nov 29, 2004 at 11:35:12AM +0100, Jan Beulich wrote:
> Is it intentional that this directive inherits (rather than clears) the
> previous procedure's exit state (namely cur_cfa_offset)?

No.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* .cfi_startproc simple
@ 2004-11-29 10:36 Jan Beulich
  2004-11-29 18:55 ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2004-11-29 10:36 UTC (permalink / raw)
  To: binutils

Is it intentional that this directive inherits (rather than clears) the
previous procedure's exit state (namely cur_cfa_offset)? Even if the
expectation is that the user explicitly set the new frame information,
wouldn't it make sense to invalidate the old settings to catch and warn
about uses without setting the basic information? Thanks, Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-12-15 17:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-15 16:07 .cfi_startproc simple Jan Beulich
     [not found] <s1c06118.035@emea1-mh.id2.novell.com>
2004-12-15 17:35 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2004-12-14 14:56 Jan Beulich
2004-12-14 23:06 ` Richard Henderson
2004-11-29 10:36 Jan Beulich
2004-11-29 18:55 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).