public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Johan Rydberg <johan.rydberg@netinsight.se>
To: matthew green <mrg@cygnus.com>
Cc: cgen@sources.redhat.com, Eric Christopher <echristo@redhat.com>
Subject: Re: 64-bit port using CGEN
Date: Tue, 15 May 2001 20:24:00 -0000	[thread overview]
Message-ID: <3B01F306.4152A19C@netinsight.se> (raw)
In-Reply-To: <12258.989982603@cygnus.com>

matthew green wrote:
> 
> 
>    CGEN_INSN_INT is typedef:ed as an "unsigned int" and CGEN generates alot
>    of code that thinks that an insn or operand can fit into a long or int.
> 
> what does your opcodes/foo-desc.h have defined for CGEN_INT_INSN_P?  this
> should be zero when you have any instructions larger than what fit into
> an int.  if not, i suspect problems in your insn formats.

It is defined to zero.  

First of all, opcode values are truncated to zero:

static const CGEN_IFMT ifmt_j = {
  64, 64, 0xe000000000000000, { { F (F_OPC) }, { F (F_ABS61) }, { 0 } }
};

pxs-opc.c:55: warning: large integer implicitly truncated to unsigned type

Looking in /include/opcodes/cgen.h:

  typedef struct
  {
    ...
    CGEN_INSN_INT mask;
  } CGEN_IFMT;

Since CGEN_INSN_INT is typedef:ed as an unsigned int, 0xe000000000000000 gets
truncated to 32-bits.


Second,  

The genereated insert and extract code aborts when word length is larger than
32 bit.  From /opcodes/cgen-ibld.in:

  static const char *
  insert_normal (cd, value, attrs, word_offset, start, length, word_length,
                 total_length, buffer)  
  ...
  {
    ...
    if (word_length > 32)
      abort ();
    ...
  }

  reply	other threads:[~2001-05-15 20:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-15 17:10 Johan Rydberg
2001-05-15 19:36 ` Eric Christopher
2001-05-15 19:39   ` Johan Rydberg
2001-05-15 19:42     ` Eric Christopher
2001-05-15 19:46       ` Johan Rydberg
2001-05-15 20:15         ` matthew green
2001-05-15 20:24           ` Johan Rydberg [this message]
     [not found]           ` <3B01F306.4152A19C.cygnus.local.cgen@netinsight.se>
2001-05-16  7:50             ` Frank Ch. Eigler
2001-05-16  8:05               ` Johan Rydberg
2001-05-16  8:09                 ` Frank Ch. Eigler
2001-05-16  8:17                   ` Johan Rydberg
2001-05-15 20:15 ` matthew green

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=3B01F306.4152A19C@netinsight.se \
    --to=johan.rydberg@netinsight.se \
    --cc=cgen@sources.redhat.com \
    --cc=echristo@redhat.com \
    --cc=mrg@cygnus.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).