diff options
| author | Andy Moreton | 2018-08-05 12:56:33 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-08-05 12:56:33 -0600 |
| commit | 68ebff23f7057090da260830500cb278f7b886a5 (patch) | |
| tree | 6520d1133ba3bb2f5b4afd00ca1e074b85347388 | |
| parent | 1303f8a4806fb170c14375c53b0f79d03e288eb3 (diff) | |
| download | emacs-68ebff23f7057090da260830500cb278f7b886a5.tar.gz emacs-68ebff23f7057090da260830500cb278f7b886a5.zip | |
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.
| -rw-r--r-- | lisp/international/ccl.el | 6 | ||||
| -rw-r--r-- | 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 d1b82ceb9ce..58083f05d92 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el | |||
| @@ -184,8 +184,10 @@ | |||
| 184 | (defvar ccl-current-ic 0 | 184 | (defvar ccl-current-ic 0 |
| 185 | "The current index for `ccl-program-vector'.") | 185 | "The current index for `ccl-program-vector'.") |
| 186 | 186 | ||
| 187 | ;; This is needed because CCL assumes the pre-bigint (wrapping) | 187 | ;; The CCL compiled codewords are 28bits, but the CCL implementation |
| 188 | ;; semantics of integer overflow. | 188 | ;; assumes that the codewords are sign-extended, so that data constants in |
| 189 | ;; the upper part of the codeword are signed. This function truncates a | ||
| 190 | ;; codeword to 28bits, and then sign extends the result to a fixnum. | ||
| 189 | (defun ccl-fixnum (code) | 191 | (defun ccl-fixnum (code) |
| 190 | "Convert a CCL code word to a fixnum value." | 192 | "Convert a CCL code word to a fixnum value." |
| 191 | (- (logxor (logand code #x0fffffff) #x08000000) #x08000000)) | 193 | (- (logxor (logand code #x0fffffff) #x08000000) #x08000000)) |
diff --git a/test/lisp/international/ccl-tests.el b/test/lisp/international/ccl-tests.el index d0c254ce91b..ba6d2040e8c 100644 --- a/test/lisp/international/ccl-tests.el +++ b/test/lisp/international/ccl-tests.el | |||
| @@ -162,7 +162,7 @@ At EOF: | |||
| 162 | Main-body: | 162 | Main-body: |
| 163 | 2:[read-jump-cond-expr-const] read r0, if !(r0 < 128), jump to 22(+20) | 163 | 2:[read-jump-cond-expr-const] read r0, if !(r0 < 128), jump to 22(+20) |
| 164 | 5:[branch] jump to array[r3] of length 4 | 164 | 5:[branch] jump to array[r3] of length 4 |
| 165 | 11 12 15 18 22 | 165 | 11 12 15 18 22 |
| 166 | 11:[jump] jump to 2(-9) | 166 | 11:[jump] jump to 2(-9) |
| 167 | 12:[set-register] r1 = r0 | 167 | 12:[set-register] r1 = r0 |
| 168 | 13:[set-register] r0 = r4 | 168 | 13:[set-register] r0 = r4 |