mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
Fix PCI bit-test function unnecessary parens warnings.
This commit is contained in:
parent
11601ccb32
commit
fbbc5dacbf
1 changed files with 7 additions and 9 deletions
|
@ -131,29 +131,27 @@ Bool PCIBt(U8 reg RBX *bit_field, I64 reg RDX bit)
|
|||
{ // MOV-based Bt for use in PCI device memory-mapped IO areas. See $LK+PU,"Bt()",A="FF:::/Kernel/KernelB.HH,Bt("$.
|
||||
bit_field += bit / 8;
|
||||
bit &= 7;
|
||||
return (*bit_field & (1 << bit)) >> bit;
|
||||
return (*bit_field & 1 << bit) >> bit;
|
||||
}
|
||||
|
||||
Bool PCIBtr(U8 reg RDX *bit_field, I64 reg RBX bit)
|
||||
{ // MOV-based Btr for use in PCI device memory-mapped IO areas. See $LK+PU,"Btr()",A="FF:::/Kernel/KernelB.HH,Btr("$.
|
||||
U64 reg R9 chunk_mod = (bit & 31);
|
||||
U64 chunk_bit = 1 << chunk_mod;
|
||||
U64 reg R9 chunk_mod = bit & 31, chunk_bit = 1 << chunk_mod;
|
||||
bit_field(U32 *) += bit / 32;
|
||||
Bool reg R8 result = (*(bit_field(U32 *)) & chunk_bit) >> chunk_mod;
|
||||
Bool reg R8 result = (*bit_field(U32 *) & chunk_bit) >> chunk_mod;
|
||||
|
||||
*(bit_field(U32 *)) &= ~(chunk_bit);
|
||||
*bit_field(U32 *) &= ~chunk_bit;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Bool PCIBts(U8 reg RDX *bit_field, I64 reg RBX bit)
|
||||
{ // MOV-based Bts for use in PCI device memory-mapped IO areas. See $LK+PU,"Bts()",A="FF:::/Kernel/KernelB.HH,Bts("$.
|
||||
U64 reg R9 chunk_mod = (bit & 31);
|
||||
U64 chunk_bit = 1 << chunk_mod;
|
||||
U64 reg R9 chunk_mod = bit & 31, chunk_bit = 1 << chunk_mod;
|
||||
bit_field(U32 *) += bit / 32;
|
||||
Bool reg R8 result = (*(bit_field(U32 *)) & chunk_bit) >> chunk_mod;
|
||||
Bool reg R8 result = (*bit_field(U32 *) & chunk_bit) >> chunk_mod;
|
||||
|
||||
*(bit_field(U32 *)) |= chunk_bit;
|
||||
*bit_field(U32 *) |= chunk_bit;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue