diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2009-10-23 12:38:19 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2009-10-23 12:39:00 +0200 |
commit | 0a1356c9ccff42e2c41af3a3c0ae8b1330aa970b (patch) | |
tree | b769d296e2032240291978b4f8a035c97fd8183a /src/target/armv4_5.h | |
parent | 18aad44f7121a4fa76d53a4ae653b047cd9ad916 (diff) |
mcr/mrc interface work. Implemented for arm926ejs and arm720t. mcr/mrc commands added.
Diffstat (limited to 'src/target/armv4_5.h')
-rw-r--r-- | src/target/armv4_5.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h index 7ea3826a..80f28db3 100644 --- a/src/target/armv4_5.h +++ b/src/target/armv4_5.h @@ -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 */ |