mirror of
https://github.com/corda/corda.git
synced 2025-01-19 11:16:54 +00:00
defer to helper thunk for frem and drem
This commit is contained in:
parent
95c3f37bfb
commit
3b4be3decd
@ -873,6 +873,9 @@ class Context {
|
|||||||
case FloatDivide:
|
case FloatDivide:
|
||||||
return local::getThunk(t, divideDoubleThunk);
|
return local::getThunk(t, divideDoubleThunk);
|
||||||
|
|
||||||
|
case FloatRemainder:
|
||||||
|
return local::getThunk(t, moduloDoubleThunk);
|
||||||
|
|
||||||
case JumpIfFloatEqual:
|
case JumpIfFloatEqual:
|
||||||
case JumpIfFloatNotEqual:
|
case JumpIfFloatNotEqual:
|
||||||
case JumpIfFloatLess:
|
case JumpIfFloatLess:
|
||||||
@ -894,13 +897,19 @@ class Context {
|
|||||||
switch (op) {
|
switch (op) {
|
||||||
case FloatAdd:
|
case FloatAdd:
|
||||||
return local::getThunk(t, addFloatThunk);
|
return local::getThunk(t, addFloatThunk);
|
||||||
|
|
||||||
case FloatSubtract:
|
case FloatSubtract:
|
||||||
return local::getThunk(t, subtractFloatThunk);
|
return local::getThunk(t, subtractFloatThunk);
|
||||||
|
|
||||||
case FloatMultiply:
|
case FloatMultiply:
|
||||||
return local::getThunk(t, multiplyFloatThunk);
|
return local::getThunk(t, multiplyFloatThunk);
|
||||||
|
|
||||||
case FloatDivide:
|
case FloatDivide:
|
||||||
return local::getThunk(t, divideFloatThunk);
|
return local::getThunk(t, divideFloatThunk);
|
||||||
|
|
||||||
|
case FloatRemainder:
|
||||||
|
return local::getThunk(t, moduloFloatThunk);
|
||||||
|
|
||||||
case JumpIfFloatEqual:
|
case JumpIfFloatEqual:
|
||||||
case JumpIfFloatNotEqual:
|
case JumpIfFloatNotEqual:
|
||||||
case JumpIfFloatLess:
|
case JumpIfFloatLess:
|
||||||
|
@ -3110,6 +3110,10 @@ class MyArchitecture: public Assembler::Architecture {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FloatRemainder:
|
||||||
|
*thunk = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case Multiply:
|
case Multiply:
|
||||||
if (BytesPerWord == 4 and aSize == 8) {
|
if (BytesPerWord == 4 and aSize == 8) {
|
||||||
const uint32_t mask = GeneralRegisterMask & ~((1 << rax) | (1 << rdx));
|
const uint32_t mask = GeneralRegisterMask & ~((1 << rax) | (1 << rdx));
|
||||||
|
@ -7,6 +7,9 @@ public class AllFloats {
|
|||||||
private static float divide(float a, float b) {return a / b;}
|
private static float divide(float a, float b) {return a / b;}
|
||||||
private static double divide(double a, double b) {return a / b;}
|
private static double divide(double a, double b) {return a / b;}
|
||||||
private static double divide(float a, double b) {return a / b;}
|
private static double divide(float a, double b) {return a / b;}
|
||||||
|
private static float remainder(float a, float b) {return a % b;}
|
||||||
|
private static double remainder(double a, double b) {return a % b;}
|
||||||
|
private static double remainder(float a, double b) {return a % b;}
|
||||||
private static float add(float a, float b) {return a + b;}
|
private static float add(float a, float b) {return a + b;}
|
||||||
private static double add(double a, double b) {return a + b;}
|
private static double add(double a, double b) {return a + b;}
|
||||||
private static double add(float a, double b) {return a + b;}
|
private static double add(float a, double b) {return a + b;}
|
||||||
@ -44,6 +47,9 @@ public class AllFloats {
|
|||||||
expect(divide(5f, 2f) == 5f/2f);
|
expect(divide(5f, 2f) == 5f/2f);
|
||||||
expect(divide(5d, 2d) == 5d/2d);
|
expect(divide(5d, 2d) == 5d/2d);
|
||||||
expect(divide(5f, 2d) == 5f/2d);
|
expect(divide(5f, 2d) == 5f/2d);
|
||||||
|
expect(remainder(5f, 2f) == 5f%2f);
|
||||||
|
expect(remainder(5d, 2d) == 5d%2d);
|
||||||
|
expect(remainder(5f, 2d) == 5f%2d);
|
||||||
expect(add(5f, 4f) == 5f+4f);
|
expect(add(5f, 4f) == 5f+4f);
|
||||||
expect(add(5d, 4d) == 5f+4d);
|
expect(add(5d, 4d) == 5f+4d);
|
||||||
expect(add(5f, 4d) == 5f+4d);
|
expect(add(5f, 4d) == 5f+4d);
|
||||||
|
Loading…
Reference in New Issue
Block a user