From cce1e85d5cdd3a79cbadb69cf015132d24c1e7f7 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Mon, 30 Jan 2017 11:47:27 -0700 Subject: [PATCH] Replace unbound ascii-char? with char->... stolen from LIAR/x86-64. --- src/compiler/machines/svm/rules.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/machines/svm/rules.scm b/src/compiler/machines/svm/rules.scm index cdb501f68..a8b495de2 100644 --- a/src/compiler/machines/svm/rules.scm +++ b/src/compiler/machines/svm/rules.scm @@ -228,9 +228,12 @@ USA. (define-rule statement (ASSIGN (REGISTER (? target)) (CHAR->ASCII (CONSTANT (? char)))) - (QUALIFIER (ascii-char? char)) (inst:load-immediate (word-target target) - (object-datum char))) + (char->signed-8-bit-immediate char))) + +(define (char->signed-8-bit-immediate character) + (let ((ascii (char->integer character))) + (if (< ascii 128) ascii (- ascii 256)))) (define-rule predicate (TYPE-TEST (REGISTER (? source)) (? type)) -- 2.25.1