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

Function FCVTZU_float_int

arch/arm64/disassembler/decode2.c:7704–7787  ·  view source on GitHub ↗

fcvtzu_float_int.xml */

Source from the content-addressed store, hash-verified

7702
7703/* fcvtzu_float_int.xml */
7704int FCVTZU_float_int(context *ctx, Instruction *instr)
7705{
7706 int rc = DECODE_STATUS_UNMATCHED;
7707 /* class iclass_float */
7708 /* sf=x|0|S=0|11110|ftype=xx|1|rmode=11|opcode=001|000000|Rn=xxxxx|Rd=xxxxx */
7709 if((INSWORD & 0x7F3FFC00)==0x1E390000) {
7710 decode_fields32(ENC_FCVTZU_32H_FLOAT2INT, ctx, instr);
7711 ctx->d = UINT(ctx->Rd);
7712 ctx->n = UINT(ctx->Rn);
7713 ctx->intsize = (ctx->sf==1) ? 0x40 : 0x20;
7714 if(!ctx->ftype) {
7715 ctx->fltsize = 0x20;
7716 }
7717 else if(ctx->ftype==1) {
7718 ctx->fltsize = 0x40;
7719 }
7720 else if(ctx->ftype==2) {
7721 if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)!=13) {
7722 UNDEFINED;
7723 }
7724 ctx->fltsize = 0x80;
7725 }
7726 else if(ctx->ftype==3) {
7727 if(HaveFP16Ext()) {
7728 ctx->fltsize = 0x10;
7729 }
7730 else {
7731 UNDEFINED;
7732 }
7733 }
7734 if(!(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)&12)) {
7735 ctx->rounding = FPDecodeRounding(ctx->rmode);
7736 ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1);
7737 ctx->op = FPConvOp_CVT_FtoI;
7738 }
7739 else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==4) {
7740 ctx->rounding = FPRoundingMode(ctx->FPCR);
7741 ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1);
7742 ctx->op = FPConvOp_CVT_ItoF;
7743 }
7744 else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==8) {
7745 ctx->rounding = FPRounding_TIEAWAY;
7746 ctx->unsigned_ = (SLICE(ctx->opcode,0,0)==1);
7747 ctx->op = FPConvOp_CVT_FtoI;
7748 }
7749 else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==12) {
7750 if(ctx->fltsize!=0x10 && ctx->fltsize!=ctx->intsize) {
7751 UNDEFINED;
7752 }
7753 if(SLICE(ctx->opcode,0,0)==1) {
7754 ctx->op = FPConvOp_MOV_ItoF;
7755 };
7756 ctx->part = 0;
7757 }
7758 else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==13) {
7759 if(ctx->intsize!=0x40 || ctx->fltsize!=0x80) {
7760 UNDEFINED;
7761 }

Callers 1

decode_iclass_float2intFunction · 0.85

Calls 3

decode_fields32Function · 0.85
FPDecodeRoundingFunction · 0.85
FPRoundingModeFunction · 0.85

Tested by

no test coverage detected