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

Function LDRA

arch/arm64/disassembler/decode2.c:14310–14334  ·  view source on GitHub ↗

ldra.xml */

Source from the content-addressed store, hash-verified

14308
14309/* ldra.xml */
14310int LDRA(context *ctx, Instruction *instr)
14311{
14312 int rc = DECODE_STATUS_UNMATCHED;
14313 /* class iclass_base_plus_offset */
14314 /* size=11|111|V=0|00|M=x|S=x|1|imm9=xxxxxxxxx|W=x|1|Rn=xxxxx|Rt=xxxxx */
14315 if((INSWORD & 0xFF200400)==0xF8200400) {
14316 decode_fields32(ENC_LDRAA_64_LDST_PAC, ctx, instr);
14317 if(!HavePACExt() || ctx->size!=3) {
14318 UNDEFINED;
14319 }
14320 ctx->t = UINT(ctx->Rt);
14321 ctx->n = UINT(ctx->Rn);
14322 ctx->wback = (ctx->W==1);
14323 ctx->use_key_a = (ctx->M==0);
14324 ctx->S10 = ((ctx->S<<9)|ctx->imm9);
14325 ctx->scale = 3;
14326 ctx->offset = LSL(SignExtend(ctx->S10,10),ctx->scale);
14327 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
14328 if(ctx->M==0 && ctx->W==0) OK(ENC_LDRAA_64_LDST_PAC);
14329 if(ctx->M==0 && ctx->W==1) OK(ENC_LDRAA_64W_LDST_PAC);
14330 if(ctx->M==1 && ctx->W==0) OK(ENC_LDRAB_64_LDST_PAC);
14331 if(ctx->M==1 && ctx->W==1) OK(ENC_LDRAB_64W_LDST_PAC);
14332 }
14333 return rc;
14334}
14335
14336/* ldrb_imm.xml */
14337int LDRB_imm(context *ctx, Instruction *instr)

Callers 1

decode_iclass_ldst_pacFunction · 0.85

Calls 2

decode_fields32Function · 0.85
SignExtendFunction · 0.85

Tested by

no test coverage detected