shithub: mc

Download patch

ref: d5ad891811200cc68b5f712f05f30573cfe3fe53
parent: 9beb928a779eee468ce065ce5c6f4a022a55abe8
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;