target/loongarch: Add a check parameter to the TRANS macro

The default check parmeter is ALL.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20230822032724.1353391-8-gaosong@loongson.cn>
Message-Id: <20230822071959.35620-2-philmd@linaro.org>
This commit is contained in:
Song Gao 2023-08-22 09:19:51 +02:00
parent 6496269d7e
commit ec3a951891
No known key found for this signature in database
GPG key ID: 40A2FFF239263EDF
14 changed files with 903 additions and 901 deletions

View file

@ -10,9 +10,11 @@
#include "exec/translator.h"
#define TRANS(NAME, FUNC, ...) \
#define TRANS(NAME, AVAIL, FUNC, ...) \
static bool trans_##NAME(DisasContext *ctx, arg_##NAME * a) \
{ return FUNC(ctx, a, __VA_ARGS__); }
{ return avail_##AVAIL(ctx) && FUNC(ctx, a, __VA_ARGS__); }
#define avail_ALL(C) true
/*
* If an operation is being performed on less than TARGET_LONG_BITS,