RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Aug 25 09:33:09 UTC 2023


On Fri, 25 Aug 2023 07:54:51 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/foreign/abi/Binding.java line 717:
>> 
>>> 715:         public void interpret(Deque<Object> stack, StoreFunc storeFunc,
>>> 716:                               LoadFunc loadFunc, SegmentAllocator allocator) {
>>> 717:             if (shiftAmount > 0) {
>> 
>> Why do we assume we can only deal with ints or longs?
>
> I have inserted casts into `public Binding.Builder shiftLeft(int shiftAmount, Class<?> type)` (similar to other bindings). The VM handles integral types smaller than `int` like `int` and uses 4 Bytes for arithmetic operations.

Ah I see that now - it's done the binding "builder".

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15417#discussion_r1305426640


More information about the core-libs-dev mailing list