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,
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., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
#include "inferior.h"
*isfloat = 1;
return regno - tdep->ppc_fp0_regnum + FPR0;
}
- else if (regno == PC_REGNUM)
+ else if (regno == gdbarch_pc_regnum (current_gdbarch))
return IAR;
else if (regno == tdep->ppc_ps_regnum)
return MSR;
/* Fixed-point registers. */
else
{
- if (regno == SP_REGNUM)
+ if (regno == gdbarch_sp_regnum (current_gdbarch))
/* Execute one dummy instruction (which is a breakpoint) in inferior
process to give kernel a chance to do internal housekeeping.
Otherwise the following ptrace(2) calls will mess up user stack
fetch_register (regcache, tdep->ppc_fp0_regnum + regno);
/* Read special registers. */
- fetch_register (regcache, PC_REGNUM);
+ fetch_register (regcache, gdbarch_pc_regnum (current_gdbarch));
fetch_register (regcache, tdep->ppc_ps_regnum);
fetch_register (regcache, tdep->ppc_cr_regnum);
fetch_register (regcache, tdep->ppc_lr_regnum);
store_register (regcache, tdep->ppc_fp0_regnum + regno);
/* Write special registers. */
- store_register (regcache, PC_REGNUM);
+ store_register (regcache, gdbarch_pc_regnum (current_gdbarch));
store_register (regcache, tdep->ppc_ps_regnum);
store_register (regcache, tdep->ppc_cr_regnum);
store_register (regcache, tdep->ppc_lr_regnum);