> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.6.18 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 23 08:25:28 UTC 2024 x86_64 GNU/Linux 01:08:44 up 1 day 4:37, 2 users, load average: 0.27, 0.24, 0.20
This commit is contained in:
parent
14e442c0a7
commit
bc58e07285
1 changed files with 3 additions and 3 deletions
|
@ -32,9 +32,9 @@ enum {
|
||||||
#define src2R() do { *src2 = R(rs2); } while (0)
|
#define src2R() do { *src2 = R(rs2); } while (0)
|
||||||
#define immI() do { *imm = SEXT(BITS(i, 31, 20), 12); } while(0)
|
#define immI() do { *imm = SEXT(BITS(i, 31, 20), 12); } while(0)
|
||||||
#define immU() do { *imm = SEXT(BITS(i, 31, 12), 20) << 12; } while(0)
|
#define immU() do { *imm = SEXT(BITS(i, 31, 12), 20) << 12; } while(0)
|
||||||
#define immS() do { *imm = (SEXT(BITS(i, 31, 25), 7) << 5) | BITS(i, 11, 7); } while(0)
|
#define immS() do { *imm = SEXT(BITS(i, 31, 25), 7) << 5 | BITS(i, 11, 7); } while(0)
|
||||||
#define immB() do { *imm = (SEXT(BITS(i, 31, 31), 1) << 12 | BITS(i, 30, 25) << 5 | BITS(i, 11, 8) << 1 | BITS(i, 8, 8) << 11); } while(0)
|
#define immB() do { *imm = SEXT(BITS(i, 31, 31), 1) << 12 | BITS(i, 30, 25) << 5 | BITS(i, 11, 8) << 1 | BITS(i, 7, 7) << 11; } while(0)
|
||||||
#define immJ() do { *imm = (SEXT(BITS(i, 31, 31), 1) << 20) | BITS(i, 30, 21) << 1 | BITS(i, 20, 20) << 11 | BITS(i, 19, 12) << 12; } while(0)
|
#define immJ() do { *imm = SEXT(BITS(i, 31, 31), 1) << 20 | BITS(i, 30, 21) << 1 | BITS(i, 20, 20) << 11 | BITS(i, 19, 12) << 12; } while(0)
|
||||||
|
|
||||||
static void decode_operand(Decode *s, int *rd, word_t *src1, word_t *src2, word_t *imm, int type) {
|
static void decode_operand(Decode *s, int *rd, word_t *src1, word_t *src2, word_t *imm, int type) {
|
||||||
uint32_t i = s->isa.inst.val;
|
uint32_t i = s->isa.inst.val;
|
||||||
|
|
Loading…
Reference in a new issue