mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
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:
parent
fff51bad06
commit
8a46ee92b4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user