public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "J.W. Jagersma" <jwjagersma@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: unwind tables for asm blocks
Date: Fri, 28 Feb 2020 22:03:00 -0000	[thread overview]
Message-ID: <0dbd374f-4c0d-6b24-9501-518ad7391746@gmail.com> (raw)
In-Reply-To: <87o8tictjp.fsf@oldenburg2.str.redhat.com>

On 2020-02-28 22:04, Florian Weimer wrote:
> * J. W. Jagersma:
> 
>>         asm("call %0" :: "i" (throw_exc));
> 
> Calling functions from inline assembly is typically invalid for many
> other reasons.  For example, on x86-64, there is no way to express that
> the red zone is clobbered.
> 
> What is the actual issue you are trying to solve?
> 
> Thanks,
> Florian
> 

The call instruction is just a practical example. The problem I want to
address is that no exception handling information is generated at all
for asm statements. Other operations, eg. memory access, division, etc
could trap and throw an exception. The unwind tables should cover this.

There is a comment in stmt_could_throw_p (tree-eh.c) that states:

    /* The only statements that can throw an exception are assignments,
         conditionals, calls, resx, and asms.  */

Which leads me to believe that the current behaviour is a bug.

  reply	other threads:[~2020-02-28 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 10:56 J.W. Jagersma
2020-02-28 20:58 ` J.W. Jagersma
2020-02-28 21:32 ` Florian Weimer
2020-02-28 22:03   ` J.W. Jagersma [this message]
2020-02-28 22:24     ` Florian Weimer
2020-02-28 22:32       ` J.W. Jagersma
2020-02-29 14:36         ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0dbd374f-4c0d-6b24-9501-518ad7391746@gmail.com \
    --to=jwjagersma@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).