All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.joern.ghidra2cpg.processors.X86Processor.scala Maven / Gradle / Ivy

The newest version!
package io.joern.ghidra2cpg.processors

import scala.collection.mutable

object X86Processor extends Processor {
  override val getInstructions: mutable.HashMap[String, String] =
    mutable.HashMap(
      "ADC"       -> ".incBy",
      "ADD"       -> ".incBy",
      "ADDR32"    -> ".TODO",
      "ADDSD"     -> ".incBy",
      "ADDSS"     -> ".incBy",
      "AND"       -> ".assignmentAnd",
      "BSF"       -> ".TODO",
      "BSR"       -> ".TODO",
      "BSWAP"     -> ".TODO",
      "BT"        -> ".TODO",
      "BTC"       -> ".TODO",
      "BTR"       -> ".TODO",
      "BTS"       -> ".TODO",
      "CALL"      -> "CALL",
      "CDQ"       -> ".assignment",
      "CDQE"      -> ".assignment",
      "CMOVA"     -> ".assignment",
      "CMOVAE"    -> ".assignment",
      "CMOVB"     -> ".assignment",
      "CMOVBE"    -> ".assignment",
      "CMOVC"     -> ".assignment",
      "CMOVC"     -> ".assignment",
      "CMOVE"     -> ".assignment",
      "CMOVG"     -> ".assignment",
      "CMOVG"     -> ".assignment",
      "CMOVGE"    -> ".assignment",
      "CMOVGE"    -> ".assignment",
      "CMOVL"     -> ".assignment",
      "CMOVL"     -> ".assignment",
      "CMOVLE"    -> ".assignment",
      "CMOVLE"    -> ".assignment",
      "CMOVNC"    -> ".assignment",
      "CMOVNC"    -> ".assignment",
      "CMOVNE"    -> ".assignment",
      "CMOVNS"    -> ".assignment",
      "CMOVNS"    -> ".assignment",
      "CMOVNZ"    -> ".assignment",
      "CMOVNZ"    -> ".assignment",
      "CMOVP"     -> ".assignment",
      "CMOVS"     -> ".assignment",
      "CMOVS"     -> ".assignment",
      "CMOVZ"     -> ".assignment",
      "CMOVZ"     -> ".assignment",
      "CMP"       -> ".compare",
      "CMPXCHG"   -> ".TODO",
      "COMISD"    -> ".TODO",
      "COMISS"    -> ".TODO",
      "CQO"       -> ".TODO",
      "CS"        -> ".TODO",
      "CVTSI2SD"  -> ".TODO",
      "CVTSI2SD"  -> ".TODO",
      "CVTSI2SS"  -> ".TODO",
      "CVTSI2SS"  -> ".TODO",
      "CVTSS2SD"  -> ".TODO",
      "CVTTSD2SI" -> ".TODO",
      "CVTTSS2SI" -> ".TODO",
      "CVTTSS2SI" -> ".TODO",
      "DATA16"    -> ".TODO",
      "DEC"       -> ".assignment",
      "DIV"       -> ".division",
      "DIVSD"     -> ".division",
      "DIVSS"     -> ".division",
      "ENDBR64"   -> ".NOP",
      "FADD"      -> ".incBy",
      "FCOMI"     -> ".TODO",
      "FCOMIP"    -> ".TODO",
      "FDIV"      -> ".division",
      "FDIVP"     -> ".division",
      "FDIVP"     -> ".division",
      "FDIVRP"    -> ".division",
      "FILD"      -> ".TODO",
      "FISTP"     -> ".TODO",
      "FLD"       -> ".TODO",
      "FLDCW"     -> ".TODO",
      "FMUL"      -> ".multiplication",
      "FMULP"     -> ".multiplication",
      "FNINIT"    -> ".TODO",
      "FNSTCW"    -> ".TODO",
      "FSTP"      -> ".TODO",
      "FSUBR"     -> ".subtraction",
      "FUCOMI"    -> ".TODO",
      "FUCOMIP"   -> ".TODO",
      "FXCH"      -> ".TODO",
      "HLT"       -> ".NOP",
      "IDIV"      -> ".division",
      "IMUL"      -> ".multiplication",
      "INC"       -> ".assignment",
      "JA"        -> ".goto",
      "JAE"       -> ".goto",
      "JB"        -> ".goto",
      "JBE"       -> ".goto",
      "JC"        -> ".goto",
      "JE"        -> ".goto",
      "JG"        -> ".goto",
      "JGE"       -> ".goto",
      "JL"        -> ".goto",
      "JLE"       -> ".goto",
      "JMP"       -> ".goto",
      "JNC"       -> ".goto",
      "JNE"       -> ".goto",
      "JNO"       -> ".goto",
      "JNP"       -> ".goto",
      "JNS"       -> ".goto",
      "JNZ"       -> ".goto",
      "JO"        -> ".goto",
      "JP"        -> ".goto",
      "JS"        -> ".goto",
      "JZ"        -> ".goto",
      "LEA"       -> ".addressOf",
      "LEAVE"     -> "LEAVE",
      "MOV"       -> ".assignment",
      "MOV"       -> ".assignment",
      "MOVABS"    -> ".assignment",
      "MOVAPD"    -> ".assignment",
      "MOVAPS"    -> ".assignment",
      "MOVD"      -> ".assignment",
      "MOVDQA"    -> ".assignment",
      "MOVDQU"    -> ".assignment",
      "MOVDQU"    -> ".assignment",
      "MOVMSKPD"  -> ".assignment",
      "MOVQ"      -> ".assignment",
      "MOVQ"      -> ".assignment",
      "MOVSB.REP" -> ".assignment",
      "MOVSD"     -> ".assignment",
      "MOVSD"     -> ".assignment",
      "MOVSQ.REP" -> ".assignment",
      "MOVSQ.REP" -> ".assignment",
      "MOVSS"     -> ".assignment",
      "MOVSS"     -> ".assignment",
      "MOVSX"     -> ".assignment",
      "MOVSX"     -> ".assignment",
      "MOVSXD"    -> ".assignment",
      "MOVSXD"    -> ".assignment",
      "MOVUPD"    -> ".assignment",
      "MOVUPS"    -> ".assignment",
      "MOVUPS"    -> ".assignment",
      "MOVZX"     -> ".assignment",
      "MOVZX"     -> ".assignment",
      "MUL"       -> ".multiplication",
      "MULSD"     -> ".multiplication",
      "MULSS"     -> ".multiplication",
      "NEG"       -> ".negation",
      "NOP"       -> ".NOP",
      "NOT"       -> ".not",
      "OR"        -> ".or",
      "POP"       -> ".assignment",
      "PUSH"      -> ".assignment",
      "PXOR"      -> ".assignmentXor",
      "REP"       -> ".TODO",
      "RET"       -> "RET",
      "ROL"       -> ".rotateLeft",
      "ROR"       -> ".rotateRight",
      "SAR"       -> ".arithmeticShiftRight",
      "SBB"       -> ".subtraction",
      "SETA"      -> ".assignment",
      "SETB"      -> ".assignment",
      "SETBE"     -> ".assignment",
      "SETC"      -> ".assignment",
      "SETE"      -> ".assignment",
      "SETG"      -> ".assignment",
      "SETGE"     -> ".assignment",
      "SETL"      -> ".assignment",
      "SETLE"     -> ".assignment",
      "SETNC"     -> ".assignment",
      "SETNE"     -> ".assignment",
      "SETNZ"     -> ".assignment",
      "SETO"      -> ".assignment",
      "SETS"      -> ".assignment",
      "SETZ"      -> ".assignment",
      "SHL"       -> ".logicalShiftLeft",
      "SHR"       -> ".logicalShiftRight",
      "STOSD.REP" -> ".TODO",
      "STOSQ.REP" -> ".TODO",
      "SUB"       -> ".subtraction",
      "SUBSD"     -> ".subtraction",
      "SUBSS"     -> ".subtraction",
      "TEST"      -> ".compare",
      "TZCNT"     -> ".assignment",
      "UD2"       -> ".NOP",
      "XADD"      -> ".incBy",
      "XCHG"      -> ".assignment",
      "XOR"       -> ".assignmentXor"
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy