@@ -7,6 +7,13 @@ using namespace mips;
77
88#define INVALID_EXPRID ((uint32_t )-1 )
99
10+ #define INVALID_OPERATION \
11+ default : \
12+ LogWarn (" Invalid operation" ); \
13+ il.AddInstruction(il.Unimplemented()); \
14+ return false
15+
16+
1017typedef enum {
1118 ZeroExtend,
1219 SignExtend,
@@ -508,6 +515,7 @@ ExprId GetConditionForInstruction(LowLevelILFunction& il, Instruction& instr, st
508515 case MIPS_BGEZ:
509516 case MIPS_BGEZL:
510517 case MIPS_BGEZAL:
518+ case MIPS_BGEZALL:
511519 return il.CompareSignedGreaterEqual (registerSize (op1), ReadILOperand (il, instr, 1 , registerSize (op1)), il.Const (registerSize (op1), 0 ));
512520 case MIPS_BGTZ:
513521 case MIPS_BGTZL:
@@ -518,6 +526,7 @@ ExprId GetConditionForInstruction(LowLevelILFunction& il, Instruction& instr, st
518526 case MIPS_BLTZ:
519527 case MIPS_BLTZL:
520528 case MIPS_BLTZAL:
529+ case MIPS_BLTZALL:
521530 return il.CompareSignedLessThan (registerSize (op1), ReadILOperand (il, instr, 1 , registerSize (op1)), il.Const (registerSize (op1), 0 ));
522531 case MIPS_BC1F:
523532 case MIPS_BC1FL:
@@ -1129,9 +1138,6 @@ bool GetLowLevelILForInstruction(Architecture* arch, uint64_t addr, LowLevelILFu
11291138 InstructionOperand& op4 = instr.operands [3 ];
11301139 LowLevelILLabel trueCode, falseCode, again;
11311140 size_t bytes = 4 ;
1132- bool max = false ;
1133- // size_t registerSize = addrSize;
1134- // std::function<size_t (*)(const InstructionOperand& op)>
11351141 bool signedFlag = false ;
11361142 ExtendType extendType = SignExtend;
11371143 bool saturate = false ;
@@ -4697,6 +4703,12 @@ bool GetLowLevelILForInstruction(Architecture* arch, uint64_t addr, LowLevelILFu
46974703 case MIPS_VFTOI15: shift = 15 ; break ;
46984704 case MIPS_VFTOI12: shift = 12 ; break ;
46994705 case MIPS_VFTOI4: shift = 4 ; break ;
4706+ default : shift = 0 ;
4707+ }
4708+ if (shift == 0 )
4709+ {
4710+ il.AddInstruction ((il.Unimplemented ()));
4711+ break ;
47004712 }
47014713 unsigned char dest = op1.reg ;
47024714 if (dest & (1 << 3 ))
@@ -4719,6 +4731,12 @@ bool GetLowLevelILForInstruction(Architecture* arch, uint64_t addr, LowLevelILFu
47194731 case MIPS_VITOF15: shift = 15 ; break ;
47204732 case MIPS_VITOF12: shift = 12 ; break ;
47214733 case MIPS_VITOF4: shift = 4 ; break ;
4734+ default : shift = 0 ;
4735+ }
4736+ if (shift == 0 )
4737+ {
4738+ il.AddInstruction ((il.Unimplemented ()));
4739+ break ;
47224740 }
47234741 unsigned char dest = op1.reg ;
47244742 if (dest & (1 << 3 ))
0 commit comments