use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromUnsignedLongTest method testMinusOne.
@Test
public void testMinusOne() {
LLVM80BitFloat val = LLVM80BitFloat.fromUnsignedLong(-1);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0x403e, 0xffffffffffffffffL);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromUnsignedLongTest method testMinusTwo.
@Test
public void testMinusTwo() {
LLVM80BitFloat val = LLVM80BitFloat.fromUnsignedLong(-2);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0x403e, 0xfffffffffffffffeL);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromUnsignedLongTest method testZero.
@Test
public void testZero() {
LLVM80BitFloat val = LLVM80BitFloat.fromUnsignedLong(0);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0, 0);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFromUnsignedLongTest method testMaxValue.
@Test
public void testMaxValue() {
LLVM80BitFloat val = LLVM80BitFloat.fromUnsignedLong(Long.MAX_VALUE);
LLVM80BitFloat expected = LLVM80BitFloat.fromRawValues(false, 0x403d, 0xfffffffffffffffeL);
assertEquals(expected, val);
}
use of com.oracle.truffle.llvm.runtime.floating.LLVM80BitFloat in project sulong by graalvm.
the class LLVM80BitFloatArrayLiteralNode method foreignWrite.
@Specialization
@ExplodeLoop
protected LLVMTruffleObject foreignWrite(VirtualFrame frame, LLVMTruffleObject addr, @Cached("create80BitFloatStore()") LLVM80BitFloatStoreNode write) {
LLVMTruffleObject currentPtr = addr;
for (int i = 0; i < values.length; i++) {
try {
LLVM80BitFloat currentValue = values[i].executeLLVM80BitFloat(frame);
write.executeWithTarget(addr, currentValue);
currentPtr = currentPtr.increment(stride);
} catch (UnexpectedResultException e) {
CompilerDirectives.transferToInterpreter();
throw new IllegalStateException(e);
}
}
return addr;
}
Aggregations