PROLEAD
A Probing-Based Leakage Detection Tool for Hardware and Software
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
mulator Namespace Reference

Namespaces

namespace  arm_functions
 

Classes

struct  CPU_State
 
class  Disassembler
 
class  Emulator
 
struct  Instruction
 
class  InstructionDecoder
 
struct  MemoryRegion
 

Typedefs

using u8 = uint8_t
 
using u16 = uint16_t
 
using u32 = uint32_t
 
using u64 = uint64_t
 
using i8 = int8_t
 
using i16 = int16_t
 
using i32 = int32_t
 
using i64 = int64_t
 

Enumerations

enum  Architecture { ARMv6M , ARMv7M , ARMv7EM }
 
enum  Condition {
  EQ = 0 , NE , CS , CC ,
  MI , PL , VS , VC ,
  HI , LS , GE , LT ,
  GT , LE , AL
}
 
enum class  Mnemonic {
  ADC , ADD , ADR , AND ,
  ASR , B , BIC , BKPT ,
  BL , BLX , BX , CMN ,
  CMP , CPS , DMB , DSB ,
  EOR , ISB , LDM , LDR ,
  LDRB , LDRH , LDRSB , LDRSH ,
  LSL , LSR , MOV , MRS ,
  MSR , MUL , MVN , NOP ,
  ORR , POP , PUSH , REV ,
  REV16 , REVSH , ROR , RSB ,
  SBC , SEV , STM , STR ,
  STRB , STRH , SUB , SVC ,
  SXTB , SXTH , TST , UDF ,
  UXTB , UXTH , WFE , WFI ,
  YIELD , ADDW , BFC , BFI ,
  CBZ , CBNZ , CLREX , CLZ ,
  CSDB , DBG , IT , LDMDB ,
  LDRBT , LDRD , LDREX , LDREXB ,
  LDREXH , LDRHT , LDRSBT , LDRSHT ,
  LDRT , MLA , MLS , MOVT ,
  MOVW , ORN , PLD , PLI ,
  PSSBB , RBIT , RRX , SBFX ,
  SDIV , SMLAL , SMULL , SSAT ,
  SSBB , STMDB , STRBT , STRD ,
  STREX , STREXB , STREXH , STRHT ,
  STRT , SUBW , TBB , TBH ,
  TEQ , UBFX , UDIV , UMLAL ,
  UMULL , USAT , UADD8 , SEL ,
  USUB16 , UADD16 , PKHTB , PKHBT ,
  SMULBB , SMULBT , SMULTB , SMULTT ,
  SMLABB , SMLABT , SMLATB , SMLATT ,
  QADD , QADD16 , QADD8 , QASX ,
  QDADD , QDSUB , USUB8 , UXTAB ,
  UXTAB16 , UXTAH , UXTB16 , USAX ,
  SSUB16 , SSUB8 , SXTAB , SXTAB16 ,
  SXTAH , UASX , UHADD16 , UHSUB8 ,
  QSAX , QSUB , SHADD16 , SMLALD ,
  SHADD8 , SMLALDX , QSUB16 , SHASX ,
  SMLAD , SMLAWB , QSUB8 , SHSAX ,
  SMLADX , SMLAWT , SADD16 , SHSUB16 ,
  SMLALBB , SMLSD , SADD8 , SHSUB8 ,
  SMLALBT , SMLSDX , SMLSLD , SMLSLDX ,
  SMMLA , SMMLAR , SMMLS , SMMLSR ,
  SMMUL , SMMULR , SMUAD , SMUADX ,
  SMULWB , SMULWT , SMUSD , SMUSDX ,
  SSAT16 , SSAX , UMAAL , UQADD16 ,
  UQADD8 , UQASX , UQSAX , UQSUB16 ,
  UQSUB8 , USAD8 , USADA8 , USAT16 ,
  SASX , SMLALTT , SMLALTB
}
 
enum  Register {
  R0 = 0 , R1 , R2 , R3 ,
  R4 , R5 , R6 , R7 ,
  R8 , R9 , R10 , R11 ,
  R12 , R13 , R14 , R15 ,
  SB = R9 , SL = R10 , FP = R11 , IP = R12 ,
  SP = R13 , LR = R14 , PC = R15 , PSR
}
 
enum class  ReturnCode {
  OK , INCOMPLETE_DATA , UNDEFINED , UNPREDICTABLE ,
  UNSUPPORTED , UNEXPECTED_ENCODING , NOT_IMPLEMENTED , UNKNOWN_INSTRUCTION ,
  INVALID_IMMEDIATE , INVALID_REGISTER , INVALID_ALIGNMENT , INVALID_MEMORY_ACCESS ,
  INVALID_SHIFT_ARGUMENT , HARD_FAULT , UNINITIALIZED , MAX_INSTRUCTIONS_REACHED ,
  END_ADDRESS_REACHED , STOP_EMULATION_CALLED
}
 
enum class  ShiftType {
  LSL , LSR , ASR , ROR ,
  RRX
}
 

Functions

std::string to_string (const Architecture &x)
 
std::ostream & operator<< (std::ostream &os, const Architecture &x)
 
std::string to_string (const Condition &x)
 
std::ostream & operator<< (std::ostream &os, const Condition &x)
 
std::string to_string (const Mnemonic &x)
 
std::ostream & operator<< (std::ostream &os, const Mnemonic &x)
 
bool has_narrow_encoding (const Mnemonic &x)
 
bool has_wide_encoding (const Mnemonic &x)
 
std::string to_string (const Register &x)
 
std::string to_string_probe (const Register &x)
 
uint32_t to_int (const Register &x)
 
std::ostream & operator<< (std::ostream &os, const Register &x)
 
std::string to_string (const ReturnCode &x)
 
std::ostream & operator<< (std::ostream &os, const ReturnCode &x)
 
std::string to_string (const ShiftType &x)
 
std::ostream & operator<< (std::ostream &os, const ShiftType &x)
 

Variables

const int REGISTER_COUNT = 17
 

Typedef Documentation

◆ i16

using mulator::i16 = typedef int16_t

Definition at line 16 of file types.h.

◆ i32

using mulator::i32 = typedef int32_t

Definition at line 17 of file types.h.

◆ i64

using mulator::i64 = typedef int64_t

Definition at line 18 of file types.h.

◆ i8

using mulator::i8 = typedef int8_t

Definition at line 15 of file types.h.

◆ u16

using mulator::u16 = typedef uint16_t

Definition at line 11 of file types.h.

◆ u32

using mulator::u32 = typedef uint32_t

Definition at line 12 of file types.h.

◆ u64

using mulator::u64 = typedef uint64_t

Definition at line 13 of file types.h.

◆ u8

using mulator::u8 = typedef uint8_t

Definition at line 10 of file types.h.

Enumeration Type Documentation

◆ Architecture

Enumerator
ARMv6M 
ARMv7M 
ARMv7EM 

Definition at line 9 of file architectures.h.

◆ Condition

Enumerator
EQ 
NE 
CS 
CC 
MI 
PL 
VS 
VC 
HI 
LS 
GE 
LT 
GT 
LE 
AL 

Definition at line 9 of file conditions.h.

◆ Mnemonic

enum class mulator::Mnemonic
strong
Enumerator
ADC 
ADD 
ADR 
AND 
ASR 
BIC 
BKPT 
BL 
BLX 
BX 
CMN 
CMP 
CPS 
DMB 
DSB 
EOR 
ISB 
LDM 
LDR 
LDRB 
LDRH 
LDRSB 
LDRSH 
LSL 
LSR 
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
USADA8 
USAT16 
SASX 
SMLALTT 
SMLALTB 

Definition at line 9 of file mnemonics.h.

◆ Register

Enumerator
R0 
R1 
R2 
R3 
R4 
R5 
R6 
R7 
R8 
R9 
R10 
R11 
R12 
R13 
R14 
R15 
SB 
SL 
FP 
IP 
SP 
LR 
PC 
PSR 

Definition at line 10 of file registers.h.

◆ ReturnCode

enum class mulator::ReturnCode
strong
Enumerator
OK 
INCOMPLETE_DATA 
UNDEFINED 
UNPREDICTABLE 
UNSUPPORTED 
UNEXPECTED_ENCODING 
NOT_IMPLEMENTED 
UNKNOWN_INSTRUCTION 
INVALID_IMMEDIATE 
INVALID_REGISTER 
INVALID_ALIGNMENT 
INVALID_MEMORY_ACCESS 
INVALID_SHIFT_ARGUMENT 
HARD_FAULT 
UNINITIALIZED 
MAX_INSTRUCTIONS_REACHED 
END_ADDRESS_REACHED 
STOP_EMULATION_CALLED 

Definition at line 9 of file return_codes.h.

◆ ShiftType

enum class mulator::ShiftType
strong
Enumerator
LSL 
LSR 
ASR 
ROR 
RRX 

Definition at line 8 of file shift_types.h.

Function Documentation

◆ has_narrow_encoding()

bool mulator::has_narrow_encoding ( const Mnemonic x)

◆ has_wide_encoding()

bool mulator::has_wide_encoding ( const Mnemonic x)

◆ operator<<() [1/6]

std::ostream & mulator::operator<< ( std::ostream &  os,
const Architecture x 
)

◆ operator<<() [2/6]

std::ostream & mulator::operator<< ( std::ostream &  os,
const Condition x 
)

◆ operator<<() [3/6]

std::ostream & mulator::operator<< ( std::ostream &  os,
const Mnemonic x 
)

◆ operator<<() [4/6]

std::ostream & mulator::operator<< ( std::ostream &  os,
const Register x 
)

◆ operator<<() [5/6]

std::ostream & mulator::operator<< ( std::ostream &  os,
const ReturnCode x 
)

◆ operator<<() [6/6]

std::ostream & mulator::operator<< ( std::ostream &  os,
const ShiftType x 
)

◆ to_int()

uint32_t mulator::to_int ( const Register x)

◆ to_string() [1/6]

std::string mulator::to_string ( const Architecture x)

◆ to_string() [2/6]

std::string mulator::to_string ( const Condition x)

◆ to_string() [3/6]

std::string mulator::to_string ( const Mnemonic x)

◆ to_string() [4/6]

std::string mulator::to_string ( const Register x)

◆ to_string() [5/6]

std::string mulator::to_string ( const ReturnCode x)

◆ to_string() [6/6]

std::string mulator::to_string ( const ShiftType x)

◆ to_string_probe()

std::string mulator::to_string_probe ( const Register x)

Variable Documentation

◆ REGISTER_COUNT

const int mulator::REGISTER_COUNT = 17

Definition at line 8 of file registers.h.