Skip to content

Xtensa, added instructions SALT and SALTU, but got Error : Bad Instruction unable to resolve constructor at #9095

@lclevy

Description

@lclevy

Hi,

I modified ghidra_12.0_PUBLIC\Ghidra\Processors\Xtensa\data\languages\xtensaInstructions.sinc between instructions S32RI and SDCT to handle these instructions:

# SALT - Set AR if Less Than, page 599
:salt ar, as, at is op2 = 0b0111 & op1 = 0b0010 & ar & as & at & op0 = 0 {
    ar = 1;
	if (as s< at)
	  goto inst_next;
	ar = 0;	
}

# SALTU - Set AR if Less Than Unsigned, page 600
:saltu ar, as, at is op2 = 0b0110 & op1 = 0b0010 & ar & as & at & op0 = 0 {
    ar = zext( as < at );	
}

Disassembly is working, but got a red cross before the related line with : Error [Bad Instruction] enable to create constructor at [salt or saltu instruction address] cursor.
Did I miss something ?

Kind regards,
Laurent

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions