gdb/
[deliverable/binutils-gdb.git] / sim / ppc / e500_registers.h
index cd12ab5ec27e420bbfe5a2ccd7b756ed288f0dab..68966f0c2117022279cb16a310eba1e7bd6b255b 100644 (file)
@@ -1,6 +1,6 @@
 /* e500 registers, for PSIM, the PowerPC simulator.
 
-   Copyright 2003 Free Software Foundation, Inc.
+   Copyright 2003-2013 Free Software Foundation, Inc.
 
    Contributed by Red Hat Inc; developed under contract from Motorola.
    Written by matthew green <mrg@redhat.com>.
@@ -9,7 +9,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -18,9 +18,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* e500 accumulator.  */
 
@@ -79,5 +77,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.023661 seconds and 4 git commands to generate.