< prev index next >

src/os_cpu/solaris_sparc/vm/solaris_sparc.il

Print this page
rev 13452 : imported patch Atomic_cmpxchg
rev 13453 : imported patch Atomic_add


  73         .end
  74 
  75 
  76   // Support for jlong Atomic::load and Atomic::store on v9.
  77   //
  78   // void _Atomic_move_long_v9(volatile jlong* src, volatile jlong* dst)
  79   //
  80   // Arguments:
  81   //      src:  O0
  82   //      dest: O1
  83   //
  84   // Overwrites O2
  85 
  86         .inline _Atomic_move_long_v9,2
  87         .volatile
  88         ldx     [%o0], %o2
  89         stx     %o2, [%o1]
  90         .nonvolatile
  91         .end
  92 
  93   // Support for jint Atomic::add(jint add_value, volatile jint* dest).
  94   //
  95   // Arguments:
  96   //      add_value: O0   (e.g., +1 or -1)
  97   //      dest:      O1
  98   //
  99   // Results:
 100   //     O0: the new value stored in dest
 101   //
 102   // Overwrites O3
 103 
 104         .inline _Atomic_add32, 2
 105         .volatile
 106     2:
 107         ld      [%o1], %o2
 108         add     %o0, %o2, %o3
 109         cas     [%o1], %o2, %o3
 110         cmp     %o2, %o3
 111         bne     2b
 112          nop
 113         add     %o0, %o2, %o0
 114         .nonvolatile
 115         .end
 116 
 117 
 118   // Support for intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest)
 119   //
 120   // 64-bit
 121   //
 122   // Arguments:
 123   //      add_value: O0   (e.g., +1 or -1)
 124   //      dest:      O1
 125   //
 126   // Results:
 127   //     O0: the new value stored in dest
 128   //
 129   // Overwrites O3
 130 
 131         .inline _Atomic_add64, 2
 132         .volatile
 133     3:
 134         ldx     [%o1], %o2
 135         add     %o0, %o2, %o3
 136         casx    [%o1], %o2, %o3
 137         cmp     %o2, %o3
 138         bne     %xcc, 3b
 139          nop
 140         add     %o0, %o2, %o0
 141         .nonvolatile
 142         .end
 143 
 144 
 145   // Support for void Prefetch::read(void *loc, intx interval)
 146   //
 147   // Prefetch for several reads.
 148 
 149         .inline _Prefetch_read, 2
 150         .volatile
 151         prefetch [%o0+%o1], 0
 152         .nonvolatile
 153         .end
 154 
 155 
 156   // Support for void Prefetch::write(void *loc, intx interval)
 157   //
 158   // Prefetch for several writes.
 159 
 160         .inline _Prefetch_write, 2
 161         .volatile
 162         prefetch [%o0+%o1], 2
 163         .nonvolatile
 164         .end




  73         .end
  74 
  75 
  76   // Support for jlong Atomic::load and Atomic::store on v9.
  77   //
  78   // void _Atomic_move_long_v9(volatile jlong* src, volatile jlong* dst)
  79   //
  80   // Arguments:
  81   //      src:  O0
  82   //      dest: O1
  83   //
  84   // Overwrites O2
  85 
  86         .inline _Atomic_move_long_v9,2
  87         .volatile
  88         ldx     [%o0], %o2
  89         stx     %o2, [%o1]
  90         .nonvolatile
  91         .end
  92 




















































  93   // Support for void Prefetch::read(void *loc, intx interval)
  94   //
  95   // Prefetch for several reads.
  96 
  97         .inline _Prefetch_read, 2
  98         .volatile
  99         prefetch [%o0+%o1], 0
 100         .nonvolatile
 101         .end
 102 
 103 
 104   // Support for void Prefetch::write(void *loc, intx interval)
 105   //
 106   // Prefetch for several writes.
 107 
 108         .inline _Prefetch_write, 2
 109         .volatile
 110         prefetch [%o0+%o1], 2
 111         .nonvolatile
 112         .end


< prev index next >