summaryrefslogtreecommitdiffhomepage
path: root/ir/be/riscv
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-06 23:18:04 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2019-03-06 23:19:28 +0100
commit23496a80af29a067e0f65a4a4d3c1075f1772a3a (patch)
treeace42a67799324ac300d98cb4b192a9bbfec09cd /ir/be/riscv
parenta08346ccb0d3aa7063dfed2197621880c1a6bf7a (diff)
beasm: Factor out common code to add an immediate operand.
Diffstat (limited to 'ir/be/riscv')
-rw-r--r--ir/be/riscv/riscv_transform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ir/be/riscv/riscv_transform.c b/ir/be/riscv/riscv_transform.c
index 4a3fae6..847f79e 100644
--- a/ir/be/riscv/riscv_transform.c
+++ b/ir/be/riscv/riscv_transform.c
@@ -241,7 +241,7 @@ static ir_node *gen_ASM(ir_node *const node)
ir_node *const in = get_ASM_input(node, in_pos);
char const imm = be_constraint.immediate_type;
if (imm != '\0' && riscv_match_immediate(op, in, imm)) {
- be_set_asm_operand(&op->op, BE_ASM_OPERAND_IMMEDIATE, -1);
+ be_asm_add_immediate(&op->op);
} else if (be_constraint.same_as >= 0) {
int const out_pos = operands[be_constraint.same_as].op.pos;
arch_register_req_t const *const ireq = info.out_reqs[out_pos];