From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: sim: fix concatenation of E500 high / low gpr halves
Date: Mon, 14 Jun 2004 20:06:00 -0000 [thread overview]
Message-ID: <vt2pt8129ei.fsf@zenia.home> (raw)
This fixes various failures in e500-regs.exp, in which the value
assigned to evfoo.v2_int32[0] is always read back as 0xffffffff when
evfoo.v2_int32[1] has its top bit set.
2004-06-14 Jim Blandy <jimb@redhat.com>
* e500_registers.h (EVR): Cast the 32-bit value of the GPR to an
unsigned type before or-ing it with a 64-bit value.
Index: sim/ppc/e500_registers.h
===================================================================
RCS file: /cvs/src/src/sim/ppc/e500_registers.h,v
retrieving revision 1.1
diff -c -p -r1.1 e500_registers.h
*** sim/ppc/e500_registers.h 22 Jun 2003 16:48:12 -0000 1.1
--- sim/ppc/e500_registers.h 14 Jun 2004 20:03:06 -0000
*************** struct e500_regs {
*** 79,83 ****
/* e500 register high bits */
#define GPRH(N) cpu_registers(processor)->e500.gprh[N]
! /* e500 unified vector register */
! #define EVR(N) ((((unsigned64)GPRH(N)) << 32) | GPR(N))
--- 79,86 ----
/* e500 register high bits */
#define GPRH(N) cpu_registers(processor)->e500.gprh[N]
! /* e500 unified vector register
! We need to cast the gpr value to an unsigned type so that it
! doesn't get sign-extended when it's or-ed with a 64-bit value; that
! would wipe out the upper 32 bits of the register's value. */
! #define EVR(N) ((((unsigned64)GPRH(N)) << 32) | (unsigned32) GPR(N))
next reply other threads:[~2004-06-14 20:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-14 20:06 Jim Blandy [this message]
2004-06-27 2:19 ` Andrew Cagney
2004-06-28 19:03 ` Jim Blandy
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=vt2pt8129ei.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=gdb-patches@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