< prev index next >

src/os_cpu/solaris_sparc/vm/solaris_sparc.il

Print this page


   1 //
   2 // Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
   3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 //
   5 // This code is free software; you can redistribute it and/or modify it
   6 // under the terms of the GNU General Public License version 2 only, as
   7 // published by the Free Software Foundation.
   8 //
   9 // This code is distributed in the hope that it will be useful, but WITHOUT
  10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 // version 2 for more details (a copy is included in the LICENSE file that
  13 // accompanied this code).
  14 //
  15 // You should have received a copy of the GNU General Public License version
  16 // 2 along with this work; if not, write to the Free Software Foundation,
  17 // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 //
  19 // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 // or visit www.oracle.com if you need additional information or have any
  21 // questions.
  22 //  


 200   //
 201   // Arguments:
 202   //      add_value: O0   (e.g., +1 or -1)
 203   //      dest:      O1
 204   //
 205   // Results:
 206   //     O0: the new value stored in dest
 207   //
 208   // Overwrites O3
 209 
 210         .inline _Atomic_add64, 2
 211         .volatile
 212     3:
 213         ldx     [%o1], %o2
 214         add     %o0, %o2, %o3
 215         casx    [%o1], %o2, %o3
 216         cmp     %o2, %o3
 217         bne     %xcc, 3b
 218          nop
 219         add     %o0, %o2, %o0
 220         .nonvolatile
 221         .end
 222 
 223 
 224   // Support for void OrderAccess::acquire()
 225   // The method is intentionally empty.  
 226   // It exists for the sole purpose of generating
 227   // a C/C++ sequence point over which the compiler won't 
 228   // reorder code.
 229 
 230         .inline _OrderAccess_acquire,0
 231         .volatile
 232         .nonvolatile
 233         .end
 234 
 235 
 236   // Support for void OrderAccess::fence()
 237 
 238         .inline _OrderAccess_fence,0
 239         .volatile
 240         membar  #StoreLoad
 241         .nonvolatile
 242         .end
 243 
 244 
 245   // Support for void Prefetch::read(void *loc, intx interval)
 246   //
 247   // Prefetch for several reads.
 248 
 249         .inline _Prefetch_read, 2
 250         .volatile
 251         prefetch [%o0+%o1], 0
 252         .nonvolatile
 253         .end
 254 
 255 
 256   // Support for void Prefetch::write(void *loc, intx interval)
 257   //
 258   // Prefetch for several writes.
 259 
 260         .inline _Prefetch_write, 2


   1 //
   2 // Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
   3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 //
   5 // This code is free software; you can redistribute it and/or modify it
   6 // under the terms of the GNU General Public License version 2 only, as
   7 // published by the Free Software Foundation.
   8 //
   9 // This code is distributed in the hope that it will be useful, but WITHOUT
  10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 // version 2 for more details (a copy is included in the LICENSE file that
  13 // accompanied this code).
  14 //
  15 // You should have received a copy of the GNU General Public License version
  16 // 2 along with this work; if not, write to the Free Software Foundation,
  17 // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 //
  19 // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 // or visit www.oracle.com if you need additional information or have any
  21 // questions.
  22 //


 200   //
 201   // Arguments:
 202   //      add_value: O0   (e.g., +1 or -1)
 203   //      dest:      O1
 204   //
 205   // Results:
 206   //     O0: the new value stored in dest
 207   //
 208   // Overwrites O3
 209 
 210         .inline _Atomic_add64, 2
 211         .volatile
 212     3:
 213         ldx     [%o1], %o2
 214         add     %o0, %o2, %o3
 215         casx    [%o1], %o2, %o3
 216         cmp     %o2, %o3
 217         bne     %xcc, 3b
 218          nop
 219         add     %o0, %o2, %o0





















 220         .nonvolatile
 221         .end
 222 
 223 
 224   // Support for void Prefetch::read(void *loc, intx interval)
 225   //
 226   // Prefetch for several reads.
 227 
 228         .inline _Prefetch_read, 2
 229         .volatile
 230         prefetch [%o0+%o1], 0
 231         .nonvolatile
 232         .end
 233 
 234 
 235   // Support for void Prefetch::write(void *loc, intx interval)
 236   //
 237   // Prefetch for several writes.
 238 
 239         .inline _Prefetch_write, 2


< prev index next >