Copyright updates for 2007.
[deliverable/binutils-gdb.git] / sim / ppc / e500_registers.h
index cd12ab5ec27e420bbfe5a2ccd7b756ed288f0dab..0e5126834aa5b663eaebdf51f6ab66e9ba0baa4d 100644 (file)
@@ -1,6 +1,6 @@
 /* e500 registers, for PSIM, the PowerPC simulator.
 
-   Copyright 2003 Free Software Foundation, Inc.
+   Copyright 2003, 2007 Free Software Foundation, Inc.
 
    Contributed by Red Hat Inc; developed under contract from Motorola.
    Written by matthew green <mrg@redhat.com>.
@@ -79,5 +79,8 @@ struct e500_regs {
 /* 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))
+/* 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))
This page took 0.024256 seconds and 4 git commands to generate.