use thunks for integer division on PowerPC

PowerPC doesn't generate traps for divides-by-zero, so we defer to
thunks which do explicit checks.
This commit is contained in:
Joel Dice 2011-01-30 14:28:02 -07:00
parent fff51bad06
commit 8a46ee92b4

View File

@ -2158,7 +2158,13 @@ class MyArchitecture: public Assembler::Architecture {
case Divide:
case Remainder:
if (BytesPerWord == 4 and aSize == 8) {
// todo: we shouldn't need to defer to thunks for integers which
// are smaller than or equal to tne native word size, but
// PowerPC doesn't generate traps for divide by zero, so we'd
// need to do the checks ourselves. Using an inline check
// should be faster than calling an out-of-line thunk, but the
// thunk is easier, so they's what we do for now.
if (true) {//if (BytesPerWord == 4 and aSize == 8) {
*thunk = true;
} else {
*aTypeMask = (1 << RegisterOperand);