Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: deuling@de.ibm.com (Markus Deuling)
Cc: gdb-patches@sourceware.org (GDB Patches), eliz@gnu.org (Eli Zaretskii)
Subject: Re: [patch] Remove BITS_BIG_ENDIAN from defs.h
Date: Mon, 14 Jan 2008 18:11:00 -0000	[thread overview]
Message-ID: <200801141811.m0EIBEFw007402@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <4787B2E1.9060809@de.ibm.com> from "Markus Deuling" at Jan 11, 2008 07:18:09 PM

Markus Deuling wrote:

> this patch removes BITS_BIG_ENDIAN from defs.h by replacing it with
> its expression. The way to recognize endianess of a target is
> gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG which is
> widely used by most files.  So this macro is unnecessary.

As Dan and Eli pointed out, there *is* a difference between the two:
- gdbarch_byte_order says whether in a multi-byte value, the least
  or most significant *byte* comes first
- BITS_BIG_ENDIAN is intended to say whether in a bitfield, the
  least of most significant *bit* comes first

Looking at GCC, there are targets with big endian byte order but
little endian bit order (or vice versa), even though those are 
not supported in GDB today (or maybe they are but bitfields simply
do not work correctly).

Thus I think we should introduce a new gdbarch property to allow
to set the bit order.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  parent reply	other threads:[~2008-01-14 18:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11 18:20 Markus Deuling
2008-01-11 19:24 ` Daniel Jacobowitz
2008-01-11 20:59 ` Eli Zaretskii
2008-01-14 18:11 ` Ulrich Weigand [this message]
2008-01-15  9:06   ` Markus Deuling
2008-01-15 21:01     ` Ulrich Weigand
2008-01-16  5:59       ` Markus Deuling
2008-01-16 18:43         ` Eli Zaretskii
2008-01-17  7:09           ` Markus Deuling
2008-01-18 16:21             ` Eli Zaretskii
2008-01-18 17:08               ` Markus Deuling

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=200801141811.m0EIBEFw007402@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=deuling@de.ibm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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