Skip to content

Commit

Permalink
Fix value check
Browse files Browse the repository at this point in the history
MMX has the value 0x00090000, so any category with those two bits set
will match. Instead, we want to match the third nibble exactly.
  • Loading branch information
hainest committed Dec 20, 2023
1 parent 40475f8 commit 4737077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataflowAPI/src/liveness.C
Expand Up @@ -625,10 +625,10 @@ void LivenessAnalyzer::clean(Function *func){
bool LivenessAnalyzer::isMMX(MachRegister machReg){
auto const arch = machReg.getArchitecture();
if (arch == Arch_x86) {
return (machReg.val() & x86::MMX) == x86::MMX;
return (machReg.val() & 0x00ff0000) == x86::MMX;
}
if (arch == Arch_x86_64) {
return (machReg.val() & x86_64::MMX) == x86_64::MMX;
return (machReg.val() & 0x00ff0000) == x86_64::MMX;
}
return false;
}
Expand Down

0 comments on commit 4737077

Please sign in to comment.