qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 20df24da7568c67741dfbcf2560bfea516154ae1
parent 0aa0002337ca3a101752f19e9cc1a153afb846af
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Sun,  5 Apr 2015 15:23:24 -0400

cleanup overflow computation

Diffstat:
Mlo2.ml | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lo2.ml b/lo2.ml @@ -467,8 +467,9 @@ let codegen (p: mprog): string = outb rex; outb op; outb (modrm r m) in let slot s = - assert (s*8<256); - ((-1-s) * 8) land 0xff in + let c = ((-1-s) * 8) land 0xff in + assert (c < 256); + c in let move l l1 = match l, l1 with | (LReg _ as r), LCon k ->