diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2018-12-04 10:30:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 10:30:35 -0800 |
commit | bebbeb54f177bdc2cfdff71d6a256a35f2f2057b (patch) | |
tree | 80609eb177ddab4edae30323d42152e9ab59ba9b /scripts | |
parent | b4badb815ec844e438a05d501eafb6bb99383bc6 (diff) | |
download | binaryen-bebbeb54f177bdc2cfdff71d6a256a35f2f2057b.tar.gz binaryen-bebbeb54f177bdc2cfdff71d6a256a35f2f2057b.tar.bz2 binaryen-bebbeb54f177bdc2cfdff71d6a256a35f2f2057b.zip |
Implement nontrapping float-to-int instructions (#1780)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen-s-parser.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py index 5f37fd9d5..f33107ea6 100755 --- a/scripts/gen-s-parser.py +++ b/scripts/gen-s-parser.py @@ -258,7 +258,16 @@ instructions = [ ("i64.atomic.rmw8_u.cmpxchg", "makeAtomicRMWOrCmpxchg(s, i64)"), ("i64.atomic.rmw16_u.cmpxchg", "makeAtomicRMWOrCmpxchg(s, i64)"), ("i64.atomic.rmw32_u.cmpxchg", "makeAtomicRMWOrCmpxchg(s, i64)"), - ("i64.atomic.rmw.cmpxchg", "makeAtomicRMWOrCmpxchg(s, i64)") + ("i64.atomic.rmw.cmpxchg", "makeAtomicRMWOrCmpxchg(s, i64)"), + # nontrapping float-to-int instructions + ("i32.trunc_s:sat/f32", "makeUnary(s, UnaryOp::TruncSatSFloat32ToInt32)"), + ("i32.trunc_u:sat/f32", "makeUnary(s, UnaryOp::TruncSatUFloat32ToInt32)"), + ("i32.trunc_s:sat/f64", "makeUnary(s, UnaryOp::TruncSatSFloat64ToInt32)"), + ("i32.trunc_u:sat/f64", "makeUnary(s, UnaryOp::TruncSatUFloat64ToInt32)"), + ("i64.trunc_s:sat/f32", "makeUnary(s, UnaryOp::TruncSatSFloat32ToInt64)"), + ("i64.trunc_u:sat/f32", "makeUnary(s, UnaryOp::TruncSatUFloat32ToInt64)"), + ("i64.trunc_s:sat/f64", "makeUnary(s, UnaryOp::TruncSatSFloat64ToInt64)"), + ("i64.trunc_u:sat/f64", "makeUnary(s, UnaryOp::TruncSatUFloat64ToInt64)"), ] |