ldset.xml */
| 15421 | |
| 15422 | /* ldset.xml */ |
| 15423 | int LDSET(context *ctx, Instruction *instr) |
| 15424 | { |
| 15425 | int rc = DECODE_STATUS_UNMATCHED; |
| 15426 | /* class iclass_general */ |
| 15427 | /* size=1x|111|V=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=011|00|Rn=xxxxx|Rt=xxxxx */ |
| 15428 | if((INSWORD & 0xBF20FC00)==0xB8203000) { |
| 15429 | decode_fields32(ENC_LDSET_32_MEMOP, ctx, instr); |
| 15430 | if(!HaveAtomicExt()) { |
| 15431 | UNDEFINED; |
| 15432 | } |
| 15433 | ctx->t = UINT(ctx->Rt); |
| 15434 | ctx->n = UINT(ctx->Rn); |
| 15435 | ctx->s = UINT(ctx->Rs); |
| 15436 | ctx->datasize = (8) << (UINT(ctx->size)); |
| 15437 | ctx->regsize = (ctx->datasize==0x40) ? 0x40 : 0x20; |
| 15438 | ctx->ldacctype = (ctx->A==1 && ctx->Rt!=0x1f) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 15439 | ctx->stacctype = (ctx->R==1) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 15440 | if(!ctx->opc) { |
| 15441 | ctx->op = MemAtomicOp_ADD; |
| 15442 | } |
| 15443 | else if(ctx->opc==1) { |
| 15444 | ctx->op = MemAtomicOp_BIC; |
| 15445 | } |
| 15446 | else if(ctx->opc==2) { |
| 15447 | ctx->op = MemAtomicOp_EOR; |
| 15448 | } |
| 15449 | else if(ctx->opc==3) { |
| 15450 | ctx->op = MemAtomicOp_ORR; |
| 15451 | } |
| 15452 | else if(ctx->opc==4) { |
| 15453 | ctx->op = MemAtomicOp_SMAX; |
| 15454 | } |
| 15455 | else if(ctx->opc==5) { |
| 15456 | ctx->op = MemAtomicOp_SMIN; |
| 15457 | } |
| 15458 | else if(ctx->opc==6) { |
| 15459 | ctx->op = MemAtomicOp_UMAX; |
| 15460 | } |
| 15461 | else if(ctx->opc==7) { |
| 15462 | ctx->op = MemAtomicOp_UMIN; |
| 15463 | } |
| 15464 | ctx->tag_checked = ctx->n!=0x1f; |
| 15465 | /* regular aliases */ |
| 15466 | if(ctx->A==0 && ctx->Rt==0x1f) return STSET_LDSET(ctx, instr); |
| 15467 | if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDSET_32_MEMOP); |
| 15468 | if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDSETA_32_MEMOP); |
| 15469 | if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDSETAL_32_MEMOP); |
| 15470 | if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDSETL_32_MEMOP); |
| 15471 | if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDSET_64_MEMOP); |
| 15472 | if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDSETA_64_MEMOP); |
| 15473 | if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDSETAL_64_MEMOP); |
| 15474 | if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDSETL_64_MEMOP); |
| 15475 | } |
| 15476 | return rc; |
| 15477 | } |
| 15478 | |
| 15479 | /* ldsetb.xml */ |
| 15480 | int LDSETB(context *ctx, Instruction *instr) |
no test coverage detected