From 711a36f67049b6a1be74c1d0b179f1f898ff36c0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 1 Oct 2020 06:33:42 -0700 Subject: compiler: don't use move immediate instructions. * share/txr/stdlib/compiler.tl (comp-atom): Remove the special case for small fixnums and characters which encodes their value in a movi instruction as an immediate operand. This means that now these operands go into D registers, like all other literals. * share/txr/stdlib/vm-param.tl (%imm-width%): Remove this constant, reprensenting the maximum bit width of an immediate operand. --- share/txr/stdlib/compiler.tl | 4 ---- share/txr/stdlib/vm-param.tl | 1 - 2 files changed, 5 deletions(-) diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index f245e9f5..d1ee6664 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -348,10 +348,6 @@ (defmeth compiler comp-atom (me oreg form) (cond ((null form) (new (frag '(t 0) nil))) - ((or (and (fixnump form) - (<= (width form) (- %imm-width% 3))) - (chrp form)) - (new (frag oreg ^((movi ,oreg ,form))))) (t (let ((dreg me.(get-dreg form))) (new (frag dreg nil)))))) diff --git a/share/txr/stdlib/vm-param.tl b/share/txr/stdlib/vm-param.tl index 1198831b..0e278291 100644 --- a/share/txr/stdlib/vm-param.tl +++ b/share/txr/stdlib/vm-param.tl @@ -29,7 +29,6 @@ (defsymacro %lev-bits% 10) (defsymacro %max-lev% 63) (defsymacro %max-v-lev% (macro-time (ppred %max-lev%))) -(defsymacro %imm-width% 32) (defsymacro %sm-lev-size% 64) (defsymacro %max-sm-lev-idx% (macro-time (pred %sm-lev-size%))) (defsymacro %max-sm-lev% 15) -- cgit v1.2.3