[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-19 Thread hong.gyu.kim at lge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #17 from Honggyu Kim hong.gyu.kim at lge dot com --- (In reply to ktkachov from comment #16) I'm working on a patch btw. This bug is only shown in arm code so maybe the bug is in gcc/config/arm directory. I was trying to fix it

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-19 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 ktkachov at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-19 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #18 from ktkachov at gcc dot gnu.org --- (In reply to Honggyu Kim from comment #17) (In reply to ktkachov from comment #16) I'm working on a patch btw. This bug is only shown in arm code so maybe the bug is in gcc/config/arm

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-17 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #14 from ktkachov at gcc dot gnu.org --- Right, I think the root cause is the emit_push_insn in expr.c. It's supposed to push what needs to be pushed from a partial argument onto the stack and do the moves into the registers.

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-17 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #15 from ktkachov at gcc dot gnu.org --- Hmmm, actually it's not that simple, as testing showed. The comment at the final load-to-regs code says: /* If part should go in registers, copy that part into the appropriate registers.

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-16 Thread hong.gyu.kim at lge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #13 from Honggyu Kim hong.gyu.kim at lge dot com --- Created attachment 35041 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35041action=edit backport patch from linaro Jongsung Kim (neidhard@lge.com) found a patch that

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-16 Thread hong.gyu.kim at lge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #12 from Honggyu Kim hong.gyu.kim at lge dot com --- (In reply to ktkachov from comment #11) Thinking about it again, there's no reason not to do sibcalls, it's just the code gets confused on how to shuffle the arguments around.

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-16 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #11 from ktkachov at gcc dot gnu.org --- Thinking about it again, there's no reason not to do sibcalls, it's just the code gets confused on how to shuffle the arguments around. Will investigate deeper

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-16 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 ktkachov at gcc dot gnu.org changed: What|Removed |Added CC||ktkachov at gcc dot gnu.org

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-12 Thread hong.gyu.kim at lge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #8 from Honggyu Kim hong.gyu.kim at lge dot com --- (In reply to Mikael Pettersson from comment #6) (In reply to Honggyu Kim from comment #4) Can I add this testcase with your modification as my first gcc contribution? :)

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-12 Thread hong.gyu.kim at lge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 Honggyu Kim hong.gyu.kim at lge dot com changed: What|Removed |Added Known to fail||4.9.2 ---

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-10 Thread jgreenhalgh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 James Greenhalgh jgreenhalgh at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-09 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #6 from Mikael Pettersson mikpelinux at gmail dot com --- (In reply to Honggyu Kim from comment #4) Can I add this testcase with your modification as my first gcc contribution? :) Sure, just attach it to this PR as a new test

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-09 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 Mikael Pettersson mikpelinux at gmail dot com changed: What|Removed |Added CC|

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-09 Thread hong.gyu.kim at lge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #4 from Honggyu Kim hong.gyu.kim at lge dot com --- Dear Mikael Pettersson I also have a runtime testcase, which is different from dejagnu format. Can I add this testcase with your modification as my first gcc contribution? :) I was

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-09 Thread hong.gyu.kim at lge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #5 from Honggyu Kim hong.gyu.kim at lge dot com --- I just wrote foo function code separately to debug gcc more easily by compile only problematic code.

[Bug target/65358] wrong parameter passing code with tail call optimization on arm

2015-03-09 Thread hong.gyu.kim at lge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 --- Comment #2 from Honggyu Kim hong.gyu.kim at lge dot com --- Sorry, I miss typed the initial argument status for foo I will modified MEM[sp-4]: p.killer to MEM[sp+4]: p.killer as follows: r0: arg1 r1: arg2 r2: arg3 r3: p.fine MEM[sp]: