On 10/06/2016 07:53 AM, Chen Gang wrote:
Hello Maintainers:
Is this patch OK? Please help check it when you have time (at least for
me, it passes all related test and comparation).
And I shall continue to find and fix another issues about tilegx.
Thanks.
On 6/4/16 21:25, cheng...@emindsoft.com.cn wrote:
From: Chen Gang <gang.chen.5...@gmail.com>
r10 may also be as parameter stack pointer for the nested function, so
need save it before call mcount.
Also clean up code: use '!' instead of "== 0" for checking
static_chain_decl and compute_total_frame_size.
2016-06-04 Chen Gang <gang.chen.5...@gmail.com>
gcc/
PR target/71331
* config/tilegx/tilegx.c (tilegx_function_profiler): Save r10
to stack before call mcount.
(tilegx_can_use_return_insn_p): Clean up code.
So if I understand the tilegx architecture correctly, you're issuing the
r10 save & sp adjustment as a bundle, and the restore & sp adjustment as
a bundle.
The problem is the semantics of bunding on the tilegx effectively mean
that all source operands are read in parallel, then all outputs occur in
parallel.
So if we take the bundle
{addi sp,sp,-8 ; st sp, r10}
The address used for the st is the value of the stack pointer before the
addi instruction.
Similarly for the restore r10 bundle. The address used for the load is
sp before adjustment.
Given my understanding of the tilegx bundling semantics, that seems wrong.
Jeff