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

Re: [tuples] adding gimple_asm


On 8/3/07 12:05 AM, Christopher Matthews wrote:

> +/* Test GIMPLE_ASSIGN.  */ 

s/GIMPLE_ASSIGN/GIMPLE_ASM/

> [ ... ]
> +/* { dg-final { scan-tree-dump-times ":\\\"%eax\\\"" 1 "gimple"} } */
> +

You need to add a cleanup action in all the test cases:

/* { dg-final { cleanup-tree-dump "gimple" } } */

> +dump_gimple_asm (pretty_printer *buffer, gimple gs, int spc, int flags)
> +{
> + unsigned int i;
> + newline_and_indent (buffer, spc);
> + pp_string (buffer, "asm {");
> + newline_and_indent (buffer, spc + 2);

Better follow the format used to dump ASM_EXPRs (see the ASM_EXPR case
in tree-pretty-print.c:dump_generic_node).

> +/* Helper function to set the simple fields of a asm stmt. */
> +

Need documentation for arguments.

> +gimple
> +build_gimple_asm_1 (const char *string, unsigned ninputs, unsigned noutputs,

Better declare static.  It will not be called from outside.

> + CLOBBERS is a vector of the clobbered register parameters.
> + */

Closing comment at end of previous line.

> +
> + p = build_gimple_asm_1(string, ninputs, noutputs, nclobbers);

Space before '('.


OK with those changes.


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