aboutsummaryrefslogtreecommitdiff
path: root/test/long_mode/regspec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'test/long_mode/regspec.rs')
-rw-r--r--test/long_mode/regspec.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/long_mode/regspec.rs b/test/long_mode/regspec.rs
index 914c376..e126ac3 100644
--- a/test/long_mode/regspec.rs
+++ b/test/long_mode/regspec.rs
@@ -20,3 +20,22 @@ fn test_labels() {
assert_eq!(RegSpec::gs().name(), "gs");
assert_eq!(RegSpec::al().name(), "al");
}
+
+#[test]
+fn test_bank_names() {
+ assert_eq!(RegSpec::al().class().name(), "byte");
+ assert_eq!(RegSpec::r8b().class().name(), "rex-byte");
+ assert_eq!(RegSpec::ax().class().name(), "word");
+ assert_eq!(RegSpec::eax().class().name(), "dword");
+ assert_eq!(RegSpec::rax().class().name(), "qword");
+ assert_eq!(RegSpec::fs().class().name(), "segment");
+ assert_eq!(RegSpec::eflags().class().name(), "eflags");
+ assert_eq!(RegSpec::rflags().class().name(), "rflags");
+ assert_eq!(RegSpec::eip().class().name(), "eip");
+ assert_eq!(RegSpec::rip().class().name(), "rip");
+ assert_eq!(RegSpec::st0().class().name(), "x87-stack");
+ assert_eq!(RegSpec::mm0().class().name(), "mmx");
+ assert_eq!(RegSpec::xmm0().class().name(), "xmm");
+ assert_eq!(RegSpec::ymm0().class().name(), "ymm");
+ assert_eq!(RegSpec::zmm0().class().name(), "zmm");
+}