ref: 9beb928a779eee468ce065ce5c6f4a022a55abe8
parent: 42196d6a834e992695c6d66119e57d9ceea83741
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))
}