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

Function FRINTN_float

arch/arm64/disassembler/decode2.c:10957–11005  ·  view source on GitHub ↗

frintn_float.xml */

Source from the content-addressed store, hash-verified

10955
10956/* frintn_float.xml */
10957int FRINTN_float(context *ctx, Instruction *instr)
10958{
10959 int rc = DECODE_STATUS_UNMATCHED;
10960 /* class iclass_float */
10961 /* M=0|0|S=0|11110|ftype=xx|1|opcode[5:3]=001|rmode=000|10000|Rn=xxxxx|Rd=xxxxx */
10962 if((INSWORD & 0xFF3FFC00)==0x1E244000) {
10963 decode_fields32(ENC_FRINTN_H_FLOATDP1, ctx, instr);
10964 ctx->d = UINT(ctx->Rd);
10965 ctx->n = UINT(ctx->Rn);
10966 if(!ctx->ftype) {
10967 ctx->esize = 0x20;
10968 }
10969 else if(ctx->ftype==1) {
10970 ctx->esize = 0x40;
10971 }
10972 else if(ctx->ftype==2) {
10973 UNDEFINED;
10974 }
10975 else if(ctx->ftype==3) {
10976 if(HaveFP16Ext()) {
10977 ctx->esize = 0x10;
10978 }
10979 else {
10980 UNDEFINED;
10981 }
10982 }
10983 ctx->exact = FALSE;
10984 if(!(ctx->rmode&4)) {
10985 ctx->rounding = FPDecodeRounding(SLICE(ctx->rmode,1,0));
10986 }
10987 else if(ctx->rmode==4) {
10988 ctx->rounding = FPRounding_TIEAWAY;
10989 }
10990 else if(ctx->rmode==5) {
10991 UNDEFINED;
10992 }
10993 else if(ctx->rmode==6) {
10994 ctx->rounding = FPRoundingMode(ctx->FPCR);
10995 ctx->exact = TRUE;
10996 }
10997 else if(ctx->rmode==7) {
10998 ctx->rounding = FPRoundingMode(ctx->FPCR);
10999 }
11000 if(ctx->ftype==3) OK(ENC_FRINTN_H_FLOATDP1);
11001 if(ctx->ftype==0) OK(ENC_FRINTN_S_FLOATDP1);
11002 if(ctx->ftype==1) OK(ENC_FRINTN_D_FLOATDP1);
11003 }
11004 return rc;
11005}
11006
11007/* frintp_advsimd.xml */
11008int FRINTP_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