From cb52f5dd0200f66ba6e6b4a3b1db0da6f60cdf9e Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 27 Aug 2022 20:23:23 -0700 Subject: Use reg 255 for swapping. I wanted to use the top reg, for some reason I thought at the time that 127 was the biggest 8-bit number. Obviously it's 255. --- lib/csc/codegen-test.csc | 4 ++-- lib/csc/codegen.csc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/csc/codegen-test.csc b/lib/csc/codegen-test.csc index 29d1da5..752f250 100644 --- a/lib/csc/codegen-test.csc +++ b/lib/csc/codegen-test.csc @@ -92,9 +92,9 @@ (mov (local 2) (const 1)) (jmp (label 1)) (label 1) - (mov (local 127) (local 1)) + (mov (local 255) (local 1)) (mov (local 1) (local 2)) - (mov (local 2) (local 127)) + (mov (local 2) (local 255)) (mov (local 3) (const 0)) (jmp (label 2)) (label 2) diff --git a/lib/csc/codegen.csc b/lib/csc/codegen.csc index abec72f..1198bce 100644 --- a/lib/csc/codegen.csc +++ b/lib/csc/codegen.csc @@ -90,7 +90,7 @@ #t)) - (define *temp-reg* 127) + (define *temp-reg* 255) (define (get-satisfying m pred) -- cgit v1.3.1