[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/14] target/arm: Define syndrome function for MOPS exceptions
From: |
Peter Maydell |
Subject: |
[PATCH 06/14] target/arm: Define syndrome function for MOPS exceptions |
Date: |
Thu, 7 Sep 2023 17:03:32 +0100 |
The FEAT_MOPS memory operations can raise a Memory Copy or Memory Set
exception if a copy or set instruction is executed when the CPU
register state is not correct for that instruction. Define the
usual syn_* function that constructs the syndrome register value
for these exceptions.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/syndrome.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h
index 62254d0e518..e1b419358dd 100644
--- a/target/arm/syndrome.h
+++ b/target/arm/syndrome.h
@@ -57,6 +57,7 @@ enum arm_exception_class {
EC_DATAABORT = 0x24,
EC_DATAABORT_SAME_EL = 0x25,
EC_SPALIGNMENT = 0x26,
+ EC_MOP = 0x27,
EC_AA32_FPTRAP = 0x28,
EC_AA64_FPTRAP = 0x2c,
EC_SERROR = 0x2f,
@@ -327,4 +328,15 @@ static inline uint32_t syn_serror(uint32_t extra)
return (EC_SERROR << ARM_EL_EC_SHIFT) | ARM_EL_IL | extra;
}
+static inline uint32_t syn_mop(bool is_set, bool is_setg, int options,
+ bool epilogue, bool wrong_option, bool option_a,
+ int destreg, int srcreg, int sizereg)
+{
+ return (EC_MOP << ARM_EL_EC_SHIFT) | ARM_EL_IL |
+ (is_set << 24) | (is_setg << 23) | (options << 19) |
+ (epilogue << 18) | (wrong_option << 17) | (option_a << 16) |
+ (destreg << 10) | (srcreg << 5) | sizereg;
+}
+
+
#endif /* TARGET_ARM_SYNDROME_H */
--
2.34.1
- Re: [PATCH 02/14] target/arm: Don't skip MTE checks for LDRT/STRT at EL0, (continued)
- [PATCH 03/14] target/arm: Add ID_AA64ISAR2_EL1, Peter Maydell, 2023/09/07
- [PATCH 01/14] target/arm: Remove unused allocation_tag_mem() argument, Peter Maydell, 2023/09/07
- [PATCH 04/14] target/arm: Implement FEAT_MOPS enable bits, Peter Maydell, 2023/09/07
- [PATCH 05/14] target/arm: Pass unpriv bool to get_a64_user_mem_index(), Peter Maydell, 2023/09/07
- [PATCH 06/14] target/arm: Define syndrome function for MOPS exceptions,
Peter Maydell <=
- [PATCH 07/14] target/arm: New function allocation_tag_mem_probe(), Peter Maydell, 2023/09/07
- [PATCH 10/14] target/arm: Define new TB flag for ATA0, Peter Maydell, 2023/09/07
- [PATCH 08/14] target/arm: Implement MTE tag-checking functions for FEAT_MOPS, Peter Maydell, 2023/09/07
- [PATCH 11/14] target/arm: Implement the SETG* instructions, Peter Maydell, 2023/09/07