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

[ARM] Fix VFP feature check #2090

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Conversation

Rot127
Copy link
Collaborator

@Rot127 Rot127 commented Jul 18, 2023

ARM VFP instructions could not be disassembled if arch != armv8. This happens because of a faulty feature check. The check assumes VFP is v8 only.

This is not the case as can be checked with LLVM:

echo "0x04,0x0b,0xb7,0xee,0x10,0xfa,0xf1,0xee,0x02,0x0b,0x31,0xee,0x42,0x0b,0x31,0xee,0xc8,0x1b,0xb0,0xee" | llvm-mc-16 --triple=armv7 --mattr=+vfp3 --disassemble
	.text
	vmov.f64	d0, #1.250000e+00
	vmrs	APSR_nzcv, fpscr
	vadd.f64	d0, d1, d2
	vsub.f64	d0, d1, d2
	vabs.f64	d1, d8

VFP instructions could only be disassembled if armv8 was set as arch.
This is because the predicate fails due to this feature check. This is incorrect as also armv7 can have VFP support.
@Rot127 Rot127 changed the base branch from next to v5 July 18, 2023 11:19
@XVilka XVilka mentioned this pull request Jul 18, 2023
24 tasks
@aquynh aquynh merged commit 270d16e into capstone-engine:v5 Jul 18, 2023
6 checks passed
@aquynh
Copy link
Collaborator

aquynh commented Jul 18, 2023

merged, thanks!

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.

None yet

3 participants