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

Keystone Not Assembling Powerpc #566

Open
elbee-cyber opened this issue Oct 26, 2023 · 1 comment
Open

Keystone Not Assembling Powerpc #566

elbee-cyber opened this issue Oct 26, 2023 · 1 comment

Comments

@elbee-cyber
Copy link

It seems that keystone is not assembling basically any powerpc64 instruction (beyond nops and some instructions which do not read/write memory including registers)
eg:

md = Ks(KS_ARCH_PPC, KS_MODE_PPC64 | KS_MODE_BIG_ENDIAN)
print(md.asm(bytes("ld r0,16(r1)", 'utf8'), as_bytes=True))
print(md.asm(bytes("addi r10,r2,235", 'utf8'), as_bytes=True))
print(md.asm(bytes("xori r9,r9,65280", 'utf8'), as_bytes=True))

All instructions result in an Invalid operand (KS_ERR_ASM_INVALIDOPERAND)

I've also noticed this issue in virtually every tool that uses keystone, here's another example from gdb-gef:
image

I've noticed the same issue for ppc32:
image

@TheN00bBuilder
Copy link

Have this issue as well. This is something new as well because less than a year ago, I was able to use it to assemble PowerPC.

I'm going to attempt to make a patch for it soon, once I diagnose the issue.

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