File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -1873,13 +1873,9 @@ class X86MCPlusBuilder : public MCPlusBuilder {
1873
1873
NewOpcode = Check.second ;
1874
1874
if (Check.first == NOCHECK)
1875
1875
break ;
1876
- if (Check.first == CHECK8 &&
1877
- ImmVal >= std::numeric_limits<int8_t >::min () &&
1878
- ImmVal <= std::numeric_limits<int8_t >::max ())
1876
+ if (Check.first == CHECK8 && isInt<8 >(ImmVal))
1879
1877
break ;
1880
- if (Check.first == CHECK32 &&
1881
- ImmVal >= std::numeric_limits<int32_t >::min () &&
1882
- ImmVal <= std::numeric_limits<int32_t >::max ())
1878
+ if (Check.first == CHECK32 && isInt<32 >(ImmVal))
1883
1879
break ;
1884
1880
}
1885
1881
if (NewOpcode == Inst.getOpcode ())
@@ -3012,12 +3008,9 @@ class X86MCPlusBuilder : public MCPlusBuilder {
3012
3008
NewOpcode = Check.second ;
3013
3009
if (Check.first == NOCHECK)
3014
3010
break ;
3015
- if (Check.first == CHECK8 && Imm >= std::numeric_limits<int8_t >::min () &&
3016
- Imm <= std::numeric_limits<int8_t >::max ())
3011
+ if (Check.first == CHECK8 && isInt<8 >(Imm))
3017
3012
break ;
3018
- if (Check.first == CHECK32 &&
3019
- Imm >= std::numeric_limits<int32_t >::min () &&
3020
- Imm <= std::numeric_limits<int32_t >::max ())
3013
+ if (Check.first == CHECK32 && isInt<32 >(Imm))
3021
3014
break ;
3022
3015
}
3023
3016
if (NewOpcode == Inst.getOpcode ())
You can’t perform that action at this time.
0 commit comments