hotspot/src/os_cpu/solaris_sparc/vm/solaris_sparc.il
author trims
Thu, 27 May 2010 19:08:38 -0700
changeset 5547 f4b087cbb361
parent 1 489c9b5090e2
child 7911 be4352e4480c
permissions -rw-r--r--
6941466: Oracle rebranding changes for Hotspot repositories Summary: Change all the Sun copyrights to Oracle copyright Reviewed-by: ohair
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
//
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
     2
// Copyright (c) 2002, 2005, 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.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
//  
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
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
  // Clear SPARC fprs.FEF DU and DL bits --
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
  // allows the kernel to avoid saving FPU state at context-switch time.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
  // Use for state-transition points (into _thread_blocked) or when
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  // parking. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
      
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
       .inline _mark_fpu_nosave, 0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
       .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
       wr   %g0, 0, %fprs       
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
       .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
       .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  // Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  //      exchange_value: O0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  //      dest:           O1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  // Results:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  //     O0: the value previously stored in dest
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
        .inline _Atomic_swap32, 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
        swap    [%o1],%o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  // Support for intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t * dest).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  // 64-bit
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  //      exchange_value: O0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  //      dest:           O1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  // Results:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  //     O0: the value previously stored in dest
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
        .inline _Atomic_swap64, 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    1:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
        mov     %o0, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
        ldx     [%o1], %o2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
        casx    [%o1], %o2, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
        cmp     %o2, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
        bne     %xcc, 1b
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
         nop
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
        mov     %o2, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  // Support for jint Atomic::cmpxchg(jint           exchange_value,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  //                                  volatile jint* dest, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  //                                  jint           compare_value)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  //      exchange_value: O0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  //      dest:           O1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  //      compare_value:  O2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  // Results:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  //     O0: the value previously stored in dest
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
        .inline _Atomic_cas32, 3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
        cas     [%o1], %o2, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  // Support for intptr_t Atomic::cmpxchg_ptr(intptr_t           exchange_value, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  //                                          volatile intptr_t* dest, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  //                                          intptr_t           compare_value)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  // 64-bit
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  //      exchange_value: O0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  //      dest:           O1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  //      compare_value:  O2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  // Results:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  //     O0: the value previously stored in dest
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
        .inline _Atomic_cas64, 3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
        casx    [%o1], %o2, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  // Support for jlong Atomic::cmpxchg(jlong           exchange_value, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  //                                   volatile jlong* dest, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
  //                                   jlong           compare_value)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  // 32-bit calling conventions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  //      exchange_value: O1:O0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  //      dest:           O2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  //      compare_value:  O4:O3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  // Results:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  //     O1:O0: the value previously stored in dest
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
        .inline _Atomic_casl, 3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
        sllx    %o0, 32, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
        srl     %o1, 0, %o1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
        or      %o0,%o1,%o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
        sllx    %o3, 32, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
        srl     %o4, 0, %o4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
        or      %o3,%o4,%o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
        casx    [%o2], %o3, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
        srl     %o0, 0, %o1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
        srlx    %o0, 32, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  // Support for jint Atomic::add(jint add_value, volatile jint* dest).
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  //      add_value: O0   (e.g., +1 or -1)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  //      dest:      O1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  // Results:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
  //     O0: the new value stored in dest
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  // Overwrites O3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
        .inline _Atomic_add32, 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
    2:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
        ld      [%o1], %o2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
        add     %o0, %o2, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
        cas     [%o1], %o2, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
        cmp     %o2, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
        bne     2b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
         nop
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
        add     %o0, %o2, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  // Support for intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  // 64-bit
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  //      add_value: O0   (e.g., +1 or -1)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  //      dest:      O1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  // Results:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  //     O0: the new value stored in dest
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  // Overwrites O3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
        .inline _Atomic_add64, 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
    3:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
        ldx     [%o1], %o2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
        add     %o0, %o2, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
        casx    [%o1], %o2, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
        cmp     %o2, %o3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
        bne     %xcc, 3b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
         nop
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
        add     %o0, %o2, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  // Support for void OrderAccess::acquire()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  // The method is intentionally empty.  
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  // It exists for the sole purpose of generating
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  // a C/C++ sequence point over which the compiler won't 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  // reorder code.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
        .inline _OrderAccess_acquire,0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  // Support for void OrderAccess::fence()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
        .inline _OrderAccess_fence,0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
        membar  #StoreLoad
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
  // Support for void Prefetch::read(void *loc, intx interval)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
  // Prefetch for several reads.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
        .inline _Prefetch_read, 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
        prefetch [%o0+%o1], 0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  // Support for void Prefetch::write(void *loc, intx interval)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
  // Prefetch for several writes.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
        .inline _Prefetch_write, 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
        prefetch [%o0+%o1], 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
        .end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
  // Support for void Copy::conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
  // 32-bit
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
  // Arguments:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
  //      from:  O0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
  //      to:    O1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  //      count: O2 treated as signed
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
  // Clobbers:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
  //      long_value: O2, O3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
  //      count:      O4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
  // if (from > to) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
  //   while (--count >= 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
  //     *to++ = *from++;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
  //   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
  // } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
  //   while (--count >= 0) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
  //     to[count] = from[count];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
  //   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
  // }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
        .inline _Copy_conjoint_jlongs_atomic, 3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
        .volatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
        cmp     %o0, %o1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
        bleu    4f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
        sll     %o2, 3, %o4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
        ba      2f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
    1:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
        subcc   %o4, 8, %o4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
        std     %o2, [%o1]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
        add     %o0, 8, %o0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
        add     %o1, 8, %o1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
    2:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
        bge,a   1b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
        ldd     [%o0], %o2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
        ba      5f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
        nop
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
    3:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
        std     %o2, [%o1+%o4]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
    4:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
        subcc   %o4, 8, %o4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
        bge,a   3b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
        ldd     [%o0+%o4], %o2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
    5:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
        .nonvolatile
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
        .end