summaryrefslogtreecommitdiff
path: root/lisp/international/ccl.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/international/ccl.el')
-rw-r--r--lisp/international/ccl.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el
index d1b82ceb9ce..58083f05d92 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))