Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module to check for floating point operations #15

Closed
axic opened this issue Nov 12, 2018 · 2 comments · Fixed by #118
Closed

Module to check for floating point operations #15

axic opened this issue Nov 12, 2018 · 2 comments · Fixed by #118

Comments

@axic
Copy link
Member

axic commented Nov 12, 2018

No description provided.

@axic axic added this to To do in 0.4.0 Nov 19, 2018
@axic axic removed this from To do in 0.4.0 Jun 4, 2019
@aarlt
Copy link
Contributor

aarlt commented Jun 21, 2019

as far as i know ewasm doesn't allow any floating point operations.. so i guess that this is about validating that no floating point operations are used, right? however, what is exactly meant with "module" in this context?

@aarlt
Copy link
Contributor

aarlt commented Jun 21, 2019

However, i just started to play around. I would consider the following instructions as floating point instructions:
F32Eq, F32Ne, F32Lt, F32Gt, F32Le, F32Ge, F32Abs, F32Neg, F32Ceil, F32Floor, F32Trunc, F32Nearest, F32Sqrt, F32Add, F32Sub, F32Mul, F32Div, F32Min, F32Max, F32Copysign, I32TruncSF32, I32TruncUF32, I64TruncSF32, I64TruncUF32, F32ConvertSI32, F32ConvertUI32, F32ConvertSI64, F32ConvertUI64, F32DemoteF64, F64PromoteF32, I32ReinterpretF32, F32ReinterpretI32, F32x4Splat, F32x4Eq, F32x4Ne, F32x4Lt, F32x4Le, F32x4Gt, F32x4Ge, F32x4Neg, F32x4Abs, F32x4Min, F32x4Max, F32x4Add, F32x4Sub, F32x4Div, F32x4Mul, F32x4Sqrt, F32x4ConvertSI32x4, F32x4ConvertUI32x4, I32x4TruncSF32x4Sat, I32x4TruncUF32x4Sat, F64Eq, F64Ne, F64Lt, F64Gt, F64Le, F64Ge, F64Abs, F64Neg, F64Ceil, F64Floor, F64Trunc, F64Nearest, F64Sqrt, F64Add, F64Sub, F64Mul, F64Div, F64Min, F64Max, F64Copysign, I32TruncSF64, I32TruncUF64, I64TruncSF64, I64TruncUF64, F32DemoteF64, F64ConvertSI32, F64ConvertUI32, F64ConvertSI64, F64ConvertUI64, F64PromoteF32, I64ReinterpretF64, F64ReinterpretI64, F64x2Splat, F64x2Eq, F64x2Ne, F64x2Lt, F64x2Le, F64x2Gt, F64x2Ge, F64x2Neg, F64x2Abs, F64x2Min, F64x2Max, F64x2Add, F64x2Sub, F64x2Div, F64x2Mul, F64x2Sqrt, F64x2ConvertSI64x2, F64x2ConvertUI64x2, I64x2TruncSF64x2Sat, I64x2TruncUF64x2Sat, F32x4ExtractLane(a), F32x4ReplaceLane(a), F64x2ExtractLane(a), F64x2ReplaceLane(a), F32Const(a), F32Load(a,b), F32Store(a,b), F64Const(a), F64Load(a,b), F64Store(a,b).
Let me know if this list is complete and/or contains any mistakes. I will create a PR soon.
I think it may also make sense to check the function signatures for floating-point types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants