From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kazuhiro Ito Newsgroups: gmane.emacs.bugs Subject: bug#8751: 24.0.50; CCL is broken Date: Tue, 31 May 2011 08:26:24 +0900 Message-ID: <20110530232630.273942C803A@msa105.auone-net.jp> References: <20110528124948.470A6360038@msa102.auone-net.jp> <20110530130933.D45704B803A@msa106.auone-net.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI-EPG 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1306798032 23255 80.91.229.12 (30 May 2011 23:27:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 May 2011 23:27:12 +0000 (UTC) Cc: Paul Eggert , 8751@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 31 01:27:07 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QRBrX-0007Gs-I2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 May 2011 01:27:07 +0200 Original-Received: from localhost ([::1]:42593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRBrX-0003jR-5J for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 May 2011 19:27:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRBrU-0003jM-Oa for bug-gnu-emacs@gnu.org; Mon, 30 May 2011 19:27:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRBrT-0002Ng-Mg for bug-gnu-emacs@gnu.org; Mon, 30 May 2011 19:27:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRBrT-0002Nb-E1 for bug-gnu-emacs@gnu.org; Mon, 30 May 2011 19:27:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QRBrS-0004nN-I7; Mon, 30 May 2011 19:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kazuhiro Ito Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 May 2011 23:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8751 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8751-submit@debbugs.gnu.org id=B8751.130679800218408 (code B ref 8751); Mon, 30 May 2011 23:27:02 +0000 Original-Received: (at 8751) by debbugs.gnu.org; 30 May 2011 23:26:42 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRBr7-0004mr-RU for submit@debbugs.gnu.org; Mon, 30 May 2011 19:26:42 -0400 Original-Received: from msa105.auone-net.jp ([61.117.18.165]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRBr3-0004mc-W2 for 8751@debbugs.gnu.org; Mon, 30 May 2011 19:26:40 -0400 Original-Received: from GUNGNIR.med.osaka-cu.ac.jp (unknown [114.179.36.76]) by msa105.auone-net.jp (au one net msa) with ESMTP id 273942C803A; Tue, 31 May 2011 08:26:29 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/23.3.50 (i386-mingw-nt6.1.7601) MULE/6.0 (HANACHIRUSATO) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 30 May 2011 19:27:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46825 Archived-At: > > The problem may be that ccl-compiler produce negative integer as CCL > > code (at latest, since Emacs21). > > The negative number is normal (it's due to the relative instruction > address for the backward jump at the end of the loop). The problem must > be in the ccl.c code. If that is right (and I think so, too), the comment of ccl.c should be fixed. > /* CCL code is a sequence of 28-bit non-negative integers (i.e. the ~~~~~~~~~~~~ > MSB is always 0), each contains CCL command and/or arguments in the > following format: > > |----------------- integer (28-bit) ------------------| > |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -| > |--constant argument--|-register-|-register-|-command-| > ccccccccccccccccc RRR rrr XXXXX > or > |------- relative address -------|-register-|-command-| > cccccccccccccccccccc rrr XXXXX > or > |------------- constant or other args ----------------| > cccccccccccccccccccccccccccc > > where, `cc...c' is a non-negative integer indicating constant value ~~~~~~~~~~~~ > (the left most `c' is always 0) or an absolute jump address, `RRR' > and `rrr' are CCL register number, `XXXXX' is one of the following > CCL commands. */ Here is a quick fix for actual code, but I don't check whether there is other problems. === modified file 'src/ccl.c' --- src/ccl.c 2011-05-27 21:24:11 +0000 +++ src/ccl.c 2011-05-30 22:19:52 +0000 @@ -100,6 +100,7 @@ CCL commands. */ #define CCL_CODE_MAX ((1 << (28 - 1)) - 1) +#define CCL_CODE_MIN (- CCL_CODE_MAX - 1) /* CCL commands @@ -756,7 +757,7 @@ while (0) #define GET_CCL_CODE(code, ccl_prog, ic) \ - GET_CCL_RANGE (code, ccl_prog, ic, 0, CCL_CODE_MAX) + GET_CCL_RANGE (code, ccl_prog, ic, CCL_CODE_MIN, CCL_CODE_MAX) #define GET_CCL_INT(var, ccl_prog, ic) \ GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX) -- Kazuhiro Ito