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

Function BIC_log_shift

arch/arm64/disassembler/decode2.c:1336–1377  ·  view source on GitHub ↗

bic_log_shift.xml */

Source from the content-addressed store, hash-verified

1334
1335/* bic_log_shift.xml */
1336int BIC_log_shift(context *ctx, Instruction *instr)
1337{
1338 int rc = DECODE_STATUS_UNMATCHED;
1339 /* class iclass_no_s */
1340 /* sf=x|opc=00|01010|shift=xx|N=1|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */
1341 if((INSWORD & 0x7F200000)==0xA200000) {
1342 decode_fields32(ENC_BIC_32_LOG_SHIFT, ctx, instr);
1343 ctx->d = UINT(ctx->Rd);
1344 ctx->n = UINT(ctx->Rn);
1345 ctx->m = UINT(ctx->Rm);
1346 ctx->datasize = (ctx->sf==1) ? 0x40 : 0x20;
1347 if(!ctx->opc) {
1348 ctx->op = LogicalOp_AND;
1349 ctx->setflags = FALSE;
1350 instr->setflags = FLAGEFFECT_NONE;
1351 }
1352 else if(ctx->opc==1) {
1353 ctx->op = LogicalOp_ORR;
1354 ctx->setflags = FALSE;
1355 instr->setflags = FLAGEFFECT_NONE;
1356 }
1357 else if(ctx->opc==2) {
1358 ctx->op = LogicalOp_EOR;
1359 ctx->setflags = FALSE;
1360 instr->setflags = FLAGEFFECT_NONE;
1361 }
1362 else if(ctx->opc==3) {
1363 ctx->op = LogicalOp_AND;
1364 ctx->setflags = TRUE;
1365 instr->setflags = FLAGEFFECT_SETS;
1366 }
1367 if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) {
1368 UNDEFINED;
1369 }
1370 ctx->shift_type = DecodeShift(ctx->shift);
1371 ctx->shift_amount = UINT(ctx->imm6);
1372 ctx->invert = (ctx->N==1);
1373 if(ctx->sf==0) OK(ENC_BIC_32_LOG_SHIFT);
1374 if(ctx->sf==1) OK(ENC_BIC_64_LOG_SHIFT);
1375 }
1376 return rc;
1377}
1378
1379/* bif_advsimd.xml */
1380int BIF_advsimd(context *ctx, Instruction *instr)

Callers 1

decode_iclass_log_shiftFunction · 0.85

Calls 2

decode_fields32Function · 0.85
DecodeShiftFunction · 0.85

Tested by

no test coverage detected