io.joern.ghidra2cpg.processors.MipsProcessor.scala Maven / Gradle / Ivy
The newest version!
package io.joern.ghidra2cpg.processors
import scala.collection.mutable
object MipsProcessor extends Processor {
override val getInstructions: mutable.HashMap[String, String] =
mutable.HashMap(
"_add.D" -> ".incBy",
"_addiu" -> ".incBy",
"_addu" -> ".incBy",
"_and" -> ".and",
"_andi" -> ".and",
"_c.le.D" -> ".TODO",
"_c.lt.D" -> ".TODO",
"_clear" -> ".assignment",
"_clz" -> ".assignment",
"_cvt.d.S" -> ".TODO",
"_cvt.d.W" -> ".TODO",
"_cvt.s.D" -> ".TODO",
"_div" -> ".assignmentDivision",
"_div.D" -> ".assignmentDivision",
"_divu" -> ".assignmentDivision",
"_ext" -> ".assignment",
"_ins" -> ".assignment",
"_lb" -> ".assignment",
"_lbu" -> ".assignment",
"_ldc1" -> ".assignment",
"_ldxc1" -> ".assignment",
"_lh" -> ".assignment",
"_lhu" -> ".assignment",
"_li" -> ".assignment",
"_lui" -> ".assignment",
"_lw" -> ".assignment",
"_lwc1" -> ".assignment",
"_lwl" -> ".assignment",
"_lwr" -> ".assignment",
"_madd" -> ".incBy",
"_madd.D" -> ".incBy",
"_mfc1" -> ".assignment",
"_mfhi" -> ".assignment",
"_mflo" -> ".assignment",
"_mov.D" -> ".assignment",
"_mov.S" -> ".assignment",
"_move" -> ".assignment",
"_movf" -> ".assignment",
"_movf.D" -> ".assignment",
"_movn" -> ".assignment",
"_movn.D" -> ".assignment",
"_movt.D" -> ".assignment",
"_movz" -> ".assignment",
"_mtc1" -> ".assignment",
"_mtlo" -> ".assignment",
"_mul" -> ".assignment",
"_mul.D" -> ".assignment",
"_mult" -> ".assignment",
"_multu" -> ".assignment",
"_nop" -> ".NOP",
"_nor" -> ".nor",
"_or" -> ".or",
"_ori" -> ".or",
"_rotr" -> ".rotateRight",
"_sb" -> ".assignment",
"_sdc1" -> ".TODO",
"_sdxc1" -> ".TODO",
"_seb" -> ".TODO",
"_seh" -> ".TODO",
"_sh" -> ".assignment",
"_sll" -> ".assignmentShiftLeft",
"_sllv" -> ".assignmentShiftLeft",
"_slt" -> ".TODO",
"_slti" -> ".assignment",
"_sltiu" -> ".assignment",
"_sltu" -> ".assignment",
"_sra" -> ".TODO",
"_srav" -> ".TODO",
"_srl" -> ".assignmentLogicalShiftRight",
"_srlv" -> ".assignmentLogicalShiftRight",
"_sub.D" -> ".decBy",
"_subu" -> ".decBy",
"_sw" -> ".assignment",
"_swc1" -> ".assignment",
"_swr" -> ".TODO",
"_trunc.w.D" -> ".TODO",
"_wsbh" -> ".TODO",
"_xor" -> ".assignmentXor",
"_xori" -> ".assignmentXor",
"add" -> ".incBy",
"add.D" -> ".incBy",
"add.S" -> ".incBy",
"addi" -> ".incBy",
"addiu" -> ".incBy",
"addu" -> ".incBy",
"and" -> ".and",
"andi" -> ".and",
"b" -> ".goto",
"bal" -> "CALL",
"bc1f" -> ".goto",
"bc1fl" -> ".goto",
"bc1t" -> ".goto",
"bc1tl" -> ".goto",
"beq" -> ".goto",
"beql" -> ".goto",
"bgez" -> ".goto",
"bgezl" -> ".goto",
"bgtz" -> ".goto",
"bgtzl" -> ".goto",
"blez" -> ".goto",
"blezl" -> ".goto",
"bltz" -> ".goto",
"bltzl" -> ".goto",
"bne" -> ".goto",
"bnel" -> ".goto",
"break" -> ".TODO",
"c.eq.D" -> ".TODO",
"c.eq.S" -> ".TODO",
"c.le.D" -> ".TODO",
"c.le.S" -> ".TODO",
"c.lt.D" -> ".TODO",
"c.lt.S" -> ".TODO",
"cdqe" -> ".TODO",
"cfc1" -> ".TODO",
"clear" -> ".clear",
"clz" -> ".assignment",
"cmova" -> ".assignment",
"cmovbe" -> ".assignment",
"cmovns" -> ".assignment",
"cmovnz" -> ".assignment",
"cmovz" -> ".assignment",
"cmp" -> ".TODO",
"ctc1" -> ".TODO",
"cvt.d.S" -> ".TODO",
"cvt.d.W" -> ".TODO",
"cvt.s.D" -> ".TODO",
"cvt.s.W" -> ".TODO",
"cvt.w.D" -> ".TODO",
"div" -> ".assignmentDivision",
"div.D" -> ".assignmentDivision",
"div.S" -> ".assignmentDivision",
"divu" -> ".assignmentDivision",
"ext" -> ".assignment",
"hlt" -> ".TODO",
"imul" -> ".multiplication",
"ins" -> ".assignment",
"j" -> ".goto",
"jal" -> "CALL",
"jalr" -> "CALL",
"jbe" -> ".goto",
"jc" -> ".goto",
"jg" -> ".goto",
"jle" -> ".goto",
"jmp" -> ".goto",
"jnc" -> ".goto",
"jnz" -> ".goto",
"jr" -> "RET",
"jz" -> ".goto",
"lb" -> ".assignment",
"lbu" -> ".assignment",
"ldc1" -> ".assignment",
"ldxc1" -> ".assignment",
"lea" -> ".assignment",
"lh" -> ".assignment",
"lhu" -> ".assignment",
"li" -> ".assignment",
"ll" -> ".assignment",
"lui" -> ".assignment",
"lw" -> ".assignment",
"lwc1" -> ".assignment",
"lwl" -> ".assignment",
"lwr" -> ".assignment",
"lwxc1" -> ".assignment",
"madd" -> ".incBy",
"madd.D" -> ".incBy",
"maddu" -> ".multiplication",
"mfc1" -> ".assignment",
"mfhi" -> ".assignment",
"mflo" -> ".assignment",
"mov" -> ".assignment",
"mov.D" -> ".assignment",
"mov.S" -> ".assignment",
"move" -> ".assignment",
"movf" -> ".assignment",
"movf.D" -> ".assignment",
"movn" -> ".assignment",
"movn.D" -> ".assignment",
"movsx" -> ".assignment",
"movsxd" -> ".assignment",
"movt.D" -> ".assignment",
"movz" -> ".assignment",
"movz.D" -> ".assignment",
"movzx" -> ".assignment",
"msub" -> ".decBy",
"msub.D" -> ".decBy",
"msubu" -> ".decBy",
"mtc1" -> ".TODO",
"mthi" -> ".TODO",
"mtlo" -> ".TODO",
"mul" -> ".multiplication",
"mul.D" -> ".multiplication",
"mul.S" -> ".multiplication",
"mult" -> ".multiplication",
"multu" -> ".multiplication",
"neg" -> ".negation",
"nop" -> ".NOP",
"nor" -> ".assingmentNor",
"not" -> ".assignmentNot",
"or" -> ".assignmentOr",
"ori" -> ".assignmentOr",
"pop" -> ".assignment",
"pref" -> ".TODO",
"push" -> ".assignment",
"rdhwr" -> ".TODO",
"ret" -> ".TODO",
"rotr" -> ".rotateRight",
"rotrv" -> ".rotateRight",
"sar" -> ".TODO",
"sb" -> ".assignment",
"sc" -> ".TODO",
"sdc1" -> ".TODO",
"sdxc1" -> ".TODO",
"seb" -> ".TODO",
"seh" -> ".assignment",
"setg" -> ".TODO",
"sh" -> ".assignment",
"shl" -> ".TODO",
"shr" -> ".TODO",
"sll" -> ".assignmentShiftLeft",
"sllv" -> ".assignmentShiftLeft",
"slt" -> ".assignment",
"slti" -> ".assignment",
"sltiu" -> ".assignment",
"sltu" -> ".assignment",
"sra" -> ".assignmentArithmeticShiftRight",
"srav" -> ".assignmentArithmeticShiftRight",
"srl" -> ".assignmentLogicalShiftRight",
"srlv" -> ".assignmentLogicalShiftRight",
"stosq.rep" -> ".TODO",
"sub" -> ".decBy",
"sub.D" -> ".decBy",
"sub.S" -> ".decBy",
"subu" -> ".decBy",
"sw" -> ".assignment",
"swc1" -> ".TODO",
"swl" -> ".TODO",
"swr" -> ".TODO",
"sync" -> ".TODO",
"syscall" -> ".syscall",
"teq" -> ".TODO",
"test" -> ".TODO",
"trunc.w.D" -> ".TODO",
"trunc.w.S" -> ".TODO",
"wsbh" -> ".assignment",
"xor" -> ".assignmentXor",
"xori" -> ".assignmentXor"
)
}