Commit 9e24aaa2 authored by Lovis J.I. Zenz's avatar Lovis J.I. Zenz
Browse files

fixed semantic translation for smlabb, smlabt, and smlatb - 001

parent 20d7f550
Pipeline #1237 passed with stage
in 2 minutes and 6 seconds
......@@ -1377,50 +1377,92 @@ end
val sem-smlabb x = do
rd <- lval x.opnd1;
opnd1 <- lval x.opnd4;
opnd2 <- lval x.opnd3;
opnd1 <- rval x.opnd4;
opnd2 <- rval x.opnd3;
ra <- rval x.opnd2;
factor1 <- mktemp;
factor2 <- mktemp;
result <- mktemp;
addend <- mktemp;
comparator <- mktemp;
movsx 32 factor1 16 opnd1;
movsx 32 factor2 16 opnd2;
mul 32 result (var factor1) (var factor2);
movsx 64 result 32 (var result);
movsx 64 addend 32 ra;
mul 16 result (var (varl 16 opnd1)) (var (varl 16 opnd2));
add 64 result (var result) ra;
add 64 result (var result) (var addend);
mov 32 rd (var result);
movsx 64 comparator 32 (var rd);
cmpneq 64 fQF (var result) (var rd)
cmpneq 64 fQF (var result) (var comparator)
end
val sem-smlabt x = do
rd <- lval x.opnd1;
opnd1 <- lval x.opnd4;
opnd2 <- lval x.opnd3;
opnd2 <- rval x.opnd3;
ra <- rval x.opnd2;
factor1 <- mktemp;
factor2 <- mktemp;
result <- mktemp;
addend <- mktemp;
mul 32 result (var (varl 16 opnd1)) (var (at-offset (varl 16 opnd2) 16));
add 64 result (var result) ra;
comparator <- mktemp;
movsx 32 factor1 16 (var (at-offset opnd1 16));
movsx 32 factor2 16 opnd2;
mul 32 result (var factor1) (var factor2);
movsx 64 result 32 (var result);
movsx 64 addend 32 ra;
add 64 result (var result) (var addend);
mov 32 rd (var result);
movsx 64 comparator 32 (var rd);
cmpneq 64 fQF (var result) (var rd)
cmpneq 64 fQF (var result) (var comparator)
end
val sem-smlatb x = do
rd <- lval x.opnd1;
opnd1 <- lval x.opnd4;
opnd1 <- rval x.opnd4;
opnd2 <- lval x.opnd3;
ra <- rval x.opnd2;
factor1 <- mktemp;
factor2 <- mktemp;
result <- mktemp;
addend <- mktemp;
comparator <- mktemp;
mul 32 result (var (at-offset (varl 16 opnd1) 16)) (var (varl 16 opnd2));
add 64 result (var result) ra;
movsx 32 factor1 16 opnd1;
movsx 32 factor2 16 (var (at-offset opnd2 16));
mul 32 result (var factor1) (var factor2);
movsx 64 result 32 (var result);
movsx 64 addend 32 ra;
add 64 result (var result) (var addend);
mov 32 rd (var result);
movsx 64 comparator 32 (var rd);
cmpneq 64 fQF (var result) (var rd)
cmpneq 64 fQF (var result) (var comparator)
end
val sem-smlatt x = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment