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

updates to changes in BAP #4

Merged
merged 11 commits into from
Apr 20, 2022

Conversation

ivg
Copy link

@ivg ivg commented Apr 12, 2022

This PR will resolves the conflicts introduced by BinaryAnalysisPlatform#1464 and BinaryAnalysisPlatform#1463 as well as handles the removal of the clz64 function (now there is a generic clz function).
The 32-bit logical operators with bit-mask encoded operands are still decoded incorrectly, but we're getting closer,

bap mc --show-insn=asm --show-bir --arch=aarch64 --primus-lisp-semantics=plugins/arm/semantics,plugins/primus_lisp/semantics -- 0x20,0x04,0x00,0x12
and w0, w1, #0x3
00000011:
00000010: R0 := extend:64[extract:31:0[R1]] & 0x300000003

ivg added 11 commits April 12, 2022 09:57
The Primus Lisp semantic primitives were hardcoding 64-bit
arithmetic, which was obviously incorrect. In addition, the
shifting operations were coercing the operands to the same size,
like in arithmetic operations, which contradicts the established
semantics of shifts both in Core Theory and in BIL. Now, the shifting
operators will produce values of the same sort as the sort of the
first operand.
…sPlatform#1463)

The Primus Lisp semantic primitives were hardcoding 64-bit
arithmetic, which was obviously incorrect. In addition, the
shifting operations were coercing the operands to the same size,
like in arithmetic operations, which contradicts the established
semantics of shifts both in Core Theory and in BIL. Now, the shifting
operators will produce values of the same sort as the sort of the
first operand.
Copy link

@DukMastaaa DukMastaaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, will keep investigating the problem with immediates

@DukMastaaa DukMastaaa merged commit 73cee18 into UQ-PAC:implement-missing-aarch64-insns Apr 20, 2022
@DukMastaaa DukMastaaa mentioned this pull request Jul 8, 2022
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.

2 participants