MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / PACIB

Function PACIB

arch/arm64/disassembler/decode2.c:19052–19127  ·  view source on GitHub ↗

pacib.xml */

Source from the content-addressed store, hash-verified

19050
19051/* pacib.xml */
19052int PACIB(context *ctx, Instruction *instr)
19053{
19054 int rc = DECODE_STATUS_UNMATCHED;
19055 /* class iclass_general */
19056 /* sf=1|1|S=0|11010110|opcode2=00001|opcode[5]=0|opcode[4]=0|Z=x|opcode[2:0]=001|Rn=xxxxx|Rd=xxxxx */
19057 if((INSWORD & 0xFFFFDC00)==0xDAC10400) {
19058 decode_fields32(ENC_PACIB_64P_DP_1SRC, ctx, instr);
19059 ctx->source_is_sp = FALSE;
19060 ctx->d = UINT(ctx->Rd);
19061 ctx->n = UINT(ctx->Rn);
19062 if(!HavePACExt()) {
19063 UNDEFINED;
19064 }
19065 if(ctx->Z==0) {
19066 if(ctx->n==0x1f) {
19067 ctx->source_is_sp = TRUE;
19068 }
19069 }
19070 else {
19071 if(ctx->n!=0x1f) {
19072 UNDEFINED;
19073 }
19074 }
19075 if(ctx->Z==0) OK(ENC_PACIB_64P_DP_1SRC);
19076 if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_PACIZB_64Z_DP_1SRC);
19077 }
19078 /* class iclass_system */
19079 /* 1101010100|L=0|op0=00|op1=011|CRn=0010|CRm=00x1|op2=01x|Rt=11111 */
19080 if((INSWORD & 0xFFFFFDDF)==0xD503215F) {
19081 decode_fields32(ENC_PACIB1716_HI_HINTS, ctx, instr);
19082 ctx->source_is_sp = FALSE;
19083 if(((ctx->CRm<<3)|ctx->op2)==0x1a) {
19084 ctx->d = 0x1e;
19085 ctx->n = 0x1f;
19086 }
19087 else if(((ctx->CRm<<3)|ctx->op2)==0x1b) {
19088 ctx->d = 0x1e;
19089 ctx->source_is_sp = TRUE;
19090 if(HaveBTIExt()) {
19091 SetBTypeCompatible(BTypeCompatible_PACIXSP());
19092 }
19093 }
19094 else if(((ctx->CRm<<3)|ctx->op2)==10) {
19095 ctx->d = 0x11;
19096 ctx->n = 0x10;
19097 }
19098 else if(((ctx->CRm<<3)|ctx->op2)==8) {
19099 SEE /* PACIA */;
19100 }
19101 else if(((ctx->CRm<<3)|ctx->op2)==12) {
19102 SEE /* AUTIA */;
19103 }
19104 else if(((ctx->CRm<<3)|ctx->op2)==14) {
19105 SEE /* AUTIB */;
19106 }
19107 else if((((ctx->CRm<<3)|ctx->op2)&0x7e)==0x18) {
19108 SEE /* PACIA */;
19109 }

Callers 2

decode_iclass_hintsFunction · 0.85
decode_iclass_dp_1srcFunction · 0.85

Calls 2

decode_fields32Function · 0.85
BTypeCompatible_PACIXSPFunction · 0.85

Tested by

no test coverage detected