swp.xml */
| 27358 | |
| 27359 | /* swp.xml */ |
| 27360 | int SWP(context *ctx, Instruction *instr) |
| 27361 | { |
| 27362 | int rc = DECODE_STATUS_UNMATCHED; |
| 27363 | /* class iclass_general */ |
| 27364 | /* size=1x|111|V=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=000|00|Rn=xxxxx|Rt=xxxxx */ |
| 27365 | if((INSWORD & 0xBF20FC00)==0xB8208000) { |
| 27366 | decode_fields32(ENC_SWP_32_MEMOP, ctx, instr); |
| 27367 | if(!HaveAtomicExt()) { |
| 27368 | UNDEFINED; |
| 27369 | } |
| 27370 | ctx->t = UINT(ctx->Rt); |
| 27371 | ctx->n = UINT(ctx->Rn); |
| 27372 | ctx->s = UINT(ctx->Rs); |
| 27373 | ctx->datasize = (8) << (UINT(ctx->size)); |
| 27374 | ctx->regsize = (ctx->datasize==0x40) ? 0x40 : 0x20; |
| 27375 | ctx->ldacctype = (ctx->A==1 && ctx->Rt!=0x1f) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 27376 | ctx->stacctype = (ctx->R==1) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW; |
| 27377 | ctx->tag_checked = ctx->n!=0x1f; |
| 27378 | if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_SWP_32_MEMOP); |
| 27379 | if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_SWPA_32_MEMOP); |
| 27380 | if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_SWPAL_32_MEMOP); |
| 27381 | if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_SWPL_32_MEMOP); |
| 27382 | if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_SWP_64_MEMOP); |
| 27383 | if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_SWPA_64_MEMOP); |
| 27384 | if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_SWPAL_64_MEMOP); |
| 27385 | if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_SWPL_64_MEMOP); |
| 27386 | } |
| 27387 | return rc; |
| 27388 | } |
| 27389 | |
| 27390 | /* swpb.xml */ |
| 27391 | int SWPB(context *ctx, Instruction *instr) |
no test coverage detected