Implement VCMP

This commit is contained in:
MerryMage
2016-11-26 11:17:16 +00:00
parent f2fe376fc6
commit e166965f3e
9 changed files with 131 additions and 2 deletions

View File

@@ -414,6 +414,16 @@ Value IREmitter::FPAdd64(const Value& a, const Value& b, bool fpscr_controlled)
return Inst(Opcode::FPAdd64, {a, b});
}
void IREmitter::FPCompare32(const Value& a, const Value& b, bool quiet, bool fpscr_controlled) {
ASSERT(fpscr_controlled);
Inst(Opcode::FPCompare32, {a, b, Imm1(quiet)});
}
void IREmitter::FPCompare64(const Value& a, const Value& b, bool quiet, bool fpscr_controlled) {
ASSERT(fpscr_controlled);
Inst(Opcode::FPCompare64, {a, b, Imm1(quiet)});
}
Value IREmitter::FPDiv32(const Value& a, const Value& b, bool fpscr_controlled) {
ASSERT(fpscr_controlled);
return Inst(Opcode::FPDiv32, {a, b});

View File

@@ -145,6 +145,8 @@ public:
Value FPAbs64(const Value& a);
Value FPAdd32(const Value& a, const Value& b, bool fpscr_controlled);
Value FPAdd64(const Value& a, const Value& b, bool fpscr_controlled);
void FPCompare32(const Value& a, const Value& b, bool quiet, bool fpscr_controlled);
void FPCompare64(const Value& a, const Value& b, bool quiet, bool fpscr_controlled);
Value FPDiv32(const Value& a, const Value& b, bool fpscr_controlled);
Value FPDiv64(const Value& a, const Value& b, bool fpscr_controlled);
Value FPMul32(const Value& a, const Value& b, bool fpscr_controlled);

View File

@@ -156,6 +156,8 @@ bool Inst::ReadsFromFPSCR() const {
case Opcode::FPAbs64:
case Opcode::FPAdd32:
case Opcode::FPAdd64:
case Opcode::FPCompare32:
case Opcode::FPCompare64:
case Opcode::FPDiv32:
case Opcode::FPDiv64:
case Opcode::FPMul32:
@@ -181,6 +183,8 @@ bool Inst::WritesToFPSCR() const {
case Opcode::FPAbs64:
case Opcode::FPAdd32:
case Opcode::FPAdd64:
case Opcode::FPCompare32:
case Opcode::FPCompare64:
case Opcode::FPDiv32:
case Opcode::FPDiv64:
case Opcode::FPMul32:

View File

@@ -95,6 +95,8 @@ OPCODE(FPAbs32, T::F32, T::F32
OPCODE(FPAbs64, T::F64, T::F64 )
OPCODE(FPAdd32, T::F32, T::F32, T::F32 )
OPCODE(FPAdd64, T::F64, T::F64, T::F64 )
OPCODE(FPCompare32, T::Void, T::F32, T::F32, T::U1 )
OPCODE(FPCompare64, T::Void, T::F64, T::F64, T::U1 )
OPCODE(FPDiv32, T::F32, T::F32, T::F32 )
OPCODE(FPDiv64, T::F64, T::F64, T::F64 )
OPCODE(FPMul32, T::F32, T::F32, T::F32 )