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

Function FRINTP_float

arch/arm64/disassembler/decode2.c:11077–11125  ·  view source on GitHub ↗

frintp_float.xml */

Source from the content-addressed store, hash-verified

11075
11076/* frintp_float.xml */
11077int FRINTP_float(context *ctx, Instruction *instr)
11078{
11079 int rc = DECODE_STATUS_UNMATCHED;
11080 /* class iclass_float */
11081 /* M=0|0|S=0|11110|ftype=xx|1|opcode[5:3]=001|rmode=001|10000|Rn=xxxxx|Rd=xxxxx */
11082 if((INSWORD & 0xFF3FFC00)==0x1E24C000) {
11083 decode_fields32(ENC_FRINTP_H_FLOATDP1, ctx, instr);
11084 ctx->d = UINT(ctx->Rd);
11085 ctx->n = UINT(ctx->Rn);
11086 if(!ctx->ftype) {
11087 ctx->esize = 0x20;
11088 }
11089 else if(ctx->ftype==1) {
11090 ctx->esize = 0x40;
11091 }
11092 else if(ctx->ftype==2) {
11093 UNDEFINED;
11094 }
11095 else if(ctx->ftype==3) {
11096 if(HaveFP16Ext()) {
11097 ctx->esize = 0x10;
11098 }
11099 else {
11100 UNDEFINED;
11101 }
11102 }
11103 ctx->exact = FALSE;
11104 if(!(ctx->rmode&4)) {
11105 ctx->rounding = FPDecodeRounding(SLICE(ctx->rmode,1,0));
11106 }
11107 else if(ctx->rmode==4) {
11108 ctx->rounding = FPRounding_TIEAWAY;
11109 }
11110 else if(ctx->rmode==5) {
11111 UNDEFINED;
11112 }
11113 else if(ctx->rmode==6) {
11114 ctx->rounding = FPRoundingMode(ctx->FPCR);
11115 ctx->exact = TRUE;
11116 }
11117 else if(ctx->rmode==7) {
11118 ctx->rounding = FPRoundingMode(ctx->FPCR);
11119 }
11120 if(ctx->ftype==3) OK(ENC_FRINTP_H_FLOATDP1);
11121 if(ctx->ftype==0) OK(ENC_FRINTP_S_FLOATDP1);
11122 if(ctx->ftype==1) OK(ENC_FRINTP_D_FLOATDP1);
11123 }
11124 return rc;
11125}
11126
11127/* frintx_advsimd.xml */
11128int FRINTX_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