shithub: mc

Download patch

ref: e306ec614cf2ae913a34508104a3579f5607562e
parent: d8995182fdd4aaa544f4b37925f94f83f1a1b183
author: Ori Bernstein <[email protected]>
date: Fri Dec 26 07:39:51 EST 2014

Sign extend byte regs for signed division.

--- a/6/isel.c
+++ b/6/isel.c
@@ -534,7 +534,7 @@
             g(s, Imov, a, c, NULL);
             if (istysigned(exprtype(args[0]))) {
                 switch (r->mode) {
-                    case ModeB: break;
+                    case ModeB: g(s, Imovsx, c, coreg(Rrax, ModeW), NULL); break;
                     case ModeW: g(s, Icwd, NULL);       break;
                     case ModeL: g(s, Icdq, NULL);       break;
                     case ModeQ: g(s, Icqo, NULL);       break;