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:
|
||||
return local::getThunk(t, divideDoubleThunk);
|
||||
|
||||
case FloatRemainder:
|
||||
return local::getThunk(t, moduloDoubleThunk);
|
||||
|
||||
case JumpIfFloatEqual:
|
||||
case JumpIfFloatNotEqual:
|
||||
case JumpIfFloatLess:
|
||||
@ -894,13 +897,19 @@ class Context {
|
||||
switch (op) {
|
||||
case FloatAdd:
|
||||
return local::getThunk(t, addFloatThunk);
|
||||
|
||||
case FloatSubtract:
|
||||
return local::getThunk(t, subtractFloatThunk);
|
||||
|
||||
case FloatMultiply:
|
||||
return local::getThunk(t, multiplyFloatThunk);
|
||||
|
||||
case FloatDivide:
|
||||
return local::getThunk(t, divideFloatThunk);
|
||||
|
||||
case FloatRemainder:
|
||||
return local::getThunk(t, moduloFloatThunk);
|
||||
|
||||
case JumpIfFloatEqual:
|
||||
case JumpIfFloatNotEqual:
|
||||
case JumpIfFloatLess:
|
||||
|
@ -3109,6 +3109,10 @@ class MyArchitecture: public Assembler::Architecture {
|
||||
*thunk = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case FloatRemainder:
|
||||
*thunk = true;
|
||||
break;
|
||||
|
||||
case Multiply:
|
||||
if (BytesPerWord == 4 and aSize == 8) {
|
||||
|
@ -7,6 +7,9 @@ public class AllFloats {
|
||||
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(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 double add(double 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(5d, 2d) == 5d/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(5d, 4d) == 5f+4d);
|
||||
expect(add(5f, 4d) == 5f+4d);
|
||||
|
Loading…
Reference in New Issue
Block a user