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

Function LDAPURSB

arch/arm64/disassembler/decode2.c:13150–13210  ·  view source on GitHub ↗

ldapursb.xml */

Source from the content-addressed store, hash-verified

13148
13149/* ldapursb.xml */
13150int LDAPURSB(context *ctx, Instruction *instr)
13151{
13152 int rc = DECODE_STATUS_UNMATCHED;
13153 /* class iclass_base_plus_offset */
13154 /* size=00|011001|opc=1x|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */
13155 if((INSWORD & 0xFFA00C00)==0x19800000) {
13156 decode_fields32(ENC_LDAPURSB_32_LDAPSTL_UNSCALED, ctx, instr);
13157 ctx->wback = FALSE;
13158 ctx->postindex = FALSE;
13159 ctx->scale = UINT(ctx->size);
13160 ctx->offset = SignExtend(ctx->imm9,9);
13161 if(ctx->opc==3) OK(ENC_LDAPURSB_32_LDAPSTL_UNSCALED);
13162 if(ctx->opc==2) OK(ENC_LDAPURSB_64_LDAPSTL_UNSCALED);
13163 }
13164 /* post-decode pcode */
13165 ctx->n = UINT(ctx->Rn);
13166 ctx->t = UINT(ctx->Rt);
13167 ctx->acctype = AccType_ORDERED;
13168 if(SLICE(ctx->opc,1,1)==0) {
13169 if(SLICE(ctx->opc,0,0)==1) {
13170 ctx->memop = MemOp_LOAD;
13171 };
13172 if(ctx->size==3) {
13173 ctx->regsize = 0x40;
13174 };
13175 ctx->signed_ = FALSE;
13176 }
13177 else {
13178 if(ctx->size==3) {
13179 ctx->memop = MemOp_PREFETCH;
13180 if(SLICE(ctx->opc,0,0)==1) {
13181 UNDEFINED;
13182 }
13183 }
13184 else {
13185 ctx->memop = MemOp_LOAD;
13186 if(ctx->size==2 && SLICE(ctx->opc,0,0)==1) {
13187 UNDEFINED;
13188 }
13189 if(SLICE(ctx->opc,0,0)==1) {
13190 ctx->regsize = 0x20;
13191 };
13192 ctx->signed_ = TRUE;
13193 }
13194 }
13195 ctx->datasize = (8) << (ctx->scale);
13196 ctx->tag_checked = ctx->memop!=MemOp_PREFETCH && (ctx->wback || ctx->n!=0x1f);
13197 ctx->wb_unknown = FALSE;
13198 ctx->rt_unknown = FALSE;
13199 if(ctx->memop==MemOp_LOAD && ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) {
13200 // assignment from ConstrainUnpredictable()
13201 // assert
13202 // switch on constraint
13203 }
13204 if(ctx->memop==MemOp_STORE && ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) {
13205 // assignment from ConstrainUnpredictable()
13206 // assert
13207 // switch on constraint

Callers 1

Calls 2

decode_fields32Function · 0.85
SignExtendFunction · 0.85

Tested by

no test coverage detected