1
2
3
4
5
6
7
8#ifndef TARGET_LOONGARCH_TRANSLATE_H
9#define TARGET_LOONGARCH_TRANSLATE_H
10
11#include "exec/translator.h"
12
13#define TRANS(NAME, FUNC, ...) \
14 static bool trans_##NAME(DisasContext *ctx, arg_##NAME * a) \
15 { return FUNC(ctx, a, __VA_ARGS__); }
16
17
18
19
20
21
22typedef enum {
23 EXT_NONE,
24 EXT_SIGN,
25 EXT_ZERO,
26} DisasExtend;
27
28typedef struct DisasContext {
29 DisasContextBase base;
30 target_ulong page_start;
31 uint32_t opcode;
32 int mem_idx;
33 TCGv zero;
34
35 TCGv temp[4];
36 uint8_t ntemp;
37} DisasContext;
38
39void generate_exception(DisasContext *ctx, int excp);
40
41extern TCGv cpu_gpr[32], cpu_pc;
42extern TCGv_i32 cpu_fscr0;
43extern TCGv_i64 cpu_fpr[32];
44
45#endif
46