Skip to content

NDS32 missing inline function call instructions #8974

@CUB3D

Description

@CUB3D

As discussed elsewhere (#6627), NDS32 supports "inline function calls". This is implemented using the IFCALL, IFCALL9, IFRET and IFRET16 instructions. Currently Ghidra doesn't support these which leads to incorrect function disassembly.

Here's an example binary with the missing instructions:

Source code
int main() {
    asm("ifcall9 0x10");
    asm("ifcall 0x10");
    asm("ifret");
    asm("ifret16");
    return 0;
}    

Compile with ./nds32le-elf-mculib-v3s/bin/nds32le-elf-gcc -c test.c
Binary toolchain available here

nds32_ifcall.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions