Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 22ce24e

Browse files
author
Sergey Andreenko
committed
add an additional assert for the future
1 parent f6b82fe commit 22ce24e

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/jit/codegenarm.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,11 @@ instruction CodeGen::genGetInsForOper(genTreeOps oper, var_types type)
627627
case GT_MUL:
628628
ins = INS_MUL;
629629
break;
630+
#if !defined(USE_HELPERS_FOR_INT_DIV)
630631
case GT_DIV:
631632
ins = INS_sdiv;
632633
break;
634+
#endif // !USE_HELPERS_FOR_INT_DIV
633635
case GT_LSH:
634636
ins = INS_SHIFT_LEFT_LOGICAL;
635637
break;
@@ -1090,6 +1092,10 @@ void CodeGen::genCodeForDivMod(GenTreeOp* tree)
10901092
// on float/double args.
10911093
noway_assert(tree->OperIs(GT_DIV) || !varTypeIsFloating(tree));
10921094

1095+
#if defined(USE_HELPERS_FOR_INT_DIV)
1096+
noway_assert(!varTypeIsIntOrI(tree));
1097+
#endif // USE_HELPERS_FOR_INT_DIV
1098+
10931099
var_types targetType = tree->TypeGet();
10941100
regNumber targetReg = tree->gtRegNum;
10951101
emitter* emit = getEmitter();

src/jit/emitarm.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,8 +2985,11 @@ void emitter::emitIns_R_R_R(instruction ins,
29852985
}
29862986
__fallthrough;
29872987

2988+
#if !defined(USE_HELPERS_FOR_INT_DIV)
29882989
case INS_sdiv:
29892990
case INS_udiv:
2991+
#endif // !USE_HELPERS_FOR_INT_DIV
2992+
29902993
assert(insDoesNotSetFlags(flags));
29912994
fmt = IF_T2_C5;
29922995
sf = INS_FLAGS_NOT_SET;

src/jit/lower.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4719,6 +4719,10 @@ GenTree* Lowering::LowerConstIntDivOrMod(GenTree* node)
47194719
const var_types type = divMod->TypeGet();
47204720
assert((type == TYP_INT) || (type == TYP_LONG));
47214721

4722+
#if defined(USE_HELPERS_FOR_INT_DIV)
4723+
unreached();
4724+
#endif // USE_HELPERS_FOR_INT_DIV
4725+
47224726
if (dividend->IsCnsIntOrI())
47234727
{
47244728
// We shouldn't see a divmod with constant operands here but if we do then it's likely

0 commit comments

Comments
 (0)