Re: Parameter not passed in call expr

2011-04-11 Thread Ludovic Courtès
Hi Dodji, Dodji Seketeli writes: > ludovic.cour...@inria.fr (Ludovic Courtès) a écrit: [...] >> parm = build_decl (loc, PARM_DECL, >> create_tmp_var_name ("parm"), >> void_ptr); > > > It looks like a: > > DECL_ARG_TYPE (parm) = void_ptr; > > might be h

Re: Parameter not passed in call expr

2011-04-09 Thread Dodji Seketeli
Hello Ludovic, ludovic.cour...@inria.fr (Ludovic Courtès) a écrit: > The attached plug-in builds a function like this: > > my_function (void * parm.0) > { > __builtin_puts (parm.0); > } > > However, the generated assembly clears the first-argument register > (%edi) before calling ‘puts’

Re: Parameter not passed in call expr

2011-04-08 Thread Ludovic Courtès
Hi, Ian Lance Taylor writes: > ludovic.cour...@inria.fr (Ludovic Courtès) writes: > >> DECL_INITIAL (decl) = >> build_block (NULL_TREE, NULL_TREE, decl, NULL_TREE); >> DECL_SAVED_TREE (decl) = >> build_call_expr (built_in_decls[BUILT_IN_PUTS], 1, parm); > > I would normally expect DE

Re: Parameter not passed in call expr

2011-04-08 Thread Ian Lance Taylor
ludovic.cour...@inria.fr (Ludovic Courtès) writes: > DECL_INITIAL (decl) = > build_block (NULL_TREE, NULL_TREE, decl, NULL_TREE); > DECL_SAVED_TREE (decl) = > build_call_expr (built_in_decls[BUILT_IN_PUTS], 1, parm); I would normally expect DECL_SAVED_TREE to be a BLOCK. I don't know

Parameter not passed in call expr

2011-04-08 Thread Ludovic Courtès
Hello, The attached plug-in builds a function like this: my_function (void * parm.0) { __builtin_puts (parm.0); } However, the generated assembly clears the first-argument register (%edi) before calling ‘puts’, instead of actually passing the parameter: my_function: .LFB0: