From 551ea4d2a05d9932f0ed8589da1dd8f362598313 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 8 Nov 2022 15:25:01 +0300 Subject: [PATCH] Fix incorrect RSTORE flags --- ir.c | 2 +- ir.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ir.c b/ir.c index 1836b06..e7acb98 100644 --- a/ir.c +++ b/ir.c @@ -180,12 +180,12 @@ void ir_print_const(ir_ctx *ctx, ir_insn *insn, FILE *f) #define ir_op_flag_l1X1 (ir_op_flag_l | 1 | (2 << IR_OP_FLAG_OPERANDS_SHIFT)) #define ir_op_flag_l1X2 (ir_op_flag_l | 1 | (3 << IR_OP_FLAG_OPERANDS_SHIFT)) #define ir_op_flag_l2 (ir_op_flag_l | 2 | (2 << IR_OP_FLAG_OPERANDS_SHIFT)) -#define ir_op_flag_l2X1 (ir_op_flag_l | 2 | (3 << IR_OP_FLAG_OPERANDS_SHIFT)) #define ir_op_flag_l3 (ir_op_flag_l | 3 | (3 << IR_OP_FLAG_OPERANDS_SHIFT)) #define ir_op_flag_s (IR_OP_FLAG_CONTROL|IR_OP_FLAG_MEM|IR_OP_FLAG_MEM_STORE) #define ir_op_flag_s0 ir_op_flag_s #define ir_op_flag_s1 (ir_op_flag_s | 1 | (1 << IR_OP_FLAG_OPERANDS_SHIFT)) #define ir_op_flag_s2 (ir_op_flag_s | 2 | (2 << IR_OP_FLAG_OPERANDS_SHIFT)) +#define ir_op_flag_s2X1 (ir_op_flag_s | 2 | (3 << IR_OP_FLAG_OPERANDS_SHIFT)) #define ir_op_flag_s3 (ir_op_flag_s | 3 | (3 << IR_OP_FLAG_OPERANDS_SHIFT)) #define ir_op_flag_x1 (IR_OP_FLAG_CONTROL|IR_OP_FLAG_MEM|IR_OP_FLAG_MEM_CALL | 1 | (1 << IR_OP_FLAG_OPERANDS_SHIFT)) #define ir_op_flag_x2 (IR_OP_FLAG_CONTROL|IR_OP_FLAG_MEM|IR_OP_FLAG_MEM_CALL | 2 | (2 << IR_OP_FLAG_OPERANDS_SHIFT)) diff --git a/ir.h b/ir.h index e2cae64..414c4cb 100644 --- a/ir.h +++ b/ir.h @@ -240,7 +240,7 @@ typedef enum _ir_type { _(VLOAD, l2, src, var, ___) /* load value of local var */ \ _(VSTORE, s3, src, var, def) /* store value to local var */ \ _(RLOAD, l1X1, src, num, ___) /* load value from register */ \ - _(RSTORE, l2X1, src, def, num) /* store value into register */ \ + _(RSTORE, s2X1, src, def, num) /* store value into register */ \ _(LOAD, l2, src, ref, ___) /* load from memory */ \ _(STORE, s3, src, ref, def) /* store to memory */ \ _(TLS, l1X2, src, num, num) /* thread local variable */ \