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

Function FRINTI_float

arch/arm64/disassembler/decode2.c:10717–10765  ·  view source on GitHub ↗

frinti_float.xml */

Source from the content-addressed store, hash-verified

10715
10716/* frinti_float.xml */
10717int FRINTI_float(context *ctx, Instruction *instr)
10718{
10719 int rc = DECODE_STATUS_UNMATCHED;
10720 /* class iclass_float */
10721 /* M=0|0|S=0|11110|ftype=xx|1|opcode[5:3]=001|rmode=111|10000|Rn=xxxxx|Rd=xxxxx */
10722 if((INSWORD & 0xFF3FFC00)==0x1E27C000) {
10723 decode_fields32(ENC_FRINTI_H_FLOATDP1, ctx, instr);
10724 ctx->d = UINT(ctx->Rd);
10725 ctx->n = UINT(ctx->Rn);
10726 if(!ctx->ftype) {
10727 ctx->esize = 0x20;
10728 }
10729 else if(ctx->ftype==1) {
10730 ctx->esize = 0x40;
10731 }
10732 else if(ctx->ftype==2) {
10733 UNDEFINED;
10734 }
10735 else if(ctx->ftype==3) {
10736 if(HaveFP16Ext()) {
10737 ctx->esize = 0x10;
10738 }
10739 else {
10740 UNDEFINED;
10741 }
10742 }
10743 ctx->exact = FALSE;
10744 if(!(ctx->rmode&4)) {
10745 ctx->rounding = FPDecodeRounding(SLICE(ctx->rmode,1,0));
10746 }
10747 else if(ctx->rmode==4) {
10748 ctx->rounding = FPRounding_TIEAWAY;
10749 }
10750 else if(ctx->rmode==5) {
10751 UNDEFINED;
10752 }
10753 else if(ctx->rmode==6) {
10754 ctx->rounding = FPRoundingMode(ctx->FPCR);
10755 ctx->exact = TRUE;
10756 }
10757 else if(ctx->rmode==7) {
10758 ctx->rounding = FPRoundingMode(ctx->FPCR);
10759 }
10760 if(ctx->ftype==3) OK(ENC_FRINTI_H_FLOATDP1);
10761 if(ctx->ftype==0) OK(ENC_FRINTI_S_FLOATDP1);
10762 if(ctx->ftype==1) OK(ENC_FRINTI_D_FLOATDP1);
10763 }
10764 return rc;
10765}
10766
10767/* frintm_advsimd.xml */
10768int FRINTM_advsimd(context *ctx, Instruction *instr)

Callers 1

decode_iclass_floatdp1Function · 0.85

Calls 3

decode_fields32Function · 0.85
FPDecodeRoundingFunction · 0.85
FPRoundingModeFunction · 0.85

Tested by

no test coverage detected