ARM: remove mrc_opcode(), use MRC() or MCR()

Get rid of mrc_opcode() in favor of ARMV4_5_MRC() or, where
arm*20t should have used it, ARMV4_5_MCR() instead.

Basically, *writing* coprocessor registers shouldn't have
used the *read* opcode ... and both should stick to standard
opcode constructors, not rearranging parameter sequence any
more than already needed.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
David Brownell
2009-12-07 14:54:12 -08:00
parent 7936ab16da
commit 7b0314c377
3 changed files with 32 additions and 20 deletions

View File

@@ -379,16 +379,4 @@ extern struct reg arm_gdb_dummy_fps_reg;
*/
#define ARMV5_T_BKPT(Im) ((0xbe00 | Im) | ((0xbe00 | Im) << 16))
/* build basic mrc/mcr opcode */
static inline uint32_t mrc_opcode(int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm)
{
uint32_t t = 0;
t|=op1<<21;
t|=op2<<5;
t|=CRn<<16;
t|=CRm<<0;
return t;
}
#endif /* ARMV4_5_H */