3 ms·
Interestingly, you don't need to add a "full set" of bytecodes for unsigned arithmetic support - just four (udiv, ludiv, urem, lurem). All the other arithmetic
by jbri 15y ago
Interestingly, you don't need to add a "full set" of bytecodes for unsigned arithmetic support - just four (udiv, ludiv, urem, lurem). All the other arithmetic operations are bit-identical with the existing signed versions.
It's also worth noting that existing Jazelle implementations don't do everything in hardware, they already call into a software piece to handle any opcodes they come across that they don't interpret natively. So improving those to handle new opcodes is just a software upgrade, same as anything else.
- zbowling 15y agoThe biggest issue with adding those op code is the lack of space for every op code to support between every type IIRC. every new type exponentially increases the number of operations. Being that we can only 255 op code in Java, it causes a bit of a problem. In CIL/MSIL in .NET, they used a multibyte technique with flag bits IIRC. (Don't quote me but I'm recalling designs I seen 8 years ago here).