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] |
| Other format: | [Raw text] | |
Right. When the cost of an indirect call is the same or greater than the cost of a direct call, then you should define NO_FUNCTION_CSE. Otherwise you would not define it.I found that gcc will choose to call symbol or register according aYeah. The Move Symbol to R0 register is deleted, which is weird. And I still can not figure out why. Which means I still need to dig it. But I found when I used the gcc-4.0.2 version, the Call insn call the function direction call the function symbol which is OK. I mean how gcc determine to call the function directly with the function symbol or move the function symbol ref into a register then call the register. Obviously, now the gcc-4.3.0 in my porting is working in the latter one.
TARGET MACRO --
NO_FUNCTION_CSE. Here is the comment in internal document:
Define this macro if it is as good or better to call a constant
function address than to call an address kept in a register.
Now I defined the macro, the bug disappears. But I still need to knowRight. You've just papered over the problem. You need to debug reload and see whether or not the insn is ever emitted into the insn stream and if so when it gets deleted.
why gcc delete my insn.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |