Typedefs | Enumerations | Functions
ARMAddressingModes.h File Reference
#include "capstone/platform.h"
#include "../../MathExtras.h"
Include dependency graph for ARMAddressingModes.h:

Go to the source code of this file.

Typedefs

typedef enum ARM_AM_AddrOpc ARM_AM_AddrOpc
 
typedef enum ARM_AM_AMSubMode ARM_AM_AMSubMode
 
typedef enum ARM_AM_ShiftOpc ARM_AM_ShiftOpc
 ARM_AM - ARM Addressing Mode Stuff. More...
 

Enumerations

enum  ARM_AM_AddrOpc { ARM_AM_sub = 0, ARM_AM_add }
 
enum  ARM_AM_AMSubMode {
  ARM_AM_bad_am_submode = 0, ARM_AM_ia, ARM_AM_ib, ARM_AM_da,
  ARM_AM_db
}
 
enum  ARM_AM_ShiftOpc {
  ARM_AM_no_shift = 0, ARM_AM_asr, ARM_AM_lsl, ARM_AM_lsr,
  ARM_AM_ror, ARM_AM_rrx
}
 ARM_AM - ARM Addressing Mode Stuff. More...
 

Functions

static uint64_t ARM_AM_decodeNEONModImm (unsigned ModImm, unsigned *EltBits)
 
static const char * ARM_AM_getAddrOpcStr (ARM_AM_AddrOpc Op)
 
static unsigned ARM_AM_getAM2Opc (ARM_AM_AddrOpc Opc, unsigned Imm12, ARM_AM_ShiftOpc SO, unsigned IdxMode)
 
static unsigned char ARM_AM_getAM5Offset (unsigned AM5Opc)
 
static ARM_AM_AddrOpc ARM_AM_getAM5Op (unsigned AM5Opc)
 
static unsigned ARM_AM_getAM5Opc (ARM_AM_AddrOpc Opc, unsigned char Offset)
 getAM5Opc - This function encodes the addrmode5 opc field. More...
 
static const char * ARM_AM_getAMSubModeStr (ARM_AM_AMSubMode Mode)
 
static unsigned ARM_AM_getShiftOpcEncoding (ARM_AM_ShiftOpc Op)
 
static const char * ARM_AM_getShiftOpcStr (ARM_AM_ShiftOpc Op)
 
static ARM_AM_ShiftOpc ARM_AM_getSORegShOp (unsigned Op)
 
static unsigned createNEONModImm (unsigned OpCmode, unsigned Val)
 
static unsigned getAM2IdxMode (unsigned AM2Opc)
 
static unsigned getAM2Offset (unsigned AM2Opc)
 
static ARM_AM_AddrOpc getAM2Op (unsigned AM2Opc)
 
static ARM_AM_ShiftOpc getAM2ShiftOpc (unsigned AM2Opc)
 
static unsigned getAM3IdxMode (unsigned AM3Opc)
 
static unsigned char getAM3Offset (unsigned AM3Opc)
 
static ARM_AM_AddrOpc getAM3Op (unsigned AM3Opc)
 
static unsigned getAM3Opc (ARM_AM_AddrOpc Opc, unsigned char Offset, unsigned IdxMode)
 getAM3Opc - This function encodes the addrmode3 opc field. More...
 
static unsigned getAM4ModeImm (ARM_AM_AMSubMode SubMode)
 
static ARM_AM_AMSubMode getAM4SubMode (unsigned Mode)
 
static float getFPImmFloat (unsigned Imm)
 
ARM_AM_AMSubMode getLoadStoreMultipleSubMode (int Opcode)
 
static unsigned getNEONModImmOpCmode (unsigned ModImm)
 
static unsigned getNEONModImmVal (unsigned ModImm)
 
static unsigned getSOImmTwoPartFirst (unsigned V)
 
static unsigned getSOImmTwoPartSecond (unsigned V)
 
static int getSOImmVal (unsigned Arg)
 
static unsigned getSOImmValImm (unsigned Imm)
 
static unsigned getSOImmValRot (unsigned Imm)
 
static unsigned getSOImmValRotate (unsigned Imm)
 
static unsigned getSORegOffset (unsigned Op)
 
static unsigned getSORegOpc (ARM_AM_ShiftOpc ShOp, unsigned Imm)
 
static unsigned getT2SOImmTwoPartFirst (unsigned Imm)
 
static unsigned getT2SOImmTwoPartSecond (unsigned Imm)
 
static int getT2SOImmVal (unsigned Arg)
 
static unsigned getT2SOImmValRotate (unsigned V)
 
static int getT2SOImmValRotateVal (unsigned V)
 
static int getT2SOImmValSplatVal (unsigned V)
 
static unsigned getThumbImm16ValShift (unsigned Imm)
 
static unsigned getThumbImmNonShiftedVal (unsigned V)
 
static unsigned getThumbImmValShift (unsigned Imm)
 
static bool isSOImmTwoPartVal (unsigned V)
 
static bool isT2SOImmTwoPartVal (unsigned Imm)
 
static bool isThumbImm16ShiftedVal (unsigned V)
 
static bool isThumbImmShiftedVal (unsigned V)
 
static unsigned rotl32 (unsigned Val, unsigned Amt)
 
static unsigned rotr32 (unsigned Val, unsigned Amt)
 

Typedef Documentation

◆ ARM_AM_AddrOpc

◆ ARM_AM_AMSubMode

◆ ARM_AM_ShiftOpc

ARM_AM - ARM Addressing Mode Stuff.

Enumeration Type Documentation

◆ ARM_AM_AddrOpc

Enumerator
ARM_AM_sub 
ARM_AM_add 

Definition at line 33 of file ARMAddressingModes.h.

◆ ARM_AM_AMSubMode

Enumerator
ARM_AM_bad_am_submode 
ARM_AM_ia 
ARM_AM_ib 
ARM_AM_da 
ARM_AM_db 

Definition at line 66 of file ARMAddressingModes.h.

◆ ARM_AM_ShiftOpc

ARM_AM - ARM Addressing Mode Stuff.

Enumerator
ARM_AM_no_shift 
ARM_AM_asr 
ARM_AM_lsl 
ARM_AM_lsr 
ARM_AM_ror 
ARM_AM_rrx 

Definition at line 24 of file ARMAddressingModes.h.

Function Documentation

◆ ARM_AM_decodeNEONModImm()

static uint64_t ARM_AM_decodeNEONModImm ( unsigned  ModImm,
unsigned *  EltBits 
)
inlinestatic

decodeNEONModImm - Decode a NEON modified immediate value into the element value and the element size in bits. (If the element size is smaller than the vector, it is splatted into all the elements.)

Definition at line 599 of file ARMAddressingModes.h.

◆ ARM_AM_getAddrOpcStr()

static const char* ARM_AM_getAddrOpcStr ( ARM_AM_AddrOpc  Op)
inlinestatic

Definition at line 38 of file ARMAddressingModes.h.

◆ ARM_AM_getAM2Opc()

static unsigned ARM_AM_getAM2Opc ( ARM_AM_AddrOpc  Opc,
unsigned  Imm12,
ARM_AM_ShiftOpc  SO,
unsigned  IdxMode 
)
inlinestatic

Definition at line 442 of file ARMAddressingModes.h.

◆ ARM_AM_getAM5Offset()

static unsigned char ARM_AM_getAM5Offset ( unsigned  AM5Opc)
inlinestatic

Definition at line 549 of file ARMAddressingModes.h.

◆ ARM_AM_getAM5Op()

static ARM_AM_AddrOpc ARM_AM_getAM5Op ( unsigned  AM5Opc)
inlinestatic

Definition at line 553 of file ARMAddressingModes.h.

◆ ARM_AM_getAM5Opc()

static unsigned ARM_AM_getAM5Opc ( ARM_AM_AddrOpc  Opc,
unsigned char  Offset 
)
inlinestatic

getAM5Opc - This function encodes the addrmode5 opc field.

Definition at line 544 of file ARMAddressingModes.h.

◆ ARM_AM_getAMSubModeStr()

static const char* ARM_AM_getAMSubModeStr ( ARM_AM_AMSubMode  Mode)
inlinestatic

Definition at line 74 of file ARMAddressingModes.h.

◆ ARM_AM_getShiftOpcEncoding()

static unsigned ARM_AM_getShiftOpcEncoding ( ARM_AM_ShiftOpc  Op)
inlinestatic

Definition at line 55 of file ARMAddressingModes.h.

◆ ARM_AM_getShiftOpcStr()

static const char* ARM_AM_getShiftOpcStr ( ARM_AM_ShiftOpc  Op)
inlinestatic

Definition at line 43 of file ARMAddressingModes.h.

◆ ARM_AM_getSORegShOp()

static ARM_AM_ShiftOpc ARM_AM_getSORegShOp ( unsigned  Op)
inlinestatic

Definition at line 125 of file ARMAddressingModes.h.

◆ createNEONModImm()

static unsigned createNEONModImm ( unsigned  OpCmode,
unsigned  Val 
)
inlinestatic

Definition at line 583 of file ARMAddressingModes.h.

◆ getAM2IdxMode()

static unsigned getAM2IdxMode ( unsigned  AM2Opc)
inlinestatic

Definition at line 465 of file ARMAddressingModes.h.

◆ getAM2Offset()

static unsigned getAM2Offset ( unsigned  AM2Opc)
inlinestatic

Definition at line 450 of file ARMAddressingModes.h.

◆ getAM2Op()

static ARM_AM_AddrOpc getAM2Op ( unsigned  AM2Opc)
inlinestatic

Definition at line 455 of file ARMAddressingModes.h.

◆ getAM2ShiftOpc()

static ARM_AM_ShiftOpc getAM2ShiftOpc ( unsigned  AM2Opc)
inlinestatic

Definition at line 460 of file ARMAddressingModes.h.

◆ getAM3IdxMode()

static unsigned getAM3IdxMode ( unsigned  AM3Opc)
inlinestatic

Definition at line 502 of file ARMAddressingModes.h.

◆ getAM3Offset()

static unsigned char getAM3Offset ( unsigned  AM3Opc)
inlinestatic

Definition at line 492 of file ARMAddressingModes.h.

◆ getAM3Op()

static ARM_AM_AddrOpc getAM3Op ( unsigned  AM3Opc)
inlinestatic

Definition at line 497 of file ARMAddressingModes.h.

◆ getAM3Opc()

static unsigned getAM3Opc ( ARM_AM_AddrOpc  Opc,
unsigned char  Offset,
unsigned  IdxMode 
)
inlinestatic

getAM3Opc - This function encodes the addrmode3 opc field.

Definition at line 485 of file ARMAddressingModes.h.

◆ getAM4ModeImm()

static unsigned getAM4ModeImm ( ARM_AM_AMSubMode  SubMode)
inlinestatic

Definition at line 527 of file ARMAddressingModes.h.

◆ getAM4SubMode()

static ARM_AM_AMSubMode getAM4SubMode ( unsigned  Mode)
inlinestatic

Definition at line 522 of file ARMAddressingModes.h.

◆ getFPImmFloat()

static float getFPImmFloat ( unsigned  Imm)
inlinestatic

Definition at line 643 of file ARMAddressingModes.h.

◆ getLoadStoreMultipleSubMode()

ARM_AM_AMSubMode getLoadStoreMultipleSubMode ( int  Opcode)

◆ getNEONModImmOpCmode()

static unsigned getNEONModImmOpCmode ( unsigned  ModImm)
inlinestatic

Definition at line 587 of file ARMAddressingModes.h.

◆ getNEONModImmVal()

static unsigned getNEONModImmVal ( unsigned  ModImm)
inlinestatic

Definition at line 591 of file ARMAddressingModes.h.

◆ getSOImmTwoPartFirst()

static unsigned getSOImmTwoPartFirst ( unsigned  V)
inlinestatic

getSOImmTwoPartFirst - If V is a value that satisfies isSOImmTwoPartVal, return the first chunk of it.

Definition at line 217 of file ARMAddressingModes.h.

◆ getSOImmTwoPartSecond()

static unsigned getSOImmTwoPartSecond ( unsigned  V)
inlinestatic

getSOImmTwoPartSecond - If V is a value that satisfies isSOImmTwoPartVal, return the second chunk of it.

Definition at line 224 of file ARMAddressingModes.h.

◆ getSOImmVal()

static int getSOImmVal ( unsigned  Arg)
inlinestatic

getSOImmVal - Given a 32-bit immediate, if it is something that can fit into an shifter_operand immediate operand, return the 12-bit encoding for it. If not, return -1.

Definition at line 184 of file ARMAddressingModes.h.

◆ getSOImmValImm()

static unsigned getSOImmValImm ( unsigned  Imm)
inlinestatic

getSOImmValImm - Given an encoded imm field for the reg/imm form, return the 8-bit imm value.

Definition at line 132 of file ARMAddressingModes.h.

◆ getSOImmValRot()

static unsigned getSOImmValRot ( unsigned  Imm)
inlinestatic

getSOImmValRot - Given an encoded imm field for the reg/imm form, return the rotate amount.

Definition at line 139 of file ARMAddressingModes.h.

◆ getSOImmValRotate()

static unsigned getSOImmValRotate ( unsigned  Imm)
inlinestatic

getSOImmValRotate - Try to handle Imm with an immediate shifter operand, computing the rotate amount to use. If this immediate value cannot be handled with a single shifter-op, determine a good rotate amount that will take a maximal chunk of bits out of the immediate.

Definition at line 148 of file ARMAddressingModes.h.

◆ getSORegOffset()

static unsigned getSORegOffset ( unsigned  Op)
inlinestatic

Definition at line 120 of file ARMAddressingModes.h.

◆ getSORegOpc()

static unsigned getSORegOpc ( ARM_AM_ShiftOpc  ShOp,
unsigned  Imm 
)
inlinestatic

Definition at line 115 of file ARMAddressingModes.h.

◆ getT2SOImmTwoPartFirst()

static unsigned getT2SOImmTwoPartFirst ( unsigned  Imm)
inlinestatic

Definition at line 395 of file ARMAddressingModes.h.

◆ getT2SOImmTwoPartSecond()

static unsigned getT2SOImmTwoPartSecond ( unsigned  Imm)
inlinestatic

Definition at line 413 of file ARMAddressingModes.h.

◆ getT2SOImmVal()

static int getT2SOImmVal ( unsigned  Arg)
inlinestatic

getT2SOImmVal - Given a 32-bit immediate, if it is something that can fit into a Thumb-2 shifter_operand immediate operand, return the 12-bit encoding for it. If not, return -1. See ARM Reference Manual A6.3.2.

Definition at line 339 of file ARMAddressingModes.h.

◆ getT2SOImmValRotate()

static unsigned getT2SOImmValRotate ( unsigned  V)
inlinestatic

Definition at line 355 of file ARMAddressingModes.h.

◆ getT2SOImmValRotateVal()

static int getT2SOImmValRotateVal ( unsigned  V)
inlinestatic

getT2SOImmValRotateVal - Return the 12-bit encoded representation if the specified value is a rotated 8-bit value. Return -1 if no rotation encoding is possible. See ARM Reference Manual A6.3.2.

Definition at line 322 of file ARMAddressingModes.h.

◆ getT2SOImmValSplatVal()

static int getT2SOImmValSplatVal ( unsigned  V)
inlinestatic

getT2SOImmValSplat - Return the 12-bit encoded representation if the specified value can be obtained by splatting the low 8 bits into every other byte or every byte of a 32-bit value. i.e., 00000000 00000000 00000000 abcdefgh control = 0 00000000 abcdefgh 00000000 abcdefgh control = 1 abcdefgh 00000000 abcdefgh 00000000 control = 2 abcdefgh abcdefgh abcdefgh abcdefgh control = 3 Return -1 if none of the above apply. See ARM Reference Manual A6.3.2.

Definition at line 293 of file ARMAddressingModes.h.

◆ getThumbImm16ValShift()

static unsigned getThumbImm16ValShift ( unsigned  Imm)
inlinestatic

getThumbImm16ValShift - Try to handle Imm with a 16-bit immediate followed by a left shift. Returns the shift amount to use.

Definition at line 257 of file ARMAddressingModes.h.

◆ getThumbImmNonShiftedVal()

static unsigned getThumbImmNonShiftedVal ( unsigned  V)
inlinestatic

getThumbImmNonShiftedVal - If V is a value that satisfies isThumbImmShiftedVal, return the non-shiftd value.

Definition at line 278 of file ARMAddressingModes.h.

◆ getThumbImmValShift()

static unsigned getThumbImmValShift ( unsigned  Imm)
inlinestatic

getThumbImmValShift - Try to handle Imm with a 8-bit immediate followed by a left shift. Returns the shift amount to use.

Definition at line 236 of file ARMAddressingModes.h.

◆ isSOImmTwoPartVal()

static bool isSOImmTwoPartVal ( unsigned  V)
inlinestatic

isSOImmTwoPartVal - Return true if the specified value can be obtained by or'ing together two SOImmVal's.

Definition at line 203 of file ARMAddressingModes.h.

◆ isT2SOImmTwoPartVal()

static bool isT2SOImmTwoPartVal ( unsigned  Imm)
inlinestatic

Definition at line 367 of file ARMAddressingModes.h.

◆ isThumbImm16ShiftedVal()

static bool isThumbImm16ShiftedVal ( unsigned  V)
inlinestatic

isThumbImm16ShiftedVal - Return true if the specified value can be obtained by left shifting a 16-bit immediate.

Definition at line 269 of file ARMAddressingModes.h.

◆ isThumbImmShiftedVal()

static bool isThumbImmShiftedVal ( unsigned  V)
inlinestatic

isThumbImmShiftedVal - Return true if the specified value can be obtained by left shifting a 8-bit immediate.

Definition at line 248 of file ARMAddressingModes.h.

◆ rotl32()

static unsigned rotl32 ( unsigned  Val,
unsigned  Amt 
)
inlinestatic

rotl32 - Rotate a 32-bit unsigned value left by a specified # bits.

Definition at line 95 of file ARMAddressingModes.h.

◆ rotr32()

static unsigned rotr32 ( unsigned  Val,
unsigned  Amt 
)
inlinestatic

rotr32 - Rotate a 32-bit unsigned value right by a specified # bits.

Definition at line 87 of file ARMAddressingModes.h.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:03