diff mbox

[3/8] tcg: Add forward declarations for local functions

Message ID 1316289634-18786-3-git-send-email-weil@mail.berlios.de
State Accepted
Headers show

Commit Message

Stefan Weil Sept. 17, 2011, 8 p.m. UTC
These functions are defined in the tcg target specific file
tcg-target.c.

The forward declarations assert that every tcg target uses
the same function prototype.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 tcg/tcg.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

Comments

Peter Maydell Sept. 17, 2011, 9:40 p.m. UTC | #1
On 17 September 2011 21:00, Stefan Weil <weil@mail.berlios.de> wrote:
> +/* Forward declarations for functions declared and used in tcg-target.c. */
> +static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str);
> +static void tcg_out_ld(TCGContext *s, TCGType type, int ret, int arg1,
> +                       tcg_target_long arg2);
> +static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg);
> +static void tcg_out_movi(TCGContext *s, TCGType type,
> +                         int ret, tcg_target_long arg);
> +static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
> +                       const int *const_args);
> +static void tcg_out_st(TCGContext *s, TCGType type, int arg, int arg1,
> +                       tcg_target_long arg2);
> +static int tcg_target_const_match(tcg_target_long val,
> +                                  const TCGArgConstraint *arg_ct);
> +static int tcg_target_get_call_iarg_regs_count(int flags);

I'm tempted to submit a bulk rename patch that renames the functions
in this list which don't start 'tcg_target_' so that they do...

-- PMM
diff mbox

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 411f971..bdd7a67 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -63,11 +63,27 @@ 
 #error GUEST_BASE not supported on this host.
 #endif
 
+/* Forward declarations for functions declared in tcg-target.c and used here. */
 static void tcg_target_init(TCGContext *s);
 static void tcg_target_qemu_prologue(TCGContext *s);
 static void patch_reloc(uint8_t *code_ptr, int type, 
                         tcg_target_long value, tcg_target_long addend);
 
+/* Forward declarations for functions declared and used in tcg-target.c. */
+static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str);
+static void tcg_out_ld(TCGContext *s, TCGType type, int ret, int arg1,
+                       tcg_target_long arg2);
+static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg);
+static void tcg_out_movi(TCGContext *s, TCGType type,
+                         int ret, tcg_target_long arg);
+static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
+                       const int *const_args);
+static void tcg_out_st(TCGContext *s, TCGType type, int arg, int arg1,
+                       tcg_target_long arg2);
+static int tcg_target_const_match(tcg_target_long val,
+                                  const TCGArgConstraint *arg_ct);
+static int tcg_target_get_call_iarg_regs_count(int flags);
+
 TCGOpDef tcg_op_defs[] = {
 #define DEF(s, oargs, iargs, cargs, flags) { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags },
 #include "tcg-opc.h"