hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_32.s
changeset 46414 5d1d862dc8d8
parent 22234 da823d78ad65
equal deleted inserted replaced
46413:b0f67ec8f6be 46414:5d1d862dc8d8
     1 //
     1 //
     2 // Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
     2 // Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
     3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 //
     4 //
     5 // This code is free software; you can redistribute it and/or modify it
     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
     6 // under the terms of the GNU General Public License version 2 only, as
     7 // published by the Free Software Foundation.
     7 // published by the Free Software Foundation.
   641         ret
   641         ret
   642 
   642 
   643 
   643 
   644         / Support for jlong Atomic::cmpxchg(jlong exchange_value,
   644         / Support for jlong Atomic::cmpxchg(jlong exchange_value,
   645         /                                   volatile jlong* dest,
   645         /                                   volatile jlong* dest,
   646         /                                   jlong compare_value,
   646         /                                   jlong compare_value)
   647         /                                   bool is_MP)
       
   648         / Used only for Solaris/gcc builds
   647         / Used only for Solaris/gcc builds
   649         .align 16
   648         .align 16
   650 _Atomic_cmpxchg_long_gcc:
   649 _Atomic_cmpxchg_long_gcc:
   651                                    /  8(%esp) : return PC
   650                                    /  8(%esp) : return PC
   652         pushl    %ebx              /  4(%esp) : old %ebx
   651         pushl    %ebx              /  4(%esp) : old %ebx
   654         movl     12(%esp), %ebx    / 12(%esp) : exchange_value (low)
   653         movl     12(%esp), %ebx    / 12(%esp) : exchange_value (low)
   655         movl     16(%esp), %ecx    / 16(%esp) : exchange_value (high)
   654         movl     16(%esp), %ecx    / 16(%esp) : exchange_value (high)
   656         movl     24(%esp), %eax    / 24(%esp) : compare_value (low)
   655         movl     24(%esp), %eax    / 24(%esp) : compare_value (low)
   657         movl     28(%esp), %edx    / 28(%esp) : compare_value (high)
   656         movl     28(%esp), %edx    / 28(%esp) : compare_value (high)
   658         movl     20(%esp), %edi    / 20(%esp) : dest
   657         movl     20(%esp), %edi    / 20(%esp) : dest
   659         cmpl     $0, 32(%esp)      / 32(%esp) : is_MP
   658         lock cmpxchg8b (%edi)
   660         je       1f
       
   661         lock
       
   662 1:      cmpxchg8b (%edi)
       
   663         popl     %edi
   659         popl     %edi
   664         popl     %ebx
   660         popl     %ebx
   665         ret
   661         ret