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

Function FRINTX_advsimd

arch/arm64/disassembler/decode2.c:11128–11194  ·  view source on GitHub ↗

frintx_advsimd.xml */

Source from the content-addressed store, hash-verified

11126
11127/* frintx_advsimd.xml */
11128int FRINTX_advsimd(context *ctx, Instruction *instr)
11129{
11130 int rc = DECODE_STATUS_UNMATCHED;
11131 /* class iclass_half */
11132 /* 0|Q=x|U=1|01110|o2=0|111100|opcode[4:1]=1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */
11133 if((INSWORD & 0xBFFFFC00)==0x2E799800) {
11134 decode_fields32(ENC_FRINTX_ASIMDMISCFP16_R, ctx, instr);
11135 if(!HaveFP16Ext()) {
11136 UNDEFINED;
11137 }
11138 ctx->d = UINT(ctx->Rd);
11139 ctx->n = UINT(ctx->Rn);
11140 ctx->esize = 0x10;
11141 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
11142 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
11143 ctx->exact = FALSE;
11144 if(!(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)&4)) {
11145 ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2));
11146 }
11147 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==4) {
11148 ctx->rounding = FPRounding_TIEAWAY;
11149 }
11150 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==5) {
11151 UNDEFINED;
11152 }
11153 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==6) {
11154 ctx->rounding = FPRoundingMode(ctx->FPCR);
11155 ctx->exact = TRUE;
11156 }
11157 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==7) {
11158 ctx->rounding = FPRoundingMode(ctx->FPCR);
11159 }
11160 OK(ENC_FRINTX_ASIMDMISCFP16_R);
11161 }
11162 /* class iclass_single_and_double */
11163 /* 0|Q=x|U=1|01110|o2=0|sz=x|10000|opcode[4:1]=1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */
11164 if((INSWORD & 0xBFBFFC00)==0x2E219800) {
11165 decode_fields32(ENC_FRINTX_ASIMDMISC_R, ctx, instr);
11166 ctx->d = UINT(ctx->Rd);
11167 ctx->n = UINT(ctx->Rn);
11168 if(((ctx->sz<<1)|ctx->Q)==2) {
11169 UNDEFINED;
11170 }
11171 ctx->esize = (0x20) << (UINT(ctx->sz));
11172 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
11173 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
11174 ctx->exact = FALSE;
11175 if(!(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)&4)) {
11176 ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2));
11177 }
11178 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==4) {
11179 ctx->rounding = FPRounding_TIEAWAY;
11180 }
11181 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==5) {
11182 UNDEFINED;
11183 }
11184 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==6) {
11185 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