From 42a268c241183877192c376d03bd9b6d527407c7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 13 Feb 2015 12:51:55 -0800 Subject: tcg: Change translator-side labels to a pointer This is improved type checking for the translators -- it's no longer possible to accidentally swap arguments to the branch functions. Note that the code generating backends still manipulate labels as int. With notable exceptions, the scope of the change is just a few lines for each target, so it's not worth building extra machinery to do this change in per-target increments. Cc: Peter Maydell Cc: Edgar E. Iglesias Cc: Michael Walle Cc: Leon Alrae Cc: Anthony Green Cc: Jia Liu Cc: Alexander Graf Cc: Aurelien Jarno Cc: Blue Swirl Cc: Guan Xuetao Cc: Paolo Bonzini Cc: Max Filippov Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- target-unicore32/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'target-unicore32') diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c index db453ef95c..9efcff5faf 100644 --- a/target-unicore32/translate.c +++ b/target-unicore32/translate.c @@ -33,7 +33,7 @@ typedef struct DisasContext { /* Nonzero if this instruction has been conditionally skipped. */ int condjmp; /* The label that will be jumped to when the instruction is skipped. */ - int condlabel; + TCGLabel *condlabel; struct TranslationBlock *tb; int singlestep_enabled; #ifndef CONFIG_USER_ONLY @@ -419,11 +419,11 @@ static inline void gen_uc32_shift_reg(TCGv var, int shiftop, dead_tmp(shift); } -static void gen_test_cc(int cc, int label) +static void gen_test_cc(int cc, TCGLabel *label) { TCGv tmp; TCGv tmp2; - int inv; + TCGLabel *inv; switch (cc) { case 0: /* eq: Z */ -- cgit v1.2.1