Fix getMSB function to only return 0 or 1
This commit is contained in:
parent
c2844ce0ec
commit
77cea8730a
@ -86,7 +86,7 @@ inline static dword getMSBPos(a64inst_regType regType) {
|
|||||||
|
|
||||||
// Returns the MSB of the given value assuming it's of the size stored in the given register type
|
// Returns the MSB of the given value assuming it's of the size stored in the given register type
|
||||||
inline static uint8_t getMSB(dword value, a64inst_regType regType) {
|
inline static uint8_t getMSB(dword value, a64inst_regType regType) {
|
||||||
return value >> getMSBPos(regType);
|
return (value >> getMSBPos(regType)) & 1u;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updates N and Z condition codes given the machine and a result value
|
// Updates N and Z condition codes given the machine and a result value
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user