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

Function FMOV_float

arch/arm64/disassembler/decode2.c:9424–9467  ·  view source on GitHub ↗

fmov_float.xml */

Source from the content-addressed store, hash-verified

9422
9423/* fmov_float.xml */
9424int FMOV_float(context *ctx, Instruction *instr)
9425{
9426 int rc = DECODE_STATUS_UNMATCHED;
9427 /* class iclass_float */
9428 /* M=0|0|S=0|11110|ftype=xx|1|opcode[5:2]=0000|opc=00|10000|Rn=xxxxx|Rd=xxxxx */
9429 if((INSWORD & 0xFF3FFC00)==0x1E204000) {
9430 decode_fields32(ENC_FMOV_H_FLOATDP1, ctx, instr);
9431 ctx->d = UINT(ctx->Rd);
9432 ctx->n = UINT(ctx->Rn);
9433 if(!ctx->ftype) {
9434 ctx->esize = 0x20;
9435 }
9436 else if(ctx->ftype==1) {
9437 ctx->esize = 0x40;
9438 }
9439 else if(ctx->ftype==2) {
9440 UNDEFINED;
9441 }
9442 else if(ctx->ftype==3) {
9443 if(HaveFP16Ext()) {
9444 ctx->esize = 0x10;
9445 }
9446 else {
9447 UNDEFINED;
9448 }
9449 }
9450 if(!ctx->opc) {
9451 ctx->fpop = FPUnaryOp_MOV;
9452 }
9453 else if(ctx->opc==1) {
9454 ctx->fpop = FPUnaryOp_ABS;
9455 }
9456 else if(ctx->opc==2) {
9457 ctx->fpop = FPUnaryOp_NEG;
9458 }
9459 else if(ctx->opc==3) {
9460 ctx->fpop = FPUnaryOp_SQRT;
9461 }
9462 if(ctx->ftype==3) OK(ENC_FMOV_H_FLOATDP1);
9463 if(ctx->ftype==0) OK(ENC_FMOV_S_FLOATDP1);
9464 if(ctx->ftype==1) OK(ENC_FMOV_D_FLOATDP1);
9465 }
9466 return rc;
9467}
9468
9469/* fmov_float_gen.xml */
9470int FMOV_float_gen(context *ctx, Instruction *instr)

Callers 1

decode_iclass_floatdp1Function · 0.85

Calls 1

decode_fields32Function · 0.85

Tested by

no test coverage detected