This is the mail archive of the 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: again problems implementing own target

Jim Wilson wrote:
Michael_fogel wrote:
The failing instruction is a call. The compiler loads every symbol reference into a register and calls the function using this. In front of the error this load is missing. In smaller files the compiler uses the reference, which is the way i want him to do it.

We need more info in order to determine what is wrong. Some RTL examples would be nice. Also, a copy of your pattern in your md file that matches call instructions.

Also, in which pass does the load symbol instruction disappear? If you compile with -da, you will get RTL dumps after each optimization pass. You can look at them to see where problem was introduced.

There does appear to be a problem with your port, but there is also a way to work around it. If you define NO_FUNCTION_CSE, then gcc will no longer try to optimize function addresses by loading them into pseudos. See the docs for this macro in the doc/tm.texi file.
Thank you for your help.

After defining the target hook TARGET_ADDRESS_COST with return 2 the compiler was able to compile it.
I took a closer look at the scheduler and found some interesting macros. One of them was NO_FUNCTION_CSE. Now I want to define the costs for every instruction so gcc can make a better optimization.

Sometimes I should read the documentation more carefully.

In my opinion the compiler ran out of registers and was not able to allocate the pseudo register. In this case the compiler has to spill these registers. How is this done in GCC? Is there a way to control it?

Best regards

Michael Fogel

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