@@ -1168,33 +1168,34 @@ inline int getMemoryOperandNo(uint64_t TSFlags) {
1168
1168
1169
1169
// / \returns true if the register is a XMM.
1170
1170
inline bool isXMMReg (unsigned RegNo) {
1171
- assert (X86::XMM15 - X86::XMM0 == 15 &&
1172
- " XMM0-15 registers are not continuous" );
1173
- assert (X86::XMM31 - X86::XMM16 == 15 &&
1174
- " XMM16-31 registers are not continuous" );
1171
+ static_assert (X86::XMM15 - X86::XMM0 == 15 ,
1172
+ " XMM0-15 registers are not continuous" );
1173
+ static_assert (X86::XMM31 - X86::XMM16 == 15 ,
1174
+ " XMM16-31 registers are not continuous" );
1175
1175
return (RegNo >= X86::XMM0 && RegNo <= X86::XMM15) ||
1176
1176
(RegNo >= X86::XMM16 && RegNo <= X86::XMM31);
1177
1177
}
1178
1178
1179
1179
// / \returns true if the register is a YMM.
1180
1180
inline bool isYMMReg (unsigned RegNo) {
1181
- assert (X86::YMM15 - X86::YMM0 == 15 &&
1182
- " YMM0-15 registers are not continuous" );
1183
- assert (X86::YMM31 - X86::YMM16 == 15 &&
1184
- " YMM16-31 registers are not continuous" );
1181
+ static_assert (X86::YMM15 - X86::YMM0 == 15 ,
1182
+ " YMM0-15 registers are not continuous" );
1183
+ static_assert (X86::YMM31 - X86::YMM16 == 15 ,
1184
+ " YMM16-31 registers are not continuous" );
1185
1185
return (RegNo >= X86::YMM0 && RegNo <= X86::YMM15) ||
1186
1186
(RegNo >= X86::YMM16 && RegNo <= X86::YMM31);
1187
1187
}
1188
1188
1189
1189
// / \returns true if the register is a ZMM.
1190
1190
inline bool isZMMReg (unsigned RegNo) {
1191
- assert (X86::ZMM31 - X86::ZMM0 == 31 && " ZMM registers are not continuous" );
1191
+ static_assert (X86::ZMM31 - X86::ZMM0 == 31 ,
1192
+ " ZMM registers are not continuous" );
1192
1193
return RegNo >= X86::ZMM0 && RegNo <= X86::ZMM31;
1193
1194
}
1194
1195
1195
1196
// / \returns true if \p RegNo is an apx extended register.
1196
1197
inline bool isApxExtendedReg (unsigned RegNo) {
1197
- assert (X86::R31WH - X86::R16 == 95 && " EGPRs are not continuous" );
1198
+ static_assert (X86::R31WH - X86::R16 == 95 , " EGPRs are not continuous" );
1198
1199
return RegNo >= X86::R16 && RegNo <= X86::R31WH;
1199
1200
}
1200
1201
0 commit comments