Mon, 09 Mar 2009 13:28:46 -0700
6814575: Update copyright year
Summary: Update copyright for files that have been modified in 2009, up to 03/09
Reviewed-by: katleman, tbell, ohair
duke@435 | 1 | // |
xdono@1014 | 2 | // Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. |
duke@435 | 3 | // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | // |
duke@435 | 5 | // This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | // under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | // published by the Free Software Foundation. |
duke@435 | 8 | // |
duke@435 | 9 | // This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | // version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | // accompanied this code). |
duke@435 | 14 | // |
duke@435 | 15 | // You should have received a copy of the GNU General Public License version |
duke@435 | 16 | // 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | // |
duke@435 | 19 | // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
duke@435 | 20 | // CA 95054 USA or visit www.sun.com if you need additional information or |
duke@435 | 21 | // have any questions. |
duke@435 | 22 | // |
duke@435 | 23 | // |
duke@435 | 24 | |
duke@435 | 25 | |
duke@435 | 26 | // Support for u8 os::setup_fpu() |
duke@435 | 27 | .inline _solaris_raw_setup_fpu,1 |
duke@435 | 28 | movl 0(%esp), %eax |
duke@435 | 29 | fldcw (%eax) |
duke@435 | 30 | .end |
duke@435 | 31 | |
duke@435 | 32 | // The argument size of each inline directive is ignored by the compiler |
duke@435 | 33 | // and is set to 0 for compatibility reason. |
duke@435 | 34 | |
duke@435 | 35 | // Get the raw thread ID from %gs:0 |
duke@435 | 36 | .inline _raw_thread_id,0 |
duke@435 | 37 | movl %gs:0, %eax |
duke@435 | 38 | .end |
duke@435 | 39 | |
coleenp@907 | 40 | // Get current fp |
coleenp@907 | 41 | .inline _get_current_fp,0 |
coleenp@907 | 42 | .volatile |
duke@435 | 43 | movl %ebp, %eax |
duke@435 | 44 | .end |
duke@435 | 45 | |
duke@435 | 46 | // Support for jint Atomic::add(jint inc, volatile jint* dest) |
duke@435 | 47 | // An additional bool (os::is_MP()) is passed as the last argument. |
duke@435 | 48 | .inline _Atomic_add,3 |
duke@435 | 49 | movl 0(%esp), %eax // inc |
duke@435 | 50 | movl 4(%esp), %edx // dest |
duke@435 | 51 | movl %eax, %ecx |
duke@435 | 52 | cmpl $0, 8(%esp) // MP test |
duke@435 | 53 | je 1f |
duke@435 | 54 | lock |
duke@435 | 55 | 1: xaddl %eax, (%edx) |
duke@435 | 56 | addl %ecx, %eax |
duke@435 | 57 | .end |
duke@435 | 58 | |
duke@435 | 59 | // Support for jint Atomic::xchg(jint exchange_value, volatile jint* dest). |
duke@435 | 60 | .inline _Atomic_xchg,2 |
duke@435 | 61 | movl 0(%esp), %eax // exchange_value |
duke@435 | 62 | movl 4(%esp), %ecx // dest |
duke@435 | 63 | xchgl (%ecx), %eax |
duke@435 | 64 | .end |
duke@435 | 65 | |
duke@435 | 66 | // Support for jint Atomic::cmpxchg(jint exchange_value, |
duke@435 | 67 | // volatile jint *dest, |
duke@435 | 68 | // jint compare_value) |
duke@435 | 69 | // An additional bool (os::is_MP()) is passed as the last argument. |
duke@435 | 70 | .inline _Atomic_cmpxchg,4 |
duke@435 | 71 | movl 8(%esp), %eax // compare_value |
duke@435 | 72 | movl 0(%esp), %ecx // exchange_value |
duke@435 | 73 | movl 4(%esp), %edx // dest |
duke@435 | 74 | cmp $0, 12(%esp) // MP test |
duke@435 | 75 | je 1f |
duke@435 | 76 | lock |
duke@435 | 77 | 1: cmpxchgl %ecx, (%edx) |
duke@435 | 78 | .end |
duke@435 | 79 | |
duke@435 | 80 | // Support for jlong Atomic::cmpxchg(jlong exchange_value, |
duke@435 | 81 | // volatile jlong* dest, |
duke@435 | 82 | // jlong compare_value) |
duke@435 | 83 | // An additional bool (os::is_MP()) is passed as the last argument. |
duke@435 | 84 | .inline _Atomic_cmpxchg_long,6 |
duke@435 | 85 | pushl %ebx |
duke@435 | 86 | pushl %edi |
duke@435 | 87 | movl 20(%esp), %eax // compare_value (low) |
duke@435 | 88 | movl 24(%esp), %edx // compare_value (high) |
duke@435 | 89 | movl 16(%esp), %edi // dest |
duke@435 | 90 | movl 8(%esp), %ebx // exchange_value (low) |
duke@435 | 91 | movl 12(%esp), %ecx // exchange_high (high) |
duke@435 | 92 | cmp $0, 28(%esp) // MP test |
duke@435 | 93 | je 1f |
duke@435 | 94 | lock |
duke@435 | 95 | 1: cmpxchg8b (%edi) |
duke@435 | 96 | popl %edi |
duke@435 | 97 | popl %ebx |
duke@435 | 98 | .end |
duke@435 | 99 | |
duke@435 | 100 | // Support for OrderAccess::acquire() |
duke@435 | 101 | .inline _OrderAccess_acquire,0 |
duke@435 | 102 | movl 0(%esp), %eax |
duke@435 | 103 | .end |
duke@435 | 104 | |
duke@435 | 105 | // Support for OrderAccess::fence() |
duke@435 | 106 | .inline _OrderAccess_fence,0 |
duke@435 | 107 | lock |
duke@435 | 108 | addl $0, (%esp) |
duke@435 | 109 | .end |
duke@435 | 110 | |
duke@435 | 111 | // Support for u2 Bytes::swap_u2(u2 x) |
duke@435 | 112 | .inline _raw_swap_u2,1 |
duke@435 | 113 | movl 0(%esp), %eax |
duke@435 | 114 | xchgb %al, %ah |
duke@435 | 115 | .end |
duke@435 | 116 | |
duke@435 | 117 | // Support for u4 Bytes::swap_u4(u4 x) |
duke@435 | 118 | .inline _raw_swap_u4,1 |
duke@435 | 119 | movl 0(%esp), %eax |
duke@435 | 120 | bswap %eax |
duke@435 | 121 | .end |
duke@435 | 122 | |
duke@435 | 123 | // Support for u8 Bytes::swap_u8_base(u4 x, u4 y) |
duke@435 | 124 | .inline _raw_swap_u8,2 |
duke@435 | 125 | movl 4(%esp), %eax // y |
duke@435 | 126 | movl 0(%esp), %edx // x |
duke@435 | 127 | bswap %eax |
duke@435 | 128 | bswap %edx |
duke@435 | 129 | .end |