src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp

Wed, 01 Dec 2010 18:26:32 -0500

author
ikrylov
date
Wed, 01 Dec 2010 18:26:32 -0500
changeset 2322
828eafbd85cc
parent 2314
f95d63e2154a
child 6876
710a3c8b516e
permissions
-rw-r--r--

6348631: remove the use of the HPI library from Hotspot
Summary: move functions from hpi library to hotspot, communicate with licensees and open source community, check jdk for dependency, file CCC request
Reviewed-by: coleenp, acorn, dsamersoff

never@1445 1 /*
stefank@2314 2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
never@1445 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
never@1445 4 *
never@1445 5 * This code is free software; you can redistribute it and/or modify it
never@1445 6 * under the terms of the GNU General Public License version 2 only, as
never@1445 7 * published by the Free Software Foundation.
never@1445 8 *
never@1445 9 * This code is distributed in the hope that it will be useful, but WITHOUT
never@1445 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
never@1445 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
never@1445 12 * version 2 for more details (a copy is included in the LICENSE file that
never@1445 13 * accompanied this code).
never@1445 14 *
never@1445 15 * You should have received a copy of the GNU General Public License version
never@1445 16 * 2 along with this work; if not, write to the Free Software Foundation,
never@1445 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
never@1445 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
never@1445 22 *
never@1445 23 */
never@1445 24
stefank@2314 25 #ifndef OS_CPU_LINUX_ZERO_VM_BYTES_LINUX_ZERO_INLINE_HPP
stefank@2314 26 #define OS_CPU_LINUX_ZERO_VM_BYTES_LINUX_ZERO_INLINE_HPP
stefank@2314 27
never@1445 28 // Efficient swapping of data bytes from Java byte
never@1445 29 // ordering to native byte ordering and vice versa.
never@1445 30
never@1445 31 #include <byteswap.h>
never@1445 32
never@1445 33 inline u2 Bytes::swap_u2(u2 x) {
never@1445 34 return bswap_16(x);
never@1445 35 }
never@1445 36
never@1445 37 inline u4 Bytes::swap_u4(u4 x) {
never@1445 38 return bswap_32(x);
never@1445 39 }
never@1445 40
never@1445 41 inline u8 Bytes::swap_u8(u8 x) {
never@1445 42 return bswap_64(x);
never@1445 43 }
stefank@2314 44
stefank@2314 45 #endif // OS_CPU_LINUX_ZERO_VM_BYTES_LINUX_ZERO_INLINE_HPP

mercurial