aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-04-02 11:09:47 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-01-08 14:04:43 +0100
commit030473b77d72bd6edcf9fb37e1fe8c12f96deab7 (patch)
treebe8cafa3e8305465959db2241244774586bc3632 /Documentation
parent1277d44553d34510a333632add6e75c759bd6dbd (diff)
downloadsparse-dev-030473b77d72bd6edcf9fb37e1fe8c12f96deab7.tar.gz
add OP_SETFVAL
OP_SETVAL is used to create floating-point and string as well as labels-as-values. This multi-purpose aspect sometimes make things a bit more complicated. Change this by using a new instruction for the direct creation of floating-point literals without needing to have an intermediate EXPR_FVALUE. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/IR.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/IR.md b/Documentation/IR.md
index af972f93..f18d3507 100644
--- a/Documentation/IR.md
+++ b/Documentation/IR.md
@@ -281,11 +281,15 @@ Create a pseudo corresponding to the address of a symbol.
- .symbol: (pseudo_t) input symbol (alias .src)
- .target: symbol's address
+#### OP_SETFVAL
+Create a pseudo corresponding to a floating-point literal.
+- .fvalue: the literal's value (long double)
+- .target: the corresponding pseudo
+- .type: type of the literal & .target
+
#### OP_SETVAL
-Create a pseudo corresponding to a value.
-The value is given as an expression EXPR_STRING, EXPR_FVALUE or
-EXPR_LABEL (pseudos for integral constants are directly created
-at linearization and doesn't need this instruction)
+Create a pseudo corresponding to a string literal or a label-as-value.
+The value is given as an expression EXPR_STRING or EXPR_LABEL.
- .val: (expression) input expression
- .target: the resulting value
- .type: type of .target, the value