diff options
-rw-r--r-- | Documentation/IR.rst | 7 | ||||
-rw-r--r-- | linearize.c | 2 | ||||
-rw-r--r-- | opcode.def | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/IR.rst b/Documentation/IR.rst index 97d4b2b2..ff5af1c5 100644 --- a/Documentation/IR.rst +++ b/Documentation/IR.rst @@ -309,6 +309,13 @@ Ternary ops * .target: result of the operation * .type: type of .target +.. op:: OP_FMADD + Fused multiply-add. + + * .src1, .src2, .src3: operands (types must be compatible with .target) + * .target: result of the operation (must be a floating-point type) + * .type: type of .target + .. op:: OP_RANGE Range/bounds checking (only used for an unused sparse extension). diff --git a/linearize.c b/linearize.c index 5a8e7497..0d91d412 100644 --- a/linearize.c +++ b/linearize.c @@ -244,6 +244,7 @@ static const char *opcodes[] = { /* Special three-input */ [OP_SEL] = "select", + [OP_FMADD] = "fmadd", /* Memory */ [OP_LOAD] = "load", @@ -461,6 +462,7 @@ const char *show_instruction(struct instruction *insn) break; case OP_SEL: + case OP_FMADD: buf += sprintf(buf, "%s <- %s, %s, %s", show_pseudo(insn->target), show_pseudo(insn->src1), show_pseudo(insn->src2), show_pseudo(insn->src3)); break; @@ -91,6 +91,7 @@ OPCODE(SLICE, BADOP, BADOP, BADOP, 1, OPF_TARGET) /* Select - three input values */ OPCODE(SEL, BADOP, BADOP, BADOP, 3, OPF_TARGET) +OPCODE(FMADD, BADOP, BADOP, BADOP, 3, OPF_TARGET) /* Memory */ OPCODE(LOAD, BADOP, BADOP, BADOP, 1, OPF_TARGET) |