This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, CHKP, i386] Fix retval generated for instrumented calls returning values on multiple registers
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 2 Apr 2015 19:55:54 +0200
- Subject: Re: [PATCH, CHKP, i386] Fix retval generated for instrumented calls returning values on multiple registers
- Authentication-results: sourceware.org; auth=none
- References: <20150402150759 dot GA6244 at msticlxl57 dot ims dot intel dot com>
On Thu, Apr 2, 2015 at 5:07 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> Hi,
>
> This patch fixes nested PARALLEL in retval for isntrumented calls. Current possible call:
>
> (call_insn:TI 6 30 17 2 (set (parallel [
> (expr_list:REG_DEP_TRUE (parallel:TI [
> (expr_list:REG_DEP_TRUE (reg:DF 21 xmm0)
> (const_int 0 [0]))
> (expr_list:REG_DEP_TRUE (reg:DF 22 xmm1)
> (const_int 8 [0x8]))
> ])
> (const_int 0 [0]))
> (expr_list:REG_DEP_TRUE (reg:BND64 77 bnd0)
> (const_int 0 [0]))
> (expr_list:REG_DEP_TRUE (reg:BND64 78 bnd1)
> (const_int 0 [0]))
> ])
> (call/j (mem:QI (symbol_ref:DI ("test1") [flags 0x41] <function_decl 0x7f6f50e02ca8 test1.chkp>) [0 test1.chkp S1 A8])
> (const_int 0 [0]))) complex.c:11 670 {*call_value}
>
> Such construction causes DF analysis problems. This patch tranforms it to:
>
> (call_insn:TI 6 30 17 2 (set (parallel:TI [
> (expr_list:REG_DEP_TRUE (reg:DF 21 xmm0)
> (const_int 0 [0]))
> (expr_list:REG_DEP_TRUE (reg:DF 22 xmm1)
> (const_int 8 [0x8]))
> (expr_list:REG_DEP_TRUE (reg:BND64 77 bnd0)
> (const_int 0 [0]))
> (expr_list:REG_DEP_TRUE (reg:BND64 78 bnd1)
> (const_int 0 [0]))
> ])
> (call/j (mem:QI (symbol_ref:DI ("test1") [flags 0x41] <function_decl 0x7fb609bf7ca8 test1.chkp>) [0 test1.chkp S1 A8])
> (const_int 0 [0]))) complex.c:11 670 {*call_value}
>
>
> Only MPX target is affected. Bootstrapped and tested on x86_64-unknown-linux-gnu. Does it look OK?
>
> Thanks,
> Ilya
> --
> 2015-04-02 Ilya Enkovich <ilya.enkovich@intel.com>
>
> * config/i386/i386.c (ix86_expand_call): Avoid nested
> PARALLEL in returned call value.
OK.
Thanks,
Uros.