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

Function LDAPURSH

arch/arm64/disassembler/decode2.c:13213–13273  ·  view source on GitHub ↗

ldapursh.xml */

Source from the content-addressed store, hash-verified

13211
13212/* ldapursh.xml */
13213int LDAPURSH(context *ctx, Instruction *instr)
13214{
13215 int rc = DECODE_STATUS_UNMATCHED;
13216 /* class iclass_base_plus_offset */
13217 /* size=01|011001|opc=1x|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */
13218 if((INSWORD & 0xFFA00C00)==0x59800000) {
13219 decode_fields32(ENC_LDAPURSH_32_LDAPSTL_UNSCALED, ctx, instr);
13220 ctx->wback = FALSE;
13221 ctx->postindex = FALSE;
13222 ctx->scale = UINT(ctx->size);
13223 ctx->offset = SignExtend(ctx->imm9,9);
13224 if(ctx->opc==3) OK(ENC_LDAPURSH_32_LDAPSTL_UNSCALED);
13225 if(ctx->opc==2) OK(ENC_LDAPURSH_64_LDAPSTL_UNSCALED);
13226 }
13227 /* post-decode pcode */
13228 ctx->n = UINT(ctx->Rn);
13229 ctx->t = UINT(ctx->Rt);
13230 ctx->acctype = AccType_ORDERED;
13231 if(SLICE(ctx->opc,1,1)==0) {
13232 if(SLICE(ctx->opc,0,0)==1) {
13233 ctx->memop = MemOp_LOAD;
13234 };
13235 if(ctx->size==3) {
13236 ctx->regsize = 0x40;
13237 };
13238 ctx->signed_ = FALSE;
13239 }
13240 else {
13241 if(ctx->size==3) {
13242 ctx->memop = MemOp_PREFETCH;
13243 if(SLICE(ctx->opc,0,0)==1) {
13244 UNDEFINED;
13245 }
13246 }
13247 else {
13248 ctx->memop = MemOp_LOAD;
13249 if(ctx->size==2 && SLICE(ctx->opc,0,0)==1) {
13250 UNDEFINED;
13251 }
13252 if(SLICE(ctx->opc,0,0)==1) {
13253 ctx->regsize = 0x20;
13254 };
13255 ctx->signed_ = TRUE;
13256 }
13257 }
13258 ctx->datasize = (8) << (ctx->scale);
13259 ctx->tag_checked = ctx->memop!=MemOp_PREFETCH && (ctx->wback || ctx->n!=0x1f);
13260 ctx->wb_unknown = FALSE;
13261 ctx->rt_unknown = FALSE;
13262 if(ctx->memop==MemOp_LOAD && ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) {
13263 // assignment from ConstrainUnpredictable()
13264 // assert
13265 // switch on constraint
13266 }
13267 if(ctx->memop==MemOp_STORE && ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) {
13268 // assignment from ConstrainUnpredictable()
13269 // assert
13270 // switch on constraint

Callers 1

Calls 2

decode_fields32Function · 0.85
SignExtendFunction · 0.85

Tested by

no test coverage detected