diff --git a/src/execute.c b/src/execute.c index 1f37999..428e661 100644 --- a/src/execute.c +++ b/src/execute.c @@ -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 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