ldclrb.xml */
| 13700 | |
| 13701 | /* ldclrb.xml */ |
| 13702 | int LDCLRB(context *ctx, Instruction *instr) |
| 13703 | { |
| 13704 | int rc = DECODE_STATUS_UNMATCHED; |
| 13705 | /* class iclass_general */ |
| 13706 | /* size=00|111|V=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=xxxxx */ |
| 13707 | if((INSWORD & 0xFF20FC00)==0x38201000) { |
| 13708 | decode_fields32(ENC_LDCLRAB_32_MEMOP, ctx, instr); |
| 13709 | if(!HaveAtomicExt()) { |
| 13710 | UNDEFINED; |
| 13711 | } |
| 13712 | ctx->t = UINT(ctx->Rt); |
| 13713 | ctx->n = UINT(ctx->Rn); |
| 13714 | ctx->s = UINT(ctx->Rs); |
| 13715 | ctx->datasize = (8) << (UINT(ctx->size)); |
| 13716 | ctx->regsize = (ctx->datasize==0x40) ? 0x40 : 0x20; |
| 13717 | ctx->ldacctype = (ctx->A==1 && ctx->Rt!=0x1f) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 13718 | ctx->stacctype = (ctx->R==1) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 13719 | if(!ctx->opc) { |
| 13720 | ctx->op = MemAtomicOp_ADD; |
| 13721 | } |
| 13722 | else if(ctx->opc==1) { |
| 13723 | ctx->op = MemAtomicOp_BIC; |
| 13724 | } |
| 13725 | else if(ctx->opc==2) { |
| 13726 | ctx->op = MemAtomicOp_EOR; |
| 13727 | } |
| 13728 | else if(ctx->opc==3) { |
| 13729 | ctx->op = MemAtomicOp_ORR; |
| 13730 | } |
| 13731 | else if(ctx->opc==4) { |
| 13732 | ctx->op = MemAtomicOp_SMAX; |
| 13733 | } |
| 13734 | else if(ctx->opc==5) { |
| 13735 | ctx->op = MemAtomicOp_SMIN; |
| 13736 | } |
| 13737 | else if(ctx->opc==6) { |
| 13738 | ctx->op = MemAtomicOp_UMAX; |
| 13739 | } |
| 13740 | else if(ctx->opc==7) { |
| 13741 | ctx->op = MemAtomicOp_UMIN; |
| 13742 | } |
| 13743 | ctx->tag_checked = ctx->n!=0x1f; |
| 13744 | /* regular aliases */ |
| 13745 | if(ctx->A==0 && ctx->Rt==0x1f) return STCLRB_LDCLRB(ctx, instr); |
| 13746 | if(ctx->A==1 && ctx->R==0) OK(ENC_LDCLRAB_32_MEMOP); |
| 13747 | if(ctx->A==1 && ctx->R==1) OK(ENC_LDCLRALB_32_MEMOP); |
| 13748 | if(ctx->A==0 && ctx->R==0) OK(ENC_LDCLRB_32_MEMOP); |
| 13749 | if(ctx->A==0 && ctx->R==1) OK(ENC_LDCLRLB_32_MEMOP); |
| 13750 | } |
| 13751 | return rc; |
| 13752 | } |
| 13753 | |
| 13754 | /* ldclrh.xml */ |
| 13755 | int LDCLRH(context *ctx, Instruction *instr) |
no test coverage detected