ldpsw.xml */
| 14143 | |
| 14144 | /* ldpsw.xml */ |
| 14145 | int LDPSW(context *ctx, Instruction *instr) |
| 14146 | { |
| 14147 | int rc = DECODE_STATUS_UNMATCHED; |
| 14148 | /* class iclass_post_indexed */ |
| 14149 | /* opc=01|101|V=0|001|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ |
| 14150 | if((INSWORD & 0xFFC00000)==0x68C00000) { |
| 14151 | decode_fields32(ENC_LDPSW_64_LDSTPAIR_POST, ctx, instr); |
| 14152 | OK(ENC_LDPSW_64_LDSTPAIR_POST); |
| 14153 | } |
| 14154 | /* class iclass_pre_indexed */ |
| 14155 | /* opc=01|101|V=0|011|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ |
| 14156 | if((INSWORD & 0xFFC00000)==0x69C00000) { |
| 14157 | decode_fields32(ENC_LDPSW_64_LDSTPAIR_PRE, ctx, instr); |
| 14158 | OK(ENC_LDPSW_64_LDSTPAIR_PRE); |
| 14159 | } |
| 14160 | /* class iclass_signed_scaled_offset */ |
| 14161 | /* opc=01|101|V=0|010|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ |
| 14162 | if((INSWORD & 0xFFC00000)==0x69400000) { |
| 14163 | decode_fields32(ENC_LDPSW_64_LDSTPAIR_OFF, ctx, instr); |
| 14164 | OK(ENC_LDPSW_64_LDSTPAIR_OFF); |
| 14165 | } |
| 14166 | /* post-decode pcode */ |
| 14167 | ctx->n = UINT(ctx->Rn); |
| 14168 | ctx->t = UINT(ctx->Rt); |
| 14169 | ctx->t2 = UINT(ctx->Rt2); |
| 14170 | ctx->acctype = ctx->AccType_NORMAL; |
| 14171 | ctx->memop = (ctx->L==1) ? MemOp_LOAD : MemOp_STORE; |
| 14172 | if(((ctx->L<<1)|SLICE(ctx->opc,0,0))==1 || ctx->opc==3) { |
| 14173 | UNDEFINED; |
| 14174 | } |
| 14175 | ctx->signed_ = (SLICE(ctx->opc,0,0)!=0); |
| 14176 | ctx->scale = 2+UINT(SLICE(ctx->opc,1,1)); |
| 14177 | ctx->datasize = (8) << (ctx->scale); |
| 14178 | ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); |
| 14179 | ctx->tag_checked = ctx->wback || ctx->n!=0x1f; |
| 14180 | ctx->rt_unknown = FALSE; |
| 14181 | ctx->wb_unknown = FALSE; |
| 14182 | if(ctx->memop==MemOp_LOAD && ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { |
| 14183 | ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPLD); |
| 14184 | // assert |
| 14185 | // switch on constraint |
| 14186 | } |
| 14187 | if(ctx->memop==MemOp_STORE && ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { |
| 14188 | ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPST); |
| 14189 | // assert |
| 14190 | // switch on constraint |
| 14191 | } |
| 14192 | if(ctx->memop==MemOp_LOAD && ctx->t==ctx->t2) { |
| 14193 | ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); |
| 14194 | // assert |
| 14195 | // switch on constraint |
| 14196 | } |
| 14197 | return rc; |
| 14198 | } |
| 14199 | |
| 14200 | /* ldp_fpsimd.xml */ |
| 14201 | int LDP_fpsimd(context *ctx, Instruction *instr) |
no test coverage detected