]> Git Repo - qemu.git/blobdiff - target/loongarch/translate.h
target/loongarch: Add fixed point arithmetic instruction translation
[qemu.git] / target / loongarch / translate.h
index 6cc7f1a7cd2e9c5ebefc221eda6b7f0ab4047a72..9cc12512d1f50ebb8e5049a4999b07f740dcdf19 100644 (file)
 
 #include "exec/translator.h"
 
+#define TRANS(NAME, FUNC, ...) \
+    static bool trans_##NAME(DisasContext *ctx, arg_##NAME * a) \
+    { return FUNC(ctx, a, __VA_ARGS__); }
+
+/*
+ * If an operation is being performed on less than TARGET_LONG_BITS,
+ * it may require the inputs to be sign- or zero-extended; which will
+ * depend on the exact operation being performed.
+ */
+typedef enum {
+    EXT_NONE,
+    EXT_SIGN,
+    EXT_ZERO,
+} DisasExtend;
+
 typedef struct DisasContext {
     DisasContextBase base;
     target_ulong page_start;
     uint32_t opcode;
     int mem_idx;
+    TCGv zero;
+    /* Space for 3 operands plus 1 extra for address computation. */
+    TCGv temp[4];
+    uint8_t ntemp;
 } DisasContext;
 
 void generate_exception(DisasContext *ctx, int excp);
This page took 0.019834 seconds and 4 git commands to generate.