aboutsummaryrefslogtreecommitdiff
path: root/src/target/arm.h
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2022-05-26 10:01:45 +0200
committerTomas Vanek <vanekt@fbl.cz>2022-08-14 12:02:38 +0000
commit8f299c6aec299f7231005a1ba7526ed2758414c3 (patch)
tree4e4906246e6fa6d8aec3eca7514bed54e7fa9df0 /src/target/arm.h
parentb76a7a82b20fcf265a7b211e6ef97b759a8cb714 (diff)
downloadriscv-openocd-8f299c6aec299f7231005a1ba7526ed2758414c3.zip
riscv-openocd-8f299c6aec299f7231005a1ba7526ed2758414c3.tar.gz
riscv-openocd-8f299c6aec299f7231005a1ba7526ed2758414c3.tar.bz2
target: consolidate existing target/algo common_magic
Unify common_magic type to unsigned int Move common_magic to be the first member of the struct Add unsigned specifier to xxx_COMMON_MAGIC #defines Change-Id: If961d33232698529514ba3720e04418baf6dc6fe Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6996 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/target/arm.h')
-rw-r--r--src/target/arm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/target/arm.h b/src/target/arm.h
index e264293..f262255 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -155,7 +155,7 @@ enum arm_vfp_version {
ARM_VFP_V3,
};
-#define ARM_COMMON_MAGIC 0x0A450A45
+#define ARM_COMMON_MAGIC 0x0A450A45U
/**
* Represents a generic ARM core, with standard application registers.
@@ -165,7 +165,8 @@ enum arm_vfp_version {
* registers as traditional ARM cores, and only support Thumb2 instructions.
*/
struct arm {
- int common_magic;
+ unsigned int common_magic;
+
struct reg_cache *core_cache;
/** Handle to the PC; valid in all core modes. */
@@ -252,7 +253,7 @@ static inline bool is_arm(struct arm *arm)
}
struct arm_algorithm {
- int common_magic;
+ unsigned int common_magic;
enum arm_mode core_mode;
enum arm_state core_state;