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

Move intrinsic calls outside of the BIL plugin #1362

Open
fortunac opened this issue Nov 11, 2021 · 1 comment
Open

Move intrinsic calls outside of the BIL plugin #1362

fortunac opened this issue Nov 11, 2021 · 1 comment

Comments

@fortunac
Copy link
Contributor

Right now, it is the BIL plugin's job to turn unsupported instructions into intrinsic calls, but this will break when working on targets that don't fully rely on the BIL lifter. When the --bil-enable-intrinsic option is set, the BIL plugin will provide it's own semantics even though the instruction is properly handled by other lifters. This leads to a conflict. (e.g. the BIL will provide call llvm-thumb:ADDrr while the other lifters would provide R0 := R1 + R2.

This feature should be handled on the BIR side where it drops empty instructions. Rather than dropping these instructions, the right approach would be to represent these empty instructions as a separate blk in the BIR. See:

| [],xs | xs,[] -> xs

@ivg
Copy link
Member

ivg commented Mar 23, 2022

The plan is to implement missing instructions using the intrinsic primitives introduced in #1452 and deprecate the BIL intrinsics at all. It will require some work, but in the end, will give us well-defined intrinsic functions with clear argument passing semantics.

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

No branches or pull requests

2 participants