GCC bug affecting MIPS (was Re: SiByte 1480 & Branch Likely instructions?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Kaz Kylheku" <kaz@xxxxxxxxxxxxxxxxx> wrote on December 07, 2007:
Kaz wrote:
Hi All,

Not really a kernel-related question. I've discovered that GCC 4.1.1
(which I'm not using for kernel compiling, but user space) generates
branch likely instructions by default, even though the documentation
says that their use is off by default for MIPS32 and MIPS64, because

That's because the compiler is not configured correctly. The default CPU
string "from-abi" ends up being used, and so the target ISA is MIPS III.

I managed to root-cause the original problem, and moments ago filed this bug report:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34456

GCC can screw up when doing branch delay slot filling, because in computing register liveness, it makes an incorrectly computed assumption about what registers are clobbered by a CALL_INSN. By unfortunate coincidence, it's possible for an instruction which restores the caller's GP to be wrongly moved into a non-annulled delay slot, wreaking havoc on the fall-through path where GP is in fact used. Jumps and data accesses are then attempted using what is possibly the wrong global offset table.



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux