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

Function LDSMINB

arch/arm64/disassembler/decode2.c:15806–15856  ·  view source on GitHub ↗

ldsminb.xml */

Source from the content-addressed store, hash-verified

15804
15805/* ldsminb.xml */
15806int LDSMINB(context *ctx, Instruction *instr)
15807{
15808 int rc = DECODE_STATUS_UNMATCHED;
15809 /* class iclass_general */
15810 /* size=00|111|V=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=xxxxx */
15811 if((INSWORD & 0xFF20FC00)==0x38205000) {
15812 decode_fields32(ENC_LDSMINAB_32_MEMOP, ctx, instr);
15813 if(!HaveAtomicExt()) {
15814 UNDEFINED;
15815 }
15816 ctx->t = UINT(ctx->Rt);
15817 ctx->n = UINT(ctx->Rn);
15818 ctx->s = UINT(ctx->Rs);
15819 ctx->datasize = (8) << (UINT(ctx->size));
15820 ctx->regsize = (ctx->datasize==0x40) ? 0x40 : 0x20;
15821 ctx->ldacctype = (ctx->A==1 && ctx->Rt!=0x1f) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW;
15822 ctx->stacctype = (ctx->R==1) ? AccType_ORDEREDATOMICRW : AccType_ATOMICRW;
15823 if(!ctx->opc) {
15824 ctx->op = MemAtomicOp_ADD;
15825 }
15826 else if(ctx->opc==1) {
15827 ctx->op = MemAtomicOp_BIC;
15828 }
15829 else if(ctx->opc==2) {
15830 ctx->op = MemAtomicOp_EOR;
15831 }
15832 else if(ctx->opc==3) {
15833 ctx->op = MemAtomicOp_ORR;
15834 }
15835 else if(ctx->opc==4) {
15836 ctx->op = MemAtomicOp_SMAX;
15837 }
15838 else if(ctx->opc==5) {
15839 ctx->op = MemAtomicOp_SMIN;
15840 }
15841 else if(ctx->opc==6) {
15842 ctx->op = MemAtomicOp_UMAX;
15843 }
15844 else if(ctx->opc==7) {
15845 ctx->op = MemAtomicOp_UMIN;
15846 }
15847 ctx->tag_checked = ctx->n!=0x1f;
15848 /* regular aliases */
15849 if(ctx->A==0 && ctx->Rt==0x1f) return STSMINB_LDSMINB(ctx, instr);
15850 if(ctx->A==1 && ctx->R==0) OK(ENC_LDSMINAB_32_MEMOP);
15851 if(ctx->A==1 && ctx->R==1) OK(ENC_LDSMINALB_32_MEMOP);
15852 if(ctx->A==0 && ctx->R==0) OK(ENC_LDSMINB_32_MEMOP);
15853 if(ctx->A==0 && ctx->R==1) OK(ENC_LDSMINLB_32_MEMOP);
15854 }
15855 return rc;
15856}
15857
15858/* ldsminh.xml */
15859int LDSMINH(context *ctx, Instruction *instr)

Callers 1

decode_iclass_memopFunction · 0.85

Calls 2

decode_fields32Function · 0.85
STSMINB_LDSMINBFunction · 0.85

Tested by

no test coverage detected