diff options
author | Alon Zakai <alonzakai@gmail.com> | 2019-02-06 12:59:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-06 12:59:14 -0800 |
commit | 4e8c339a5ab327aa896a761fc33fd9ae4be57718 (patch) | |
tree | c986e53af645c55fcc631bf3689ee684e172a369 /src/passes/Print.cpp | |
parent | cc0ccef87716fd8223fc16793c9ec3bc3249da13 (diff) | |
download | binaryen-4e8c339a5ab327aa896a761fc33fd9ae4be57718.tar.gz binaryen-4e8c339a5ab327aa896a761fc33fd9ae4be57718.tar.bz2 binaryen-4e8c339a5ab327aa896a761fc33fd9ae4be57718.zip |
fix printing of unreachable atomics, and add print fuzzing (#1899)
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 761c9e3d4..c511af434 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -206,7 +206,7 @@ struct PrintExpressionContents : public Visitor<PrintExpressionContents> { case Xor: o << "xor"; break; case Xchg: o << "xchg"; break; } - if (curr->bytes != getTypeSize(curr->type)) { + if (curr->type != unreachable && curr->bytes != getTypeSize(curr->type)) { o << "_u"; } restoreNormalColor(o); @@ -218,7 +218,7 @@ struct PrintExpressionContents : public Visitor<PrintExpressionContents> { prepareColor(o); printRMWSize(o, curr->type, curr->bytes); o << "cmpxchg"; - if (curr->bytes != getTypeSize(curr->type)) { + if (curr->type != unreachable && curr->bytes != getTypeSize(curr->type)) { o << "_u"; } restoreNormalColor(o); |