/* * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ /* * @test * @bug 6431242 * @run main Test */ public class Test{ int _len = 8; int[] _arr_i = new int[_len]; long[] _arr_l = new long[_len]; int[] _arr_i_cp = new int [_len]; long[] _arr_l_cp = new long [_len]; int _k = 0x12345678; int _j = 0; int _ir = 0x78563412; int _ir1 = 0x78563413; int _ir2 = 0x79563412; long _m = 0x123456789abcdef0L; long _l = 0L; long _lr = 0xf0debc9a78563412L; long _lr1 = 0xf0debc9a78563413L; long _lr2 = 0xf1debc9a78563412L; void init() { for (int i=0; i<_arr_i.length; i++) { _arr_i[i] = _k; _arr_l[i] = _m; } } public int test_int_reversed(int i) { return Integer.reverseBytes(i); } public long test_long_reversed(long i) { return Long.reverseBytes(i); } public void test_copy_ints(int[] dst, int[] src) { for(int i=0; i