public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: cgen@sources.redhat.com
Subject: cgen-ibld.in 64-bit extract bug
Date: Mon, 16 Jul 2001 22:38:00 -0000	[thread overview]
Message-ID: <20010716223803.A11519@redhat.com> (raw)

CGEN_INSN_INT is usually an unsigned int, while valuep is a long.
Under these conditions, the masking and sign-extension done at the
end of the function is incorrect unless sizeof(int)==sizeof(long).

Ok?


r~


	* cgen-ibld.in (extract_normal): Make value and mask a long.

Index: cgen-ibld.in
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/cgen-ibld.in,v
retrieving revision 1.15
diff -c -p -d -r1.15 cgen-ibld.in
*** cgen-ibld.in	2001/07/01 02:49:14	1.15
--- cgen-ibld.in	2001/07/17 05:32:18
*************** extract_normal (cd, ex_info, insn_value,
*** 415,421 ****
  #endif
       long *valuep;
  {
!   CGEN_INSN_INT value, mask;
  
    /* If LENGTH is zero, this operand doesn't contribute to the value
       so give it a standard value of zero.  */
--- 415,421 ----
  #endif
       long *valuep;
  {
!   long value, mask;
  
    /* If LENGTH is zero, this operand doesn't contribute to the value
       so give it a standard value of zero.  */

             reply	other threads:[~2001-07-16 22:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-16 22:38 Richard Henderson [this message]
2001-07-17  4:13 ` Frank Ch. Eigler
2001-07-17  8:53   ` Richard Henderson

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010716223803.A11519@redhat.com \
    --to=rth@redhat.com \
    --cc=cgen@sources.redhat.com \
    /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.
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).