This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] adding gimple_asm
- From: Diego Novillo <dnovillo at google dot com>
- To: Christopher Matthews <chrismatthews at google dot com>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 03 Aug 2007 10:33:05 -0400
- Subject: Re: [tuples] adding gimple_asm
- References: <5794c4c80708022105w68072b23scdd10346e194d8ec@mail.gmail.com>
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.