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?
2012/3/30 Jan Hubicka <firstname.lastname@example.org>:
>> On Thu, Mar 29, 2012 at 8:34 PM, Richard Henderson <email@example.com> 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).
Motion across hardreg sets/uses are not restricted. And I would not expect
an optimizing compiler to do that (it's your own fault to use hardregs in
complex C code).