src/cpu/mips/vm/copy_mips.hpp

Tue, 31 May 2016 00:22:06 -0400

author
aoqi
date
Tue, 31 May 2016 00:22:06 -0400
changeset 16
3cedde979d75
parent 1
2d8a650513c2
child 198
297aaddc5fad
permissions
-rw-r--r--

[Code Reorganization] load_two_bytes_from_at_bcp -> get_2_byte_integer_at_bcp
remove useless MacroAssembler::store_two_byts_to_at_bcp
change MacroAssembler::load_two_bytes_from_at_bcp to InterpreterMacroAssembler::get_2_byte_integer_at_bcp
change MacroAssembler::get_4_byte_integer_at_bcp to InterpreterMacroAssembler::get_4_byte_integer_at_bcp

     1 /*
     2  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2015, 2016, Loongson Technology. All rights reserved.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     8  * published by the Free Software Foundation.
     9  *
    10  * This code is distributed in the hope that it will be useful, but WITHOUT
    11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    13  * version 2 for more details (a copy is included in the LICENSE file that
    14  * accompanied this code).
    15  *
    16  * You should have received a copy of the GNU General Public License version
    17  * 2 along with this work; if not, write to the Free Software Foundation,
    18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    19  *
    20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21  * or visit www.oracle.com if you need additional information or have any
    22  * questions.
    23  *
    24  */
    26 #ifndef CPU_MIPS_VM_COPY_MIPS_HPP
    27 #define CPU_MIPS_VM_COPY_MIPS_HPP
    29 // Inline functions for memory copy and fill.
    30 //
    31 // // Contains inline asm implementations
    32 #ifdef TARGET_OS_ARCH_linux_mips
    33 # include "copy_linux_mips.inline.hpp"
    34 #endif
    35 #ifdef TARGET_OS_ARCH_solaris_mips
    36 # include "copy_solaris_mips.inline.hpp"
    37 #endif
    38 #ifdef TARGET_OS_ARCH_windows_mips
    39 # include "copy_windows_mips.inline.hpp"
    40 #endif
    41 #ifdef TARGET_OS_ARCH_bsd_mips
    42 # include "copy_bsd_mips.inline.hpp"
    43 #endif
    44 // Inline functions for memory copy and fill.
    46 // Contains inline asm implementations
    48 static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) {
    49   juint* to = (juint*)tohw;
    50   count *= HeapWordSize / BytesPerInt;
    51   while (count-- > 0) {
    52     *to++ = value;
    53   }
    54 }
    56 static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) {
    57   pd_fill_to_words(tohw, count, value);
    58 }
    60 static void pd_fill_to_bytes(void* to, size_t count, jubyte value) {
    61   (void)memset(to, value, count);
    62 }
    64 static void pd_zero_to_words(HeapWord* tohw, size_t count) {
    65   pd_fill_to_words(tohw, count, 0);
    66 }
    68 static void pd_zero_to_bytes(void* to, size_t count) {
    69   (void)memset(to, 0, count);
    70 }
    72 #endif //CPU_MIPS_VM_COPY_MIPS_HPP

mercurial