From d3e1eff9593501ff8677b9399e1f0625f415ec78 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 7 Dec 2023 23:53:44 +0000 Subject: deploy: b5aea3fb5fcce31599e3d7397d5413a934132231 --- src/juicebox_asm/reg.rs.html | 98 +++++++++----------------------------------- 1 file changed, 19 insertions(+), 79 deletions(-) (limited to 'src/juicebox_asm/reg.rs.html') diff --git a/src/juicebox_asm/reg.rs.html b/src/juicebox_asm/reg.rs.html index a511005..fe4b50c 100644 --- a/src/juicebox_asm/reg.rs.html +++ b/src/juicebox_asm/reg.rs.html @@ -302,36 +302,6 @@ 302 303 304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334
//! Definition of registers which are used as input operands for various instructions.
 
 /// Trait to interact with register operands.
@@ -489,27 +459,21 @@
             assert_eq!(r.idx(), idx);
 
             // Check REX.W bit.
-            assert_eq!(r.rexw(), false);
+            assert!(!r.rexw());
 
             // Check need REX byte.
-            let rex = match r {
-                r8l | r9l | r10l | r11l | r12l | r13l | r14l | r15l | spl | bpl | sil | dil => true,
-                _ => false,
-            };
+            let rex = matches!(
+                r,
+                r8l | r9l | r10l | r11l | r12l | r13l | r14l | r15l | spl | bpl | sil | dil
+            );
             assert_eq!(r.need_rex(), rex);
 
             // Check need SIB byte.
-            let sib = match r {
-                spl | r12l | ah => true,
-                _ => false,
-            };
+            let sib = matches!(r, spl | r12l | ah);
             assert_eq!(r.need_sib(), sib);
 
             // Check if is PC relative addressing.
-            let rel = match r {
-                bpl | r13l | ch => true,
-                _ => false,
-            };
+            let rel = matches!(r, bpl | r13l | ch);
             assert_eq!(r.is_pc_rel(), rel);
         }
     }
@@ -541,27 +505,18 @@
             assert_eq!(r.idx(), idx);
 
             // Check REX.W bit.
-            assert_eq!(r.rexw(), false);
+            assert!(!r.rexw());
 
             // Check need REX byte.
-            let rex = match r {
-                r8w | r9w | r10w | r11w | r12w | r13w | r14w | r15w => true,
-                _ => false,
-            };
+            let rex = matches!(r, r8w | r9w | r10w | r11w | r12w | r13w | r14w | r15w);
             assert_eq!(r.need_rex(), rex);
 
             // Check need SIB byte.
-            let sib = match r {
-                sp | r12w => true,
-                _ => false,
-            };
+            let sib = matches!(r, sp | r12w);
             assert_eq!(r.need_sib(), sib);
 
             // Check if is PC relative addressing.
-            let rel = match r {
-                bp | r13w => true,
-                _ => false,
-            };
+            let rel = matches!(r, bp | r13w);
             assert_eq!(r.is_pc_rel(), rel);
         }
     }
@@ -593,27 +548,18 @@
             assert_eq!(r.idx(), idx);
 
             // Check REX.W bit.
-            assert_eq!(r.rexw(), false);
+            assert!(!r.rexw());
 
             // Check need REX byte.
-            let rex = match r {
-                r8d | r9d | r10d | r11d | r12d | r13d | r14d | r15d => true,
-                _ => false,
-            };
+            let rex = matches!(r, r8d | r9d | r10d | r11d | r12d | r13d | r14d | r15d);
             assert_eq!(r.need_rex(), rex);
 
             // Check need SIB byte.
-            let sib = match r {
-                esp | r12d => true,
-                _ => false,
-            };
+            let sib = matches!(r, esp | r12d);
             assert_eq!(r.need_sib(), sib);
 
             // Check if is PC relative addressing.
-            let rel = match r {
-                ebp | r13d => true,
-                _ => false,
-            };
+            let rel = matches!(r, ebp | r13d);
             assert_eq!(r.is_pc_rel(), rel);
         }
     }
@@ -645,23 +591,17 @@
             assert_eq!(r.idx(), idx);
 
             // Check REX.W bit.
-            assert_eq!(r.rexw(), true);
+            assert!(r.rexw());
 
             // Check need REX byte.
-            assert_eq!(r.need_rex(), true);
+            assert!(r.need_rex());
 
             // Check need SIB byte.
-            let sib = match r {
-                rsp | r12 => true,
-                _ => false,
-            };
+            let sib = matches!(r, rsp | r12);
             assert_eq!(r.need_sib(), sib);
 
             // Check if is PC relative addressing.
-            let rel = match r {
-                rbp | r13 => true,
-                _ => false,
-            };
+            let rel = matches!(r, rbp | r13);
             assert_eq!(r.is_pc_rel(), rel);
         }
     }
-- 
cgit v1.2.3