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]

Re: A bug in mark_constants () in varasm.c


	That is not my patch. I only optimized it for standard x87 constants.
	I didn't change anything else.

It is your patch that I am talking about.  The code that you added to optimize
for standard x87 constants is wrong.  It will not work.

As I mentioned before, you can not use the CONST_DOUBLE_MEM field in an
assembler output template.  You either need to find some way to directly
load the CONST_DOUBLE into a reg, or else you should reject the CONST_DOUBLE
in the constraints (for instance by changing F to G).

	Thanks for looking into it. I'd like to hear comments from Stan first.
	Here is my complete patch to fix all the bugs in my 5 test cases. There
	are several bugs exposed in my 5 test cases:

We don't need 5 different testcases for a single bug.  You ran into more than
one bug because your i386.md patch was wrong, which in turn led you modify
varasm.c, but your varasm.c patch is also wrong.  Adding bad patches on top
of bad patches will not get you anywhere.  You need to remove all of your
patches and start over again from the beginning, preferably doing something
similar to my i386.md patch.

	1. FP constants in nested functions are broken on PPro. Even if you may
	compile the code, gcc will leave out the FP constant definitions such
	that there are undefined references to the FP constants. Use "nm" to
	see it.

No, this isn't broken.  This is a consequence of problems with your patches.
If you remove your patches, this problem will go away.

	2. reg-stack.c mishandles the conditional move. I will forard my
	analysis to you.

Yes, this is broken.  This prevents my i386.md patch from working.
I don't know much about reg-stack.c, but your reg-stack.c patch makes my
i386.md patch work, and it works for all 5 of your testcases.

Jim


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