mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
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 <peter.maydell@linaro.org> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Cc: Michael Walle <michael@walle.cc> Cc: Leon Alrae <leon.alrae@imgtec.com> Cc: Anthony Green <green@moxielogic.com> Cc: Jia Liu <proljc@gmail.com> Cc: Alexander Graf <agraf@suse.de> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
3f626793a2
commit
42a268c241
26 changed files with 280 additions and 282 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue