ldsmax.xml */
| 15584 | |
| 15585 | /* ldsmax.xml */ |
| 15586 | int LDSMAX(context *ctx, Instruction *instr) |
| 15587 | { |
| 15588 | int rc = DECODE_STATUS_UNMATCHED; |
| 15589 | /* class iclass_general */ |
| 15590 | /* size=1x|111|V=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=xxxxx */ |
| 15591 | if((INSWORD & 0xBF20FC00)==0xB8204000) { |
| 15592 | decode_fields32(ENC_LDSMAX_32_MEMOP, ctx, instr); |
| 15593 | if(!HaveAtomicExt()) { |
| 15594 | UNDEFINED; |
| 15595 | } |
| 15596 | ctx->t = UINT(ctx->Rt); |
| 15597 | ctx->n = UINT(ctx->Rn); |
| 15598 | ctx->s = UINT(ctx->Rs); |
| 15599 | ctx->datasize = (8) << (UINT(ctx->size)); |
| 15600 | ctx->regsize = (ctx->datasize==0x40) ? 0x40 : 0x20; |
| 15601 | ctx->ldacctype = (ctx->A==1 && ctx->Rt!=0x1f) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 15602 | ctx->stacctype = (ctx->R==1) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 15603 | if(!ctx->opc) { |
| 15604 | ctx->op = MemAtomicOp_ADD; |
| 15605 | } |
| 15606 | else if(ctx->opc==1) { |
| 15607 | ctx->op = MemAtomicOp_BIC; |
| 15608 | } |
| 15609 | else if(ctx->opc==2) { |
| 15610 | ctx->op = MemAtomicOp_EOR; |
| 15611 | } |
| 15612 | else if(ctx->opc==3) { |
| 15613 | ctx->op = MemAtomicOp_ORR; |
| 15614 | } |
| 15615 | else if(ctx->opc==4) { |
| 15616 | ctx->op = MemAtomicOp_SMAX; |
| 15617 | } |
| 15618 | else if(ctx->opc==5) { |
| 15619 | ctx->op = MemAtomicOp_SMIN; |
| 15620 | } |
| 15621 | else if(ctx->opc==6) { |
| 15622 | ctx->op = MemAtomicOp_UMAX; |
| 15623 | } |
| 15624 | else if(ctx->opc==7) { |
| 15625 | ctx->op = MemAtomicOp_UMIN; |
| 15626 | } |
| 15627 | ctx->tag_checked = ctx->n!=0x1f; |
| 15628 | /* regular aliases */ |
| 15629 | if(ctx->A==0 && ctx->Rt==0x1f) return STSMAX_LDSMAX(ctx, instr); |
| 15630 | if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDSMAX_32_MEMOP); |
| 15631 | if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDSMAXA_32_MEMOP); |
| 15632 | if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDSMAXAL_32_MEMOP); |
| 15633 | if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDSMAXL_32_MEMOP); |
| 15634 | if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDSMAX_64_MEMOP); |
| 15635 | if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDSMAXA_64_MEMOP); |
| 15636 | if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDSMAXAL_64_MEMOP); |
| 15637 | if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDSMAXL_64_MEMOP); |
| 15638 | } |
| 15639 | return rc; |
| 15640 | } |
| 15641 | |
| 15642 | /* ldsmaxb.xml */ |
| 15643 | int LDSMAXB(context *ctx, Instruction *instr) |
no test coverage detected