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

Add simple floating-point instruction checker. #118

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

aarlt
Copy link
Contributor

@aarlt aarlt commented Jun 21, 2019

Closes #15

  • iterate over all instructions that where defined inside the code section, where each instruction is checked whether its a floating point instruction.

The following instructions where considered 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).

EDIT: I thought it makes sense to also check the functions signatures for float types - but it will not make any sense in this PR. I guess this may be interesting for the general module validation.

@aarlt aarlt force-pushed the floating-point-check branch 2 times, most recently from a26880e to f84d47f Compare June 21, 2019 20:38
@aarlt aarlt changed the title [WIP] Add simple floating-point instruction checker. Add simple floating-point instruction checker. Jun 24, 2019
libchisel/src/checkfp.rs Outdated Show resolved Hide resolved
libchisel/src/lib.rs Outdated Show resolved Hide resolved
libchisel/src/checkfp.rs Outdated Show resolved Hide resolved
@aarlt aarlt force-pushed the floating-point-check branch 2 times, most recently from 8862a1e to 7aedc78 Compare June 27, 2019 00:32
@axic axic force-pushed the floating-point-check branch from 7aedc78 to 5f962a1 Compare July 15, 2019 16:20
@axic axic force-pushed the floating-point-check branch from 5f962a1 to 0e07ba5 Compare July 15, 2019 16:38
@axic axic merged commit 0363fd4 into wasmx:master Jul 15, 2019
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 this pull request may close these issues.

Module to check for floating point operations
2 participants