builtins.c (java_builtins): Use popcount* and bswap* builtins to implement bitCount...
authorRoger Sayle <roger@nextmovesoftware.com>
Tue, 31 May 2016 11:30:56 +0000 (11:30 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 31 May 2016 11:30:56 +0000 (11:30 +0000)
commita1293f402a25801d03a58312b06b65c33702c726
treee4795973441e52b0a0b748fb08728e4962eb277f
parent051154a1f6be0f597b7da235d6fe13463e7629be
builtins.c (java_builtins): Use popcount* and bswap* builtins to implement bitCount() and reverseBytes()...

2016-05-31  Roger Sayle  <roger@nextmovesoftware.com>

gcc/java:
* builtins.c (java_builtins): Use popcount* and bswap* builtins to
implement bitCount() and reverseBytes() methods in java.lang.Integer
and friends.
(initialize_builtins): Annotate math builtins with ECF_LEAF.  Call
define_builtin for the new popcount* and bswap* builtins.

libjava:
* testsuite/libjava.lang/BuiltinBitCount.java: New test case.
* testsuite/libjava.lang/BuiltinReverseBytes.java: Likewise.

From-SVN: r236919
gcc/java/ChangeLog
gcc/java/builtins.c
libjava/ChangeLog
libjava/testsuite/libjava.lang/BuiltinBitCount.jar [new file with mode: 0644]
libjava/testsuite/libjava.lang/BuiltinBitCount.java [new file with mode: 0644]
libjava/testsuite/libjava.lang/BuiltinBitCount.out [new file with mode: 0644]
libjava/testsuite/libjava.lang/BuiltinReverseBytes.jar [new file with mode: 0644]
libjava/testsuite/libjava.lang/BuiltinReverseBytes.java [new file with mode: 0644]
libjava/testsuite/libjava.lang/BuiltinReverseBytes.out [new file with mode: 0644]