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

Function FRINTZ_advsimd

arch/arm64/disassembler/decode2.c:11248–11314  ·  view source on GitHub ↗

frintz_advsimd.xml */

Source from the content-addressed store, hash-verified

11246
11247/* frintz_advsimd.xml */
11248int FRINTZ_advsimd(context *ctx, Instruction *instr)
11249{
11250 int rc = DECODE_STATUS_UNMATCHED;
11251 /* class iclass_half */
11252 /* 0|Q=x|U=0|01110|o2=1|111100|opcode[4:1]=1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */
11253 if((INSWORD & 0xBFFFFC00)==0xEF99800) {
11254 decode_fields32(ENC_FRINTZ_ASIMDMISCFP16_R, ctx, instr);
11255 if(!HaveFP16Ext()) {
11256 UNDEFINED;
11257 }
11258 ctx->d = UINT(ctx->Rd);
11259 ctx->n = UINT(ctx->Rn);
11260 ctx->esize = 0x10;
11261 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
11262 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
11263 ctx->exact = FALSE;
11264 if(!(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)&4)) {
11265 ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2));
11266 }
11267 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==4) {
11268 ctx->rounding = FPRounding_TIEAWAY;
11269 }
11270 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==5) {
11271 UNDEFINED;
11272 }
11273 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==6) {
11274 ctx->rounding = FPRoundingMode(ctx->FPCR);
11275 ctx->exact = TRUE;
11276 }
11277 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==7) {
11278 ctx->rounding = FPRoundingMode(ctx->FPCR);
11279 }
11280 OK(ENC_FRINTZ_ASIMDMISCFP16_R);
11281 }
11282 /* class iclass_single_and_double */
11283 /* 0|Q=x|U=0|01110|o2=1|sz=x|10000|opcode[4:1]=1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */
11284 if((INSWORD & 0xBFBFFC00)==0xEA19800) {
11285 decode_fields32(ENC_FRINTZ_ASIMDMISC_R, ctx, instr);
11286 ctx->d = UINT(ctx->Rd);
11287 ctx->n = UINT(ctx->Rn);
11288 if(((ctx->sz<<1)|ctx->Q)==2) {
11289 UNDEFINED;
11290 }
11291 ctx->esize = (0x20) << (UINT(ctx->sz));
11292 ctx->datasize = (ctx->Q==1) ? 0x80 : 0x40;
11293 ctx->elements = ((ctx->esize) ? ((ctx->datasize) / (ctx->esize)) : 0);
11294 ctx->exact = FALSE;
11295 if(!(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)&4)) {
11296 ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2));
11297 }
11298 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==4) {
11299 ctx->rounding = FPRounding_TIEAWAY;
11300 }
11301 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==5) {
11302 UNDEFINED;
11303 }
11304 else if(((ctx->U<<2)|(ctx->o1<<1)|ctx->o2)==6) {
11305 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