aboutsummaryrefslogtreecommitdiff
path: root/dynasm
diff options
context:
space:
mode:
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; }