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

Function FRINTZ_float

arch/arm64/disassembler/decode2.c:11317–11365  ·  view source on GitHub ↗

frintz_float.xml */

Source from the content-addressed store, hash-verified

11315
11316/* frintz_float.xml */
11317int FRINTZ_float(context *ctx, Instruction *instr)
11318{
11319 int rc = DECODE_STATUS_UNMATCHED;
11320 /* class iclass_float */
11321 /* M=0|0|S=0|11110|ftype=xx|1|opcode[5:3]=001|rmode=011|10000|Rn=xxxxx|Rd=xxxxx */
11322 if((INSWORD & 0xFF3FFC00)==0x1E25C000) {
11323 decode_fields32(ENC_FRINTZ_H_FLOATDP1, ctx, instr);
11324 ctx->d = UINT(ctx->Rd);
11325 ctx->n = UINT(ctx->Rn);
11326 if(!ctx->ftype) {
11327 ctx->esize = 0x20;
11328 }
11329 else if(ctx->ftype==1) {
11330 ctx->esize = 0x40;
11331 }
11332 else if(ctx->ftype==2) {
11333 UNDEFINED;
11334 }
11335 else if(ctx->ftype==3) {
11336 if(HaveFP16Ext()) {
11337 ctx->esize = 0x10;
11338 }
11339 else {
11340 UNDEFINED;
11341 }
11342 }
11343 ctx->exact = FALSE;
11344 if(!(ctx->rmode&4)) {
11345 ctx->rounding = FPDecodeRounding(SLICE(ctx->rmode,1,0));
11346 }
11347 else if(ctx->rmode==4) {
11348 ctx->rounding = FPRounding_TIEAWAY;
11349 }
11350 else if(ctx->rmode==5) {
11351 UNDEFINED;
11352 }
11353 else if(ctx->rmode==6) {
11354 ctx->rounding = FPRoundingMode(ctx->FPCR);
11355 ctx->exact = TRUE;
11356 }
11357 else if(ctx->rmode==7) {
11358 ctx->rounding = FPRoundingMode(ctx->FPCR);
11359 }
11360 if(ctx->ftype==3) OK(ENC_FRINTZ_H_FLOATDP1);
11361 if(ctx->ftype==0) OK(ENC_FRINTZ_S_FLOATDP1);
11362 if(ctx->ftype==1) OK(ENC_FRINTZ_D_FLOATDP1);
11363 }
11364 return rc;
11365}
11366
11367/* frsqrte_advsimd.xml */
11368int FRSQRTE_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