diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-08-27 20:23:23 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-08-27 20:34:59 -0700 |
| commit | cb52f5dd0200f66ba6e6b4a3b1db0da6f60cdf9e (patch) | |
| tree | e5f233ab51f34374f42b9ea2aa64fa384bbe9e43 | |
| parent | e07c62f447e9f041901812a6e9cda05ae76d92df (diff) | |
| download | chromatopelma-cb52f5dd0200f66ba6e6b4a3b1db0da6f60cdf9e.tar.zst | |
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.
| -rw-r--r-- | lib/csc/codegen-test.csc | 4 | ||||
| -rw-r--r-- | lib/csc/codegen.csc | 2 |
2 files changed, 3 insertions, 3 deletions
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) |
