Implement cast fp -> bool

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-02-23 03:21:41 +00:00
parent 16865af5d5
commit 311ca2e51f
2 changed files with 8 additions and 4 deletions

View File

@ -1978,8 +1978,10 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
break;
}
case cFP:
assert(0 && "FIXME: implement cast FP to bool");
abort();
BMI(BB, IP, X86::FTST, 1).addReg(SrcReg);
BMI(BB, IP, X86::FNSTSWr8, 0);
BMI(BB, IP, X86::SAHF, 1);
break;
}
// If the zero flag is not set, then the value is true, set the byte to

View File

@ -1978,8 +1978,10 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
break;
}
case cFP:
assert(0 && "FIXME: implement cast FP to bool");
abort();
BMI(BB, IP, X86::FTST, 1).addReg(SrcReg);
BMI(BB, IP, X86::FNSTSWr8, 0);
BMI(BB, IP, X86::SAHF, 1);
break;
}
// If the zero flag is not set, then the value is true, set the byte to