mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-26 23:10:32 +00:00
In x86: Fixed backward compatibility with C90 (#1969)
* In x86: fixed backward compatibility with C90 * Refact: define variables as empty, do calculations only after the check passed * Removed extra spaces
This commit is contained in:
parent
61cdc56159
commit
def06c3831
@ -133,13 +133,16 @@ const MCRegisterClass* MCRegisterInfo_getRegClass(const MCRegisterInfo *RI, unsi
|
||||
|
||||
bool MCRegisterClass_contains(const MCRegisterClass *c, unsigned Reg)
|
||||
{
|
||||
unsigned InByte = 0;
|
||||
unsigned Byte = 0;
|
||||
|
||||
// Make sure that MCRegisterInfo_getRegClass didn't return 0
|
||||
// (for calls to GETREGCLASS_CONTAIN0)
|
||||
if(!c)
|
||||
return false;
|
||||
|
||||
unsigned InByte = Reg % 8;
|
||||
unsigned Byte = Reg / 8;
|
||||
InByte = Reg % 8;
|
||||
Byte = Reg / 8;
|
||||
|
||||
if (Byte >= c->RegSetSize)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user