-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support for MIPS16 ASE opcodes in MIPS32 binaries not working? #241
Comments
can you try again with but anyway, support for Mips16 is still behind at the moment. thanks. |
I can, but I'll have to setup a LE toolchain to recompile my example. Will get back to you... |
no, i mean with the same input, you try to initialize Capstone with |
The rest of the program is junk now too (but I assume you knew that!)
|
mips16 is not in a good shape in Capstone 3.0, so this is not surprise. |
any news on this? |
let me check again by this weekend to see if LLVM improved on this area. |
unfortunately, it seems Mips16 is still not in a good shape as the LLVM developers focus more on other modes. |
Like ASE or MIPS32r6? |
do you mean ASE in Mips32R6? what is the hexcode then? |
ASE 3-D actually... That was a trick question ;-) |
Any update on this? |
@aquynh have you checked if the LLVM guys have fixed this yet? |
Need to double check, but last time it was not there yet. |
Any news on this one? |
ping |
last time i checked llvm did not handle this. need to see if llvm 5.0 can
do it now.
--
Thanks,
Quynh
http://www.keystone-engine.org
http://www.capstone-engine.org
http://www.unicorn-engine.org
|
@aquynh any updates on this? |
we plan to fix this in v5: #1319 |
Many platforms now (e.g. RT5350) include the MIPS16e ASE which uses 16-bits per instruction for some instructions where enabled, instead of 32 (the CPU is still using in 32-bit words). OpenWRT is now turning this on by default with
-mips16
option to gcc now.To be clear, this is a MIPS ASE, the 16-bit opcodes are additional instructions alongside the existing 32-bit instructions.
(References: radareorg/radare2#1917 )
I can't work out how to turn interpretation of this extension on in capstone, or see if it is supported.
The constant
CS_MODE_16
returns the following error so I am not sure if that is for something else:(Regardless if used as (Python))
or
Given the following code correctly disassembled by Openwrt
oolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-objdump
:Capstone produces:
Python used to produce this (sorry, its a bit ugly):
(I tested the above python program does produce correct disassembly for non-MIPS16e functions in the same program!)
The text was updated successfully, but these errors were encountered: