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

Function LDAPURB

arch/arm64/disassembler/decode2.c:13026–13085  ·  view source on GitHub ↗

ldapurb.xml */

Source from the content-addressed store, hash-verified

13024
13025/* ldapurb.xml */
13026int LDAPURB(context *ctx, Instruction *instr)
13027{
13028 int rc = DECODE_STATUS_UNMATCHED;
13029 /* class iclass_base_plus_offset */
13030 /* size=00|011001|opc=01|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */
13031 if((INSWORD & 0xFFE00C00)==0x19400000) {
13032 decode_fields32(ENC_LDAPURB_32_LDAPSTL_UNSCALED, ctx, instr);
13033 ctx->wback = FALSE;
13034 ctx->postindex = FALSE;
13035 ctx->scale = UINT(ctx->size);
13036 ctx->offset = SignExtend(ctx->imm9,9);
13037 OK(ENC_LDAPURB_32_LDAPSTL_UNSCALED);
13038 }
13039 /* post-decode pcode */
13040 ctx->n = UINT(ctx->Rn);
13041 ctx->t = UINT(ctx->Rt);
13042 ctx->acctype = AccType_ORDERED;
13043 if(SLICE(ctx->opc,1,1)==0) {
13044 if(SLICE(ctx->opc,0,0)==1) {
13045 ctx->memop = MemOp_LOAD;
13046 };
13047 if(ctx->size==3) {
13048 ctx->regsize = 0x40;
13049 };
13050 ctx->signed_ = FALSE;
13051 }
13052 else {
13053 if(ctx->size==3) {
13054 ctx->memop = MemOp_PREFETCH;
13055 if(SLICE(ctx->opc,0,0)==1) {
13056 UNDEFINED;
13057 }
13058 }
13059 else {
13060 ctx->memop = MemOp_LOAD;
13061 if(ctx->size==2 && SLICE(ctx->opc,0,0)==1) {
13062 UNDEFINED;
13063 }
13064 if(SLICE(ctx->opc,0,0)==1) {
13065 ctx->regsize = 0x20;
13066 };
13067 ctx->signed_ = TRUE;
13068 }
13069 }
13070 ctx->datasize = (8) << (ctx->scale);
13071 ctx->tag_checked = ctx->memop!=MemOp_PREFETCH && (ctx->wback || ctx->n!=0x1f);
13072 ctx->wb_unknown = FALSE;
13073 ctx->rt_unknown = FALSE;
13074 if(ctx->memop==MemOp_LOAD && ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) {
13075 // assignment from ConstrainUnpredictable()
13076 // assert
13077 // switch on constraint
13078 }
13079 if(ctx->memop==MemOp_STORE && ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) {
13080 // assignment from ConstrainUnpredictable()
13081 // assert
13082 // switch on constraint
13083 }

Callers 1

Calls 2

decode_fields32Function · 0.85
SignExtendFunction · 0.85

Tested by

no test coverage detected