MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / LDUMAXH

Function LDUMAXH

arch/arm64/disassembler/decode2.c:16427–16477  ·  view source on GitHub ↗

ldumaxh.xml */

Source from the content-addressed store, hash-verified

16425
16426/* ldumaxh.xml */
16427int LDUMAXH(context *ctx, Instruction *instr)
16428{
16429 int rc = DECODE_STATUS_UNMATCHED;
16430 /* class iclass_general */
16431 /* size=01|111|V=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=xxxxx */
16432 if((INSWORD & 0xFF20FC00)==0x78206000) {
16433 decode_fields32(ENC_LDUMAXAH_32_MEMOP, ctx, instr);
16434 if(!HaveAtomicExt()) {
16435 UNDEFINED;
16436 }
16437 ctx->t = UINT(ctx->Rt);
16438 ctx->n = UINT(ctx->Rn);
16439 ctx->s = UINT(ctx->Rs);
16440 ctx->datasize = (8) << (UINT(ctx->size));
16441 ctx->regsize = (ctx->datasize==0x40) ? 0x40 : 0x20;
16442 ctx->ldacctype = (ctx->A==1 && ctx->Rt!=0x1f) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW;
16443 ctx->stacctype = (ctx->R==1) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW;
16444 if(!ctx->opc) {
16445 ctx->op = MemAtomicOp_ADD;
16446 }
16447 else if(ctx->opc==1) {
16448 ctx->op = MemAtomicOp_BIC;
16449 }
16450 else if(ctx->opc==2) {
16451 ctx->op = MemAtomicOp_EOR;
16452 }
16453 else if(ctx->opc==3) {
16454 ctx->op = MemAtomicOp_ORR;
16455 }
16456 else if(ctx->opc==4) {
16457 ctx->op = MemAtomicOp_SMAX;
16458 }
16459 else if(ctx->opc==5) {
16460 ctx->op = MemAtomicOp_SMIN;
16461 }
16462 else if(ctx->opc==6) {
16463 ctx->op = MemAtomicOp_UMAX;
16464 }
16465 else if(ctx->opc==7) {
16466 ctx->op = MemAtomicOp_UMIN;
16467 }
16468 ctx->tag_checked = ctx->n!=0x1f;
16469 /* regular aliases */
16470 if(ctx->A==0 && ctx->Rt==0x1f) return STUMAXH_LDUMAXH(ctx, instr);
16471 if(ctx->A==1 && ctx->R==0) OK(ENC_LDUMAXAH_32_MEMOP);
16472 if(ctx->A==1 && ctx->R==1) OK(ENC_LDUMAXALH_32_MEMOP);
16473 if(ctx->A==0 && ctx->R==0) OK(ENC_LDUMAXH_32_MEMOP);
16474 if(ctx->A==0 && ctx->R==1) OK(ENC_LDUMAXLH_32_MEMOP);
16475 }
16476 return rc;
16477}
16478
16479/* ldumin.xml */
16480int LDUMIN(context *ctx, Instruction *instr)

Callers 1

decode_iclass_memopFunction · 0.85

Calls 2

decode_fields32Function · 0.85
STUMAXH_LDUMAXHFunction · 0.85

Tested by

no test coverage detected