From bb16529b34a844c6e15f8837950585761122106e Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Tue, 14 Sep 2021 13:49:26 -0700 Subject: [PATCH] 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. --- parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parse.c b/parse.c index 43ae23b..da88f58 100644 --- 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;