This is the mail archive of the gcc-patches@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]

[PATCH] Fix PR target/16195 (ppc64 -mminimal-toc miscompilations)


Hi!

The testcase below is miscompiled with -mminimal-toc.
The problem is that TOC_REGISTER (r30) is not fixed, yet references to it
are created during reload (e.g. when changing floating point constants
into constant pool references).  There is nothing that prevents the compiler
from allocating some pseudo(s) into this register, but then all later
created references to the TOC_REGISTER are broken.

The patch below makes it fixed and changes the prologue/epilogue code
so that it saves/restores like before.
Bootstrapped/regtested on ppc64-redhat-linux (the 3.4 version only so
far).  As the compiler itself is built with -mminimal-toc, it was hopefully
tested enough.
The patch shouldn't not change code generation in any way if -mminimal-toc
is not given on the command line.

Ok for 3.4/trunk? Not being able to compile GCC 3.3.4 by GCC 3.4.1 sounds
to me like quite severe issue.

	Jakub

Attachment: gcc35-ppc64-mminimal-toc.patch
Description: Text document

Attachment: gcc34-ppc64-mminimal-toc.patch
Description: Text document


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