This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++: Letting compiler know asm block can call function that can throw?


2012/3/30 Jan Hubicka <hubicka@ucw.cz>:
>> On Thu, Mar 29, 2012 at 8:34 PM, Richard Henderson <rth@redhat.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).

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]