X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Farm%2Farmcopro.c;h=4c5da245e091fb64abe16aee46e269f73d451382;hb=00923338dec84505addaf9cdeca2e9c844757824;hp=b97478948696c5b86f8b33484a2e5248f9f7c15a;hpb=f603c8fe448b391b8356fae23c3a0e6242fa76b5;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/arm/armcopro.c b/sim/arm/armcopro.c index b974789486..4c5da245e0 100644 --- a/sim/arm/armcopro.c +++ b/sim/arm/armcopro.c @@ -3,7 +3,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, @@ -12,13 +12,13 @@ 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 . */ #include "armdefs.h" #include "armos.h" #include "armemu.h" #include "ansidecl.h" +#include "iwmmxt.h" /* Dummy Co-processors. */ @@ -85,6 +85,8 @@ XScale_cp15_init (ARMul_State * state ATTRIBUTE_UNUSED) /* Initialise the ARM Control Register. */ XScale_cp15_opcode_2_is_0_Regs[1] = 0x00000078; + + return TRUE; } /* Check an access to a register. */ @@ -370,34 +372,6 @@ read_cp15_reg (unsigned reg, unsigned opcode_2, unsigned CRm) return 0; } -static unsigned -XScale_cp15_LDC (ARMul_State * state, unsigned type, ARMword instr, ARMword data) -{ - unsigned reg = BITS (12, 15); - unsigned result; - - result = check_cp15_access (state, reg, 0, 0, 0); - - if (result == ARMul_DONE && type == ARMul_DATA) - write_cp15_reg (state, reg, 0, 0, data); - - return result; -} - -static unsigned -XScale_cp15_STC (ARMul_State * state, unsigned type, ARMword instr, ARMword * data) -{ - unsigned reg = BITS (12, 15); - unsigned result; - - result = check_cp15_access (state, reg, 0, 0, 0); - - if (result == ARMul_DONE && type == ARMul_DATA) - * data = read_cp15_reg (reg, 0, 0); - - return result; -} - static unsigned XScale_cp15_MRC (ARMul_State * state, unsigned type ATTRIBUTE_UNUSED, @@ -582,6 +556,8 @@ XScale_cp13_init (ARMul_State * state ATTRIBUTE_UNUSED) XScale_cp13_CR0_Regs[i] = 0; XScale_cp13_CR1_Regs[i] = 0; } + + return TRUE; } /* Check an access to a register. */ @@ -812,6 +788,8 @@ XScale_cp14_init (ARMul_State * state ATTRIBUTE_UNUSED) for (i = 16; i--;) XScale_cp14_Regs[i] = 0; + + return TRUE; } /* Check an access to a register. */ @@ -1365,6 +1343,15 @@ ARMul_CoProInit (ARMul_State * state) MMUMRC, MMUMCR, NULL, MMURead, MMUWrite); } + if (state->is_iWMMXt) + { + ARMul_CoProAttach (state, 0, NULL, NULL, IwmmxtLDC, IwmmxtSTC, + NULL, NULL, IwmmxtCDP, NULL, NULL); + + ARMul_CoProAttach (state, 1, NULL, NULL, NULL, NULL, + IwmmxtMRC, IwmmxtMCR, IwmmxtCDP, NULL, NULL); + } + /* No handlers below here. */ /* Call all the initialisation routines. */