[CAUTION] RE: RFR JDK-8209786: gcc 7.3 compiler errors

Schmidt, Lutz lutz.schmidt at sap.com
Wed Aug 22 15:50:05 UTC 2018


Hi Andrew, 
just recently I was confronted with a similar "shift issue" which prompted me to read the language standard (again). I have summarized my understanding in a little text file which you may find attached. Have fun reading!
Best Regards,
Lutz

On 22.08.18, 09:18, "s390x-port-dev on behalf of Lindenmaier, Goetz" <s390x-port-dev-bounces at openjdk.java.net on behalf of goetz.lindenmaier at sap.com> wrote:

    Hi Andrew, 
    
    please post this RFR to core-libs-dev.
    
    s390x-prot-dev is only for questions about the port etc.
    It is not for reviews that go to jdk/jdk. 
    
    Also, I'm not sure that your change in java.desktop is correct.
    You now negate after shifting.
    
    -      mlib_u64 emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8);
    +      mlib_u64 emask = (mlib_u64)-(((mlib_s64)1) >> ((8 - (size - i)) * 8));
    
    before, -1 >> 3 will result in something like 000111...111
    now -(1>>3) will result in 000....0000
    
    Best regards,
      Goetz.
    
    
    
    
    
    
    
    
    > -----Original Message-----
    > From: s390x-port-dev <s390x-port-dev-bounces at openjdk.java.net> On
    > Behalf Of Andrew Leonard
    > Sent: Dienstag, 21. August 2018 15:05
    > To: s390x-port-dev at openjdk.java.net
    > Subject: RFR JDK-8209786: gcc 7.3 compiler errors
    > 
    > Hi,
    > We have discovered issues with gcc 7.3 on zLinux, combined with OpenJDK's
    > default compiler options has highlighted a couple of native code issues,
    > with:
    >   - validating loop test array bounds
    >   - left shifts of negative values
    > I have created bug https://bugs.openjdk.java.net/browse/JDK-8209786
    > and attached the webrev fix here:
    > http://cr.openjdk.java.net/~aleonard/gcc73/webrev.00/
    > 
    > I'd like to request a sponsor for this fix please?
    > 
    > Many thanks
    > Andrew
    > 
    > Andrew Leonard
    > Java Runtimes Development
    > IBM Hursley
    > IBM United Kingdom Ltd
    > Phone internal: 245913, external: 01962 815913
    > internet email: andrew_m_leonard at uk.ibm.com
    > 
    > 
    > Unless stated otherwise above:
    > IBM United Kingdom Limited - Registered in England and Wales with number
    > 741598.
    > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
    > 3AU
    

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cppShiftOperations.txt
URL: <http://mail.openjdk.java.net/pipermail/s390x-port-dev/attachments/20180822/8ab41754/cppShiftOperations.txt>


More information about the s390x-port-dev mailing list