mcr/mrc interface work. Implemented for arm926ejs and arm720t. mcr/mrc commands added.

This commit is contained in:
Øyvind Harboe
2009-10-23 12:38:19 +02:00
parent 18aad44f71
commit 0a1356c9cc
6 changed files with 241 additions and 12 deletions

View File

@@ -5,6 +5,9 @@
* Copyright (C) 2008 by Spencer Oliver *
* spen@spen-soft.co.uk *
* *
* Copyright (C) 2009 by Øyvind Harboe *
* oyvind.harboe@zylin.com *
* *
* 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 *
@@ -315,4 +318,19 @@ extern int armv4_5_invalidate_core_regs(target_t *target);
*/
#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 */