Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org,  Tom Tromey <tromey@redhat.com>
Subject: Re: RFA: fix PR 9164
Date: Wed, 07 Jan 2009 22:13:00 -0000	[thread overview]
Message-ID: <200901072213.43988.pedro@codesourcery.com> (raw)
In-Reply-To: <m31vvhli7e.fsf@fleche.redhat.com>

On Monday 05 January 2009 18:29:41, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
> 
> Pedro> I think that m32c will need a hook here.  I think that in some
> Pedro> modes, size_t will be 16-bit, but pointer width 24-bits.
> 
> Pedro> I wonder if the above shouldn't be a gdbarch method, that defaults to
> Pedro> what you wrote.
> 
> Yeah, I do see some gcc ports where size_t depends on the flags.
> Not m32c, actually, but:

Ah, you're only looking for SIZE_TYPE:

/* We can do QI, HI, and SI operations pretty much equally well, but
   GCC expects us to have a "native" format, so we pick the one that
   matches "int".  Pointers are 16 bits for R8C/M16C (when TARGET_A16
   is true) and 24 bits for M32CM/M32C (when TARGET_A24 is true), but
   24-bit pointers are stored in 32-bit words.  */
#define BITS_PER_UNIT 8
#define UNITS_PER_WORD 2
#define POINTER_SIZE (TARGET_A16 ? 16 : 32)
#define POINTERS_EXTEND_UNSIGNED 1
...
#define INT_TYPE_SIZE 16

So, SIZE_TYPE defaults to unsigned int --- 16-bit, but the pointer size
varies.  This means that objects can only be 16-bit big, but they can
exist in a larger than 16-bit address space.

-- 
Pedro Alves


      reply	other threads:[~2009-01-07 22:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-03 21:20 Tom Tromey
2009-01-04  3:29 ` Daniel Jacobowitz
2009-01-04 18:10   ` Tom Tromey
2009-01-05  4:23     ` Joel Brobecker
2009-01-05  4:51       ` Tom Tromey
2009-01-05  9:23       ` Mark Kettenis
2009-01-05  9:30         ` Joel Brobecker
2009-01-05 17:29 ` Pedro Alves
2009-01-05 18:31   ` Tom Tromey
2009-01-07 22:13     ` Pedro Alves [this message]

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=200901072213.43988.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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