target/m68k: add chk and chk2

chk and chk2 compare a value to boundaries, and
trigger a CHK exception if the value is out of bounds.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180104012913.30763-8-laurent@vivier.eu>
This commit is contained in:
Laurent Vivier 2018-01-04 02:29:03 +01:00
parent d2f8fb8e7f
commit 8bf6cbaf39
6 changed files with 150 additions and 1 deletions

View file

@ -305,6 +305,7 @@ enum m68k_features {
M68K_FEATURE_CAS,
M68K_FEATURE_BKPT,
M68K_FEATURE_RTD,
M68K_FEATURE_CHK2,
};
static inline int m68k_feature(CPUM68KState *env, int feature)