emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] feature/bignum 68ebff2: Fix test and comment in CCL change


From: Tom Tromey
Subject: [Emacs-diffs] feature/bignum 68ebff2: Fix test and comment in CCL change
Date: Sun, 5 Aug 2018 14:58:39 -0400 (EDT)

branch: feature/bignum
commit 68ebff23f7057090da260830500cb278f7b886a5
Author: Andy Moreton <address@hidden>
Commit: Tom Tromey <address@hidden>

    Fix test and comment in CCL change
    
    * lisp/international/ccl.el (ccl-fixnum): Update comment.
    * test/lisp/international/ccl-tests.el (prog-midi-dump): Add
    trailing space to expected result.
---
 lisp/international/ccl.el            | 6 ++++--
 test/lisp/international/ccl-tests.el | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el
index d1b82ce..58083f0 100644
--- a/lisp/international/ccl.el
+++ b/lisp/international/ccl.el
@@ -184,8 +184,10 @@
 (defvar ccl-current-ic 0
   "The current index for `ccl-program-vector'.")
 
-;; This is needed because CCL assumes the pre-bigint (wrapping)
-;; semantics of integer overflow.
+;; The CCL compiled codewords are 28bits, but the CCL implementation
+;; assumes that the codewords are sign-extended, so that data constants in
+;; the upper part of the codeword are signed. This function truncates a
+;; codeword to 28bits, and then sign extends the result to a fixnum.
 (defun ccl-fixnum (code)
   "Convert a CCL code word to a fixnum value."
   (- (logxor (logand code #x0fffffff) #x08000000) #x08000000))
diff --git a/test/lisp/international/ccl-tests.el 
b/test/lisp/international/ccl-tests.el
index d0c254c..ba6d204 100644
--- a/test/lisp/international/ccl-tests.el
+++ b/test/lisp/international/ccl-tests.el
@@ -162,7 +162,7 @@ At EOF:
 Main-body:
     2:[read-jump-cond-expr-const] read r0, if !(r0 < 128), jump to 22(+20)
     5:[branch] jump to array[r3] of length 4
-       11 12 15 18 22
+       11 12 15 18 22 
    11:[jump] jump to 2(-9)
    12:[set-register] r1 = r0
    13:[set-register] r0 = r4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]