From adb8c4dd33c532a89f477e6f21dde39cfb899604 Mon Sep 17 00:00:00 2001 From: TomAwezome Date: Thu, 20 Oct 2022 02:54:27 -0400 Subject: [PATCH] Optimize Bt temporary replacement. --- src/Kernel/KernelB.HH | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 src/Kernel/KernelB.HH diff --git a/src/Kernel/KernelB.HH b/src/Kernel/KernelB.HH old mode 100755 new mode 100644 index f50ccbd1..3f477566 --- a/src/Kernel/KernelB.HH +++ b/src/Kernel/KernelB.HH @@ -19,11 +19,11 @@ public _intern IC_BTC Bool Btc( U8 *bit_field, I64 bit); //Bit test and co // caused strange crashes on a Ryzen with Gigabyte brand motherboard, all PCI devices AMD brand. // Bit test compiler implementation needs to be researched to fix those bugs.) -Bool Bt(U8 reg RBX *bit_field, I64 reg RCX bit) +Bool Bt(U8 reg RBX *bit_field, I64 reg RDX bit) { bit_field += bit / 8; - U64 reg RDX bit_mod = (bit & 7); - return (*bit_field & (1 << bit_mod)) >> bit_mod; + bit &= 7; + return (*bit_field & (1 << bit)) >> bit; } Bool Btr(U8 reg RDX *bit_field, I64 reg RBX bit)