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

Function FRINTM_float

arch/arm64/disassembler/decode2.c:10837–10885  ·  view source on GitHub ↗

frintm_float.xml */

Source from the content-addressed store, hash-verified

10835
10836/* frintm_float.xml */
10837int FRINTM_float(context *ctx, Instruction *instr)
10838{
10839 int rc = DECODE_STATUS_UNMATCHED;
10840 /* class iclass_float */
10841 /* M=0|0|S=0|11110|ftype=xx|1|opcode[5:3]=001|rmode=010|10000|Rn=xxxxx|Rd=xxxxx */
10842 if((INSWORD & 0xFF3FFC00)==0x1E254000) {
10843 decode_fields32(ENC_FRINTM_H_FLOATDP1, ctx, instr);
10844 ctx->d = UINT(ctx->Rd);
10845 ctx->n = UINT(ctx->Rn);
10846 if(!ctx->ftype) {
10847 ctx->esize = 0x20;
10848 }
10849 else if(ctx->ftype==1) {
10850 ctx->esize = 0x40;
10851 }
10852 else if(ctx->ftype==2) {
10853 UNDEFINED;
10854 }
10855 else if(ctx->ftype==3) {
10856 if(HaveFP16Ext()) {
10857 ctx->esize = 0x10;
10858 }
10859 else {
10860 UNDEFINED;
10861 }
10862 }
10863 ctx->exact = FALSE;
10864 if(!(ctx->rmode&4)) {
10865 ctx->rounding = FPDecodeRounding(SLICE(ctx->rmode,1,0));
10866 }
10867 else if(ctx->rmode==4) {
10868 ctx->rounding = FPRounding_TIEAWAY;
10869 }
10870 else if(ctx->rmode==5) {
10871 UNDEFINED;
10872 }
10873 else if(ctx->rmode==6) {
10874 ctx->rounding = FPRoundingMode(ctx->FPCR);
10875 ctx->exact = TRUE;
10876 }
10877 else if(ctx->rmode==7) {
10878 ctx->rounding = FPRoundingMode(ctx->FPCR);
10879 }
10880 if(ctx->ftype==3) OK(ENC_FRINTM_H_FLOATDP1);
10881 if(ctx->ftype==0) OK(ENC_FRINTM_S_FLOATDP1);
10882 if(ctx->ftype==1) OK(ENC_FRINTM_D_FLOATDP1);
10883 }
10884 return rc;
10885}
10886
10887/* frintn_advsimd.xml */
10888int FRINTN_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