ldclrh.xml */
| 13753 | |
| 13754 | /* ldclrh.xml */ |
| 13755 | int LDCLRH(context *ctx, Instruction *instr) |
| 13756 | { |
| 13757 | int rc = DECODE_STATUS_UNMATCHED; |
| 13758 | /* class iclass_general */ |
| 13759 | /* size=01|111|V=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=xxxxx */ |
| 13760 | if((INSWORD & 0xFF20FC00)==0x78201000) { |
| 13761 | decode_fields32(ENC_LDCLRAH_32_MEMOP, ctx, instr); |
| 13762 | if(!HaveAtomicExt()) { |
| 13763 | UNDEFINED; |
| 13764 | } |
| 13765 | ctx->t = UINT(ctx->Rt); |
| 13766 | ctx->n = UINT(ctx->Rn); |
| 13767 | ctx->s = UINT(ctx->Rs); |
| 13768 | ctx->datasize = (8) << (UINT(ctx->size)); |
| 13769 | ctx->regsize = (ctx->datasize==0x40) ? 0x40 : 0x20; |
| 13770 | ctx->ldacctype = (ctx->A==1 && ctx->Rt!=0x1f) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 13771 | ctx->stacctype = (ctx->R==1) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 13772 | if(!ctx->opc) { |
| 13773 | ctx->op = MemAtomicOp_ADD; |
| 13774 | } |
| 13775 | else if(ctx->opc==1) { |
| 13776 | ctx->op = MemAtomicOp_BIC; |
| 13777 | } |
| 13778 | else if(ctx->opc==2) { |
| 13779 | ctx->op = MemAtomicOp_EOR; |
| 13780 | } |
| 13781 | else if(ctx->opc==3) { |
| 13782 | ctx->op = MemAtomicOp_ORR; |
| 13783 | } |
| 13784 | else if(ctx->opc==4) { |
| 13785 | ctx->op = MemAtomicOp_SMAX; |
| 13786 | } |
| 13787 | else if(ctx->opc==5) { |
| 13788 | ctx->op = MemAtomicOp_SMIN; |
| 13789 | } |
| 13790 | else if(ctx->opc==6) { |
| 13791 | ctx->op = MemAtomicOp_UMAX; |
| 13792 | } |
| 13793 | else if(ctx->opc==7) { |
| 13794 | ctx->op = MemAtomicOp_UMIN; |
| 13795 | } |
| 13796 | ctx->tag_checked = ctx->n!=0x1f; |
| 13797 | /* regular aliases */ |
| 13798 | if(ctx->A==0 && ctx->Rt==0x1f) return STCLRH_LDCLRH(ctx, instr); |
| 13799 | if(ctx->A==1 && ctx->R==0) OK(ENC_LDCLRAH_32_MEMOP); |
| 13800 | if(ctx->A==1 && ctx->R==1) OK(ENC_LDCLRALH_32_MEMOP); |
| 13801 | if(ctx->A==0 && ctx->R==0) OK(ENC_LDCLRH_32_MEMOP); |
| 13802 | if(ctx->A==0 && ctx->R==1) OK(ENC_LDCLRLH_32_MEMOP); |
| 13803 | } |
| 13804 | return rc; |
| 13805 | } |
| 13806 | |
| 13807 | /* ldeor.xml */ |
| 13808 | int LDEOR(context *ctx, Instruction *instr) |
no test coverage detected