commit bb16529b34a844c6e15f8837950585761122106e
parent 52c8eb48ee86c8fd0e44570c31c7de28dea63cf3
Author: Michael Forney <mforney@mforney.org>
Date: Tue, 14 Sep 2021 13:49:26 -0700
parse: fix loadw when assigned to l temporary
The documentation states that loadw is syntactic sugar for loadsw,
but it actually got parsed as Oload. If the result is an l temporary,
Oload behaves like Oloadl, not Oloadsw.
To fix this, parse Tloadw as Oloadsw explicitly.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/parse.c b/parse.c
@@ -633,7 +633,9 @@ DoOp:
arg[1] = R;
goto Ins;
}
- if (op >= Tloadw && op <= Tloadd)
+ if (op == Tloadw)
+ op = Oloadsw;
+ if (op >= Tloadl && op <= Tloadd)
op = Oload;
if (op == Talloc1 || op == Talloc2)
op = Oalloc;