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

[Bug target/48385] x86-64: Tail call recursion optimization with -mcmodel=large can generate invalid assembly (immediate operand illegal with absolute jump)


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

--- Comment #2 from Martin Decky <martin at decky dot cz> 2011-06-30 16:03:08 UTC ---
Created attachment 24646
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24646
Initial proposed patch

The attached patch works as a temporary workaround and might also hint where
exactly the problem is.

Now, guys, please don't crucify me for this patch. I am well aware that this
patch is no more than a dirty hack and probably breaks other thinks. I present
it here only to provoke some reaction from somebody who knows GCC sources well
enough to propose a real solution.

I have just spent some 4 hours browsing the sources, analysing relevant
functions such as output_asm_insn(), ix86_print_operand(), print_reg() and
similar to figure out how to change the way the tail call instruction is
generated for this particular case. But I would really appreciate a little help
from a senior GCC developer who not only knows what and how, but also why.

Thanks in advance!


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