src/os_cpu/bsd_x86/vm/bsd_x86_32.s
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/os_cpu/linux_x86/vm/linux_x86_32.s Tue Sep 13 12:29:17 2011
--- new/src/os_cpu/bsd_x86/vm/bsd_x86_32.s Tue Sep 13 12:29:17 2011
*** 20,82 ****
--- 20,113 ----
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+ #ifdef __APPLE__
+ # Darwin uses _ prefixed global symbols
+ #define SYMBOL(s) _ ## s
+ #define ELF_TYPE(name, description)
+ #else
+ #define SYMBOL(s) s
+ #define ELF_TYPE(name, description) .type name,description
+ #endif
+
+ .globl SYMBOL(fixcw)
+
# NOTE WELL! The _Copy functions are called directly
# from server-compiler-generated code via CallLeafNoFP,
# which means that they *must* either not use floating
# point or use it in the same manner as does the server
# compiler.
! .globl SYMBOL(_Copy_conjoint_bytes)
! .globl SYMBOL(_Copy_arrayof_conjoint_bytes)
! .globl _Copy_conjoint_jshorts_atomic
! .globl _Copy_arrayof_conjoint_jshorts
! .globl _Copy_conjoint_jints_atomic
! .globl _Copy_arrayof_conjoint_jints
! .globl _Copy_conjoint_jlongs_atomic
! .globl _mmx_Copy_arrayof_conjoint_jshorts
! .globl SYMBOL(_Copy_conjoint_jshorts_atomic)
! .globl SYMBOL(_Copy_arrayof_conjoint_jshorts)
! .globl SYMBOL(_Copy_conjoint_jints_atomic)
! .globl SYMBOL(_Copy_arrayof_conjoint_jints)
! .globl SYMBOL(_Copy_conjoint_jlongs_atomic)
! .globl SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts)
! .globl SYMBOL(_Atomic_cmpxchg_long)
! .globl SYMBOL(_Atomic_move_long)
.text
.globl SafeFetch32, Fetch32PFI, Fetch32Resume
.globl SafeFetchN
+ # Support for void os::Solaris::init_thread_fpu_state() in os_solaris_i486.cpp
+ # Set fpu to 53 bit precision. This happens too early to use a stub.
+ # ported from solaris_x86_32.s
+ #ifdef __APPLE__
+ .align 4
+ #else
+ .align 16
+ #endif
+ SYMBOL(fixcw):
+ pushl $0x27f
+ fldcw 0(%esp)
+ popl %eax
+ ret
+
+ #ifdef __APPLE__
+ .align 4
+ #else
+ .align 16
+ #endif
+
+ .globl SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume)
+ .globl SYMBOL(SafeFetchN)
## TODO: avoid exposing Fetch32PFI and Fetch32Resume.
## Instead, the signal handler would call a new SafeFetchTriage(FaultingEIP)
## routine to vet the address. If the address is the faulting LD then
## SafeFetchTriage() would return the resume-at EIP, otherwise null.
.type SafeFetch32,@function
+ ELF_TYPE(SafeFetch32,@function)
.p2align 4,,15
! SYMBOL(SafeFetch32):
! SafeFetchN:
! SYMBOL(SafeFetchN):
movl 0x8(%esp), %eax
movl 0x4(%esp), %ecx
! SYMBOL(Fetch32PFI):
movl (%ecx), %eax
! SYMBOL(Fetch32Resume):
ret
! .globl SYMBOL(SpinPause)
.type SpinPause,@function
+ ELF_TYPE(SpinPause,@function)
.p2align 4,,15
! SYMBOL(SpinPause):
rep
nop
movl $1, %eax
ret
# Support for void Copy::conjoint_bytes(void* from,
# void* to,
# size_t count)
.p2align 4,,15
.type _Copy_conjoint_bytes,@function
! SYMBOL(_Copy_conjoint_bytes):
+ ELF_TYPE(_Copy_conjoint_bytes,@function)
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
movl 8+ 4(%esp),%esi # from
movl 8+ 8(%esp),%edi # to
*** 179,190 ****
--- 210,221 ----
# void* to,
# size_t count)
#
# Same as _Copy_conjoint_bytes, except no source alignment check.
.p2align 4,,15
.type _Copy_arrayof_conjoint_bytes,@function
! SYMBOL(_Copy_arrayof_conjoint_bytes):
+ ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
movl 8+ 4(%esp),%esi # from
movl 8+ 8(%esp),%edi # to
*** 267,278 ****
--- 298,309 ----
# Support for void Copy::conjoint_jshorts_atomic(void* from,
# void* to,
# size_t count)
.p2align 4,,15
.type _Copy_conjoint_jshorts_atomic,@function
! SYMBOL(_Copy_conjoint_jshorts_atomic):
+ ELF_TYPE(_Copy_conjoint_jshorts_atomic,@function)
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
movl 8+ 4(%esp),%esi # from
movl 8+ 8(%esp),%edi # to
*** 354,365 ****
--- 385,396 ----
# Support for void Copy::arrayof_conjoint_jshorts(void* from,
# void* to,
# size_t count)
.p2align 4,,15
.type _Copy_arrayof_conjoint_jshorts,@function
! SYMBOL(_Copy_arrayof_conjoint_jshorts):
+ ELF_TYPE(_Copy_arrayof_conjoint_jshorts,@function)
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
movl 8+ 4(%esp),%esi # from
movl 8+ 8(%esp),%edi # to
*** 431,444 ****
--- 462,475 ----
# void* to,
# size_t count)
# Equivalent to
# arrayof_conjoint_jints
.p2align 4,,15
.type _Copy_conjoint_jints_atomic,@function
.type _Copy_arrayof_conjoint_jints,@function
! SYMBOL(_Copy_conjoint_jints_atomic):
! _Copy_arrayof_conjoint_jints:
+ ELF_TYPE(_Copy_conjoint_jints_atomic,@function)
+ ELF_TYPE(_Copy_arrayof_conjoint_jints,@function)
! SYMBOL(_Copy_arrayof_conjoint_jints):
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
movl 8+ 4(%esp),%esi # from
movl 8+ 8(%esp),%edi # to
*** 496,517 ****
--- 527,548 ----
#
# 32-bit
#
# count treated as signed
#
! # // if (from > to) {
# while (--count >= 0) {
# *to++ = *from++;
# }
# } else {
# while (--count >= 0) {
# to[count] = from[count];
# }
# }
.p2align 4,,15
.type _Copy_conjoint_jlongs_atomic,@function
! SYMBOL(_Copy_conjoint_jlongs_atomic):
+ ELF_TYPE(_Copy_conjoint_jlongs_atomic,@function)
movl 4+8(%esp),%ecx # count
movl 4+0(%esp),%eax # from
movl 4+4(%esp),%edx # to
cmpl %eax,%edx
jae cla_CopyLeft
*** 535,546 ****
--- 566,577 ----
# Support for void Copy::arrayof_conjoint_jshorts(void* from,
# void* to,
# size_t count)
.p2align 4,,15
.type _mmx_Copy_arrayof_conjoint_jshorts,@function
! SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts):
+ ELF_TYPE(_mmx_Copy_arrayof_conjoint_jshorts,@function)
pushl %esi
movl 4+12(%esp),%ecx
pushl %edi
movl 8+ 4(%esp),%esi
movl 8+ 8(%esp),%edi
*** 634,645 ****
--- 665,676 ----
# volatile jlong* dest,
# jlong compare_value,
# bool is_MP)
#
.p2align 4,,15
.type _Atomic_cmpxchg_long,@function
! SYMBOL(_Atomic_cmpxchg_long):
+ ELF_TYPE(_Atomic_cmpxchg_long,@function)
# 8(%esp) : return PC
pushl %ebx # 4(%esp) : old %ebx
pushl %edi # 0(%esp) : old %edi
movl 12(%esp), %ebx # 12(%esp) : exchange_value (low)
movl 16(%esp), %ecx # 16(%esp) : exchange_value (high)
*** 656,667 ****
--- 687,698 ----
# Support for jlong Atomic::load and Atomic::store.
# void _Atomic_move_long(volatile jlong* src, volatile jlong* dst)
.p2align 4,,15
.type _Atomic_move_long,@function
! SYMBOL(_Atomic_move_long):
+ ELF_TYPE(_Atomic_move_long,@function)
movl 4(%esp), %eax # src
fildll (%eax)
movl 8(%esp), %eax # dest
fistpll (%eax)
ret
src/os_cpu/bsd_x86/vm/bsd_x86_32.s
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File