aboutsummaryrefslogtreecommitdiff
path: root/dynasm
diff options
context:
space:
mode:
authorMike Pall <mike>2015-12-28 17:06:48 +0100
committerMike Pall <mike>2015-12-28 17:06:48 +0100
commit22e7b00ddbc2adcc351f9d3656956c5937fc8ee8 (patch)
treeb6704f030d225c6c9ce4738ee5fb3490305969c2 /dynasm
parent52ebe02c277fef4ca62e6cab09c0d7ec9ed4d169 (diff)
downloadluajit-22e7b00ddbc2adcc351f9d3656956c5937fc8ee8.tar.gz
luajit-22e7b00ddbc2adcc351f9d3656956c5937fc8ee8.tar.bz2
luajit-22e7b00ddbc2adcc351f9d3656956c5937fc8ee8.zip
DynASM/x64: Fix for full VREG support.
Thanks to Peter Cawley.
Diffstat (limited to 'dynasm')
-rw-r--r--dynasm/dasm_x86.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/dynasm/dasm_x86.h b/dynasm/dasm_x86.h
index 4d2b773b..be9c289f 100644
--- a/dynasm/dasm_x86.h
+++ b/dynasm/dasm_x86.h
@@ -403,6 +403,7 @@ int dasm_encode(Dst_DECL, void *buffer)
403 unsigned char *ex = cp - (t&7); 403 unsigned char *ex = cp - (t&7);
404 if ((n & 8) && t < 0xa0) { 404 if ((n & 8) && t < 0xa0) {
405 if (*ex & 0x80) ex[1] ^= 0x20 << (t>>6); else *ex ^= 1 << (t>>6); 405 if (*ex & 0x80) ex[1] ^= 0x20 << (t>>6); else *ex ^= 1 << (t>>6);
406 n &= 7;
406 } else if (n & 0x10) { 407 } else if (n & 0x10) {
407 if (*ex & 0x80) { 408 if (*ex & 0x80) {
408 *ex = 0xc5; ex[1] = (ex[1] & 0x80) | ex[2]; ex += 2; 409 *ex = 0xc5; ex[1] = (ex[1] & 0x80) | ex[2]; ex += 2;
@@ -410,8 +411,8 @@ int dasm_encode(Dst_DECL, void *buffer)
410 while (++ex < cp) ex[-1] = *ex; 411 while (++ex < cp) ex[-1] = *ex;
411 if (mark) mark--; 412 if (mark) mark--;
412 cp--; 413 cp--;
414 n &= 7;
413 } 415 }
414 n &= 7;
415 if (t >= 0xc0) n <<= 4; 416 if (t >= 0xc0) n <<= 4;
416 else if (t >= 0x40) n <<= 3; 417 else if (t >= 0x40) n <<= 3;
417 else if (n == 4 && t < 0x20) { cp[-1] ^= n; *cp++ = 0x20; } 418 else if (n == 4 && t < 0x20) { cp[-1] ^= n; *cp++ = 0x20; }