shithub: mc

Download patch

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

fix division tests.

--- a/6/isel.c
+++ b/6/isel.c
@@ -543,7 +543,7 @@
                 g(s, Iidiv, b, NULL);
             } else {
                 if (r->mode == ModeB)
-                    g(s, Ixor, eax, eax, NULL);
+                    g(s, Ixor, locphysreg(Rah), locphysreg(Rah), NULL);
                 else
                     g(s, Ixor, edx, edx, NULL);
                 g(s, Idiv, b, NULL);
--- a/test/trunccast.myr
+++ b/test/trunccast.myr
@@ -1,10 +1,10 @@
 use std
 /* should truncate y when casting to x, exiting with status 15 */
 const main = {
-	var x : int8
+	var x : uint8
 	var y : int32
 
 	y = 9999
-	x = y castto(int8)
+	x = y castto(uint8)
 	std.exit((x % 73) castto(int))
 }