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

Function LDP_fpsimd

arch/arm64/disassembler/decode2.c:14201–14248  ·  view source on GitHub ↗

ldp_fpsimd.xml */

Source from the content-addressed store, hash-verified

14199
14200/* ldp_fpsimd.xml */
14201int LDP_fpsimd(context *ctx, Instruction *instr)
14202{
14203 int rc = DECODE_STATUS_UNMATCHED;
14204 /* class iclass_post_indexed */
14205 /* opc=xx|101|V=1|001|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */
14206 if((INSWORD & 0x3FC00000)==0x2CC00000) {
14207 decode_fields32(ENC_LDP_S_LDSTPAIR_POST, ctx, instr);
14208 if(ctx->opc==0) OK(ENC_LDP_S_LDSTPAIR_POST);
14209 if(ctx->opc==1) OK(ENC_LDP_D_LDSTPAIR_POST);
14210 if(ctx->opc==2) OK(ENC_LDP_Q_LDSTPAIR_POST);
14211 }
14212 /* class iclass_pre_indexed */
14213 /* opc=xx|101|V=1|011|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */
14214 if((INSWORD & 0x3FC00000)==0x2DC00000) {
14215 decode_fields32(ENC_LDP_S_LDSTPAIR_PRE, ctx, instr);
14216 if(ctx->opc==0) OK(ENC_LDP_S_LDSTPAIR_PRE);
14217 if(ctx->opc==1) OK(ENC_LDP_D_LDSTPAIR_PRE);
14218 if(ctx->opc==2) OK(ENC_LDP_Q_LDSTPAIR_PRE);
14219 }
14220 /* class iclass_signed_scaled_offset */
14221 /* opc=xx|101|V=1|010|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */
14222 if((INSWORD & 0x3FC00000)==0x2D400000) {
14223 decode_fields32(ENC_LDP_S_LDSTPAIR_OFF, ctx, instr);
14224 if(ctx->opc==0) OK(ENC_LDP_S_LDSTPAIR_OFF);
14225 if(ctx->opc==1) OK(ENC_LDP_D_LDSTPAIR_OFF);
14226 if(ctx->opc==2) OK(ENC_LDP_Q_LDSTPAIR_OFF);
14227 }
14228 /* post-decode pcode */
14229 ctx->n = UINT(ctx->Rn);
14230 ctx->t = UINT(ctx->Rt);
14231 ctx->t2 = UINT(ctx->Rt2);
14232 ctx->acctype = ctx->AccType_VEC;
14233 ctx->memop = (ctx->L==1) ? MemOp_LOAD : MemOp_STORE;
14234 if(ctx->opc==3) {
14235 UNDEFINED;
14236 }
14237 ctx->scale = 2+UINT(ctx->opc);
14238 ctx->datasize = (8) << (ctx->scale);
14239 ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale);
14240 ctx->tag_checked = ctx->wback || ctx->n!=0x1f;
14241 ctx->rt_unknown = FALSE;
14242 if(ctx->memop==MemOp_LOAD && ctx->t==ctx->t2) {
14243 ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP);
14244 // assert
14245 // switch on constraint
14246 }
14247 return rc;
14248}
14249
14250/* ldp_gen.xml */
14251int LDP_gen(context *ctx, Instruction *instr)

Callers 3

Calls 3

decode_fields32Function · 0.85
SignExtendFunction · 0.85
ConstrainUnpredictableFunction · 0.85

Tested by

no test coverage detected