src/hotspot/os_cpu/solaris_sparc/solaris_sparc.il
author darcy
Tue, 12 Nov 2019 10:45:23 -0800
changeset 59037 3d2575331a41
parent 47578 09c41c4913d9
permissions -rw-r--r--
8233940: Preview API tests for String methods should use ${jdk.version} as -source arg Reviewed-by: jlaskey, jlahoda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
//
46540
9c0aa7bc3fe3 8181785: Remove the experimental ClearFPUAtPark JVM Flag
eosterlund
parents: 29456
diff changeset
     2
// Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
// This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
// under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
// published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
// This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
// version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
// accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
// You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
// 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
//
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
// or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
// questions.
29456
cc1c5203e60d 7143664: Clean up OrderAccess implementations and usage
dholmes
parents: 22234
diff changeset
    22
//
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
  // Get the raw thread ID from %g7
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
       .inline  _raw_thread_id, 0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
       .register %g7,#scratch
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
       .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
       mov     %g7, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
       .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
       .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
7911
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    35
  // Support for jlong Atomic::load and Atomic::store on v9.
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    36
  //
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    37
  // void _Atomic_move_long_v9(volatile jlong* src, volatile jlong* dst)
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    38
  //
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    39
  // Arguments:
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    40
  //      src:  O0
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    41
  //      dest: O1
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    42
  //
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    43
  // Overwrites O2
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    44
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    45
        .inline _Atomic_move_long_v9,2
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    46
        .volatile
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    47
        ldx     [%o0], %o2
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    48
        stx     %o2, [%o1]
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    49
        .nonvolatile
be4352e4480c 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API
kvn
parents: 5547
diff changeset
    50
        .end
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  // Support for void Prefetch::read(void *loc, intx interval)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  // Prefetch for several reads.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
        .inline _Prefetch_read, 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
        prefetch [%o0+%o1], 0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  // Support for void Prefetch::write(void *loc, intx interval)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  // Prefetch for several writes.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
        .inline _Prefetch_write, 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
        prefetch [%o0+%o1], 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  // Support for void Copy::conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  // 32-bit
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
  //      from:  O0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  //      to:    O1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  //      count: O2 treated as signed
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
  // Clobbers:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  //      long_value: O2, O3
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  //      count:      O4
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  // if (from > to) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  //   while (--count >= 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  //     *to++ = *from++;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  //   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  // } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  //   while (--count >= 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  //     to[count] = from[count];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  //   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  // }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
        .inline _Copy_conjoint_jlongs_atomic, 3
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
        cmp     %o0, %o1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
        bleu    4f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
        sll     %o2, 3, %o4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
        ba      2f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
    1:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
        subcc   %o4, 8, %o4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
        std     %o2, [%o1]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
        add     %o0, 8, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
        add     %o1, 8, %o1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    2:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
        bge,a   1b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
        ldd     [%o0], %o2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
        ba      5f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
        nop
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    3:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
        std     %o2, [%o1+%o4]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
    4:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
        subcc   %o4, 8, %o4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
        bge,a   3b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
        ldd     [%o0+%o4], %o2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
    5:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
        .end