From: Kenichi Handa <handa@m17n.org>
To: Kazuhiro Ito <kzhr@d1.dion.ne.jp>
Cc: eggert@cs.ucla.edu, 8751@debbugs.gnu.org
Subject: bug#8751: 24.0.50; CCL is broken
Date: Tue, 31 May 2011 14:12:54 +0900 [thread overview]
Message-ID: <tl7boyjlag9.fsf@m17n.org> (raw)
In-Reply-To: <20110530232630.273942C803A@msa105.auone-net.jp> (message from Kazuhiro Ito on Tue, 31 May 2011 08:26:24 +0900)
Sorry for the late response on this matter.
In article <20110530232630.273942C803A@msa105.auone-net.jp>, Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:
> > > 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
Yes, this comment is wrong. It seems that I have forgotten
to update it when I changed CCL to accept negative integer.
> 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)
Sorry but I still don't have a time to check the recent
change. If the above patch fixes the code to match with the
following revised comment, it is the right patch.
/* CCL code is a sequence of 28-bit integers, 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 17-bit, 20-bit, or 28-bit integer indicating a
constant value or a relative/absolute jump address, `RRR' and `rrr'
are CCL register number, `XXXXX' is one of the following CCL
command codes. */
---
Kenichi Handa
handa@m17n.org
next prev parent reply other threads:[~2011-05-31 5:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-28 12:49 bug#8751: 24.0.50; CCL is broken Kazuhiro Ito
2011-05-30 13:09 ` Kazuhiro Ito
2011-05-30 16:04 ` Stefan Monnier
2011-05-30 23:26 ` Kazuhiro Ito
2011-05-31 2:16 ` bug#8719: " Paul Eggert
2011-05-31 5:12 ` Kenichi Handa [this message]
2011-05-31 5:39 ` Paul Eggert
2011-05-30 16:01 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tl7boyjlag9.fsf@m17n.org \
--to=handa@m17n.org \
--cc=8751@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=kzhr@d1.dion.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).