The below notice from Hal Finkel [via llvm's bugzilla] indicates that at least
part of llvm bug 26856 for powerpc64's is expected to have been fixed by
r280188 (likely on trunk?).
26856 was one of my reports that had independent confirmation back when I
submitted it. Some of the quote below is from the exchange about the problems
from back then.
===
Mark Millard
markmi at dsl-only.net
Begin forwarded message:
From: bugzilla-daemon at llvm.org
Subject: [Bug 26856] clang 3.8.0/powerpc/powerpc64's _Unwind_RaiseException
code generation has messed up r31 (frame pointer) save/restore code (SEGV's can
result)
Date: August 30, 2016 at 5:54:45 PM PDT
To: <markmi at dsl-only.net>
Comment # 11 on bug 26856 from Hal Finkel
(In reply to comment #6
)
...
>
> 2) In some scenarios, registers may be spilled/restored twice to the stack.
> This happens because while most of the spilling happens in
> PPCFrameLowering::spillCalleeSavedRegisters, a few selected registers are
> also spilled in PPCFrameLowering::emitPrologue. Those registers are the
> frame pointer, base pointer, PIC base pointer, link register, and condition
> code register. For the latter two, code ensures that they can never be
> spilled in both places (for CR, there is extra code in
> spillCalleeSavedRegisters; for LR, the register is removed from SavedRegs in
> determineCalleeSaves).
>
> However, for FP, BP, and PBP, nothing ensures the registers are not spilled
> twice. It is probably *rare* for this to happen, because the register
> allocator will not use those registers within the function if they're needed
> for their special purpose, but it can happen in rare cases. This includes
> the case of a system unwinder routine that uses __builtin_unwind_init, but
> could also include other routines that clobber one of those registers, e.g.
> the following case:
>
> void func (void);
>
> void test (void)
> {
> func ();
> asm ("nop" : : : "31");
> }
r280188 should address the spilling-twice problem.
You are receiving this mail because:
• You reported the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "[email protected]"