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

Function FRINTM_advsimd

arch/arm64/disassembler/decode2.c:10768–10834  ·  view source on GitHub ↗

frintm_advsimd.xml */

Source from the content-addressed store, hash-verified

10766
10767/* frintm_advsimd.xml */
10768int FRINTM_advsimd(context *ctx, Instruction *instr)
10769{
10770 int rc = DECODE_STATUS_UNMATCHED;
10771 /* class iclass_half */
10772 /* 0|Q=x|U=0|01110|o2=0|111100|opcode[4:1]=1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */
10773 if((INSWORD & 0xBFFFFC00)==0xE799800) {
10774 decode_fields32(ENC_FRINTM_ASIMDMISCFP16_R, ctx, instr);
10775 if(!HaveFP16Ext()) {
10776 UNDEFINED;
10777 }
10778 ctx->d = UINT(ctx->Rd);
10779 ctx->n = UINT(ctx->Rn);
10780 ctx->esize = 0x10;
10781 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
10782 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
10783 ctx->exact = FALSE;
10784 if(!(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)&4)) {
10785 ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2));
10786 }
10787 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==4) {
10788 ctx->rounding = FPRounding_TIEAWAY;
10789 }
10790 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==5) {
10791 UNDEFINED;
10792 }
10793 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==6) {
10794 ctx->rounding = FPRoundingMode(ctx->FPCR);
10795 ctx->exact = TRUE;
10796 }
10797 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==7) {
10798 ctx->rounding = FPRoundingMode(ctx->FPCR);
10799 }
10800 OK(ENC_FRINTM_ASIMDMISCFP16_R);
10801 }
10802 /* class iclass_single_and_double */
10803 /* 0|Q=x|U=0|01110|o2=0|sz=x|10000|opcode[4:1]=1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */
10804 if((INSWORD & 0xBFBFFC00)==0xE219800) {
10805 decode_fields32(ENC_FRINTM_ASIMDMISC_R, ctx, instr);
10806 ctx->d = UINT(ctx->Rd);
10807 ctx->n = UINT(ctx->Rn);
10808 if(((ctx->sz<<1)|ctx->Q)==2) {
10809 UNDEFINED;
10810 }
10811 ctx->esize = (0x20) << (UINT(ctx->sz));
10812 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
10813 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
10814 ctx->exact = FALSE;
10815 if(!(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)&4)) {
10816 ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2));
10817 }
10818 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==4) {
10819 ctx->rounding = FPRounding_TIEAWAY;
10820 }
10821 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==5) {
10822 UNDEFINED;
10823 }
10824 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==6) {
10825 ctx->rounding = FPRoundingMode(ctx->FPCR);

Callers 2

decode_iclass_asimdmiscFunction · 0.85

Calls 3

decode_fields32Function · 0.85
FPDecodeRoundingFunction · 0.85
FPRoundingModeFunction · 0.85

Tested by

no test coverage detected