This is the mail archive of the
mailing list for the GCC project.
Re: C++: Letting compiler know asm block can call function that can throw?
> On Thu, Mar 29, 2012 at 8:34 PM, Richard Henderson <firstname.lastname@example.org> wrote:
> > On 03/29/2012 01:16 PM, Jan Hubicka wrote:
> >>> Of course, there's still the problem of getting the unwind data correct at
> >>> the point of the asm. ?I commented about that in the PR you filed.
> >> I think i386 still has the problem that it is small register class target and if you
> >> set rdi/rax and friends as hard registers, you risk reload failures.
> > True, and if this were i386 code I would certainly recommend using the [acd]
> > constraints instead (for suitible regparm signature). ?But this is explicitly
> > x86_64 code and the compiler has 8 registers otherwise available.
Sure, still rdi/rax is the only option for some of instructions, so x86-64
doesn't really solve all the problems.
> >> Do we prevent code motion of hard registers sets i.e. at GIMPLE level?
> Yes we do (modulo bugs).
Good. Note that this also include transformations like frward substitution into
area where hard register is live (i.e. it is not enough to just not touch hard
registers as volatile, but one needs to prevent moving other code in).
> > I don't know for positive, but I'd certainly consider it a bug if we don't.
> > There are plenty of targets which have no alternative but to use this style
> > of programming for inline syscalls.
> > r~