Skip to content

Commit

Permalink
DynASM/x86: Add AVX and AVX2 opcodes.
Browse files Browse the repository at this point in the history
Thanks to Peter Cawley.
  • Loading branch information
Mike Pall committed Oct 24, 2015
1 parent 7e22082 commit 8a13c9c
Show file tree
Hide file tree
Showing 2 changed files with 338 additions and 71 deletions.
7 changes: 6 additions & 1 deletion dynasm/dasm_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,12 @@ int dasm_encode(Dst_DECL, void *buffer)
case DASM_IMM_D: wd: dasmd(n); break;
case DASM_IMM_WB: if (((n+128)&-256) == 0) goto db; else mark = NULL;
case DASM_IMM_W: dasmw(n); break;
case DASM_VREG: { int t = *p++; if (t >= 2) n<<=3; cp[-1] |= n; break; }
case DASM_VREG: {
int t = *p++;
if (t >= 5) n <<= 4; else if (t >= 2) n <<= 3;
cp[-1] ^= n;
break;
}
case DASM_REL_LG: p++; if (n >= 0) goto rel_pc;
b++; n = (int)(ptrdiff_t)D->globals[-n];
case DASM_REL_A: rel_a: n -= (int)(ptrdiff_t)(cp+4); goto wd; /* !x64 */
Expand Down
Loading

0 comments on commit 8a13c9c

Please sign in to comment.