src/os_cpu/bsd_x86/vm/bsd_x86_64.s
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/os_cpu/linux_x86/vm/linux_x86_64.s Tue Sep 13 12:29:13 2011
--- new/src/os_cpu/bsd_x86/vm/bsd_x86_64.s Tue Sep 13 12:29:13 2011
*** 19,71 ****
--- 19,91 ----
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# 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
# 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_arrayof_conjoint_bytes)
! .globl SYMBOL(_Copy_arrayof_conjoint_jshorts)
! .globl _Copy_conjoint_jshorts_atomic
! .globl _Copy_arrayof_conjoint_jints
! .globl _Copy_conjoint_jints_atomic
! .globl _Copy_arrayof_conjoint_jlongs
! .globl _Copy_conjoint_jlongs_atomic
! .globl SYMBOL(_Copy_conjoint_jshorts_atomic)
! .globl SYMBOL(_Copy_arrayof_conjoint_jints)
! .globl SYMBOL(_Copy_conjoint_jints_atomic)
! .globl SYMBOL(_Copy_arrayof_conjoint_jlongs)
! .globl SYMBOL(_Copy_conjoint_jlongs_atomic)
.text
! .globl SafeFetch32, Fetch32PFI, Fetch32Resume
! .globl SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume)
+ #ifdef __APPLE__
+ .align 4
+ #else
.align 16
.type SafeFetch32,@function
+ #endif
+ ELF_TYPE(SafeFetch32,@function)
// Prototype: int SafeFetch32 (int * Adr, int ErrValue)
! SYMBOL(SafeFetch32):
movl %esi, %eax
! SYMBOL(Fetch32PFI):
movl (%rdi), %eax
! SYMBOL(Fetch32Resume):
ret
! .globl SafeFetchN, FetchNPFI, FetchNResume
! .globl SYMBOL(SafeFetchN), SYMBOL(FetchNPFI), SYMBOL(FetchNResume)
+ #ifdef __APPLE__
+ .align 4
+ #else
.align 16
.type SafeFetchN,@function
+ #endif
+ ELF_TYPE(SafeFetchN,@function)
// Prototype: intptr_t SafeFetchN (intptr_t * Adr, intptr_t ErrValue)
! SYMBOL(SafeFetchN):
movq %rsi, %rax
! SYMBOL(FetchNPFI):
movq (%rdi), %rax
! SYMBOL(FetchNResume):
ret
! .globl SYMBOL(SpinPause)
+ #ifdef __APPLE__
+ .align 4
+ #else
.align 16
.type SpinPause,@function
SpinPause:
+ #endif
+ ELF_TYPE(SpinPause,@function)
+ SYMBOL(SpinPause):
rep
nop
movq $1, %rax
ret
*** 75,86 ****
--- 95,106 ----
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
.type _Copy_arrayof_conjoint_bytes,@function
! SYMBOL(_Copy_arrayof_conjoint_bytes):
+ ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
movq %rdx,%r8 # byte count
shrq $3,%rdx # qword count
cmpq %rdi,%rsi
leaq -1(%rdi,%r8,1),%rax # from + bcount*1 - 1
jbe acb_CopyRight
*** 177,190 ****
--- 197,210 ----
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
.type _Copy_arrayof_conjoint_jshorts,@function
.type _Copy_conjoint_jshorts_atomic,@function
! SYMBOL(_Copy_arrayof_conjoint_jshorts):
! _Copy_conjoint_jshorts_atomic:
+ ELF_TYPE(_Copy_arrayof_conjoint_jshorts,@function)
+ ELF_TYPE(_Copy_conjoint_jshorts_atomic,@function)
! SYMBOL(_Copy_conjoint_jshorts_atomic):
movq %rdx,%r8 # word count
shrq $2,%rdx # qword count
cmpq %rdi,%rsi
leaq -2(%rdi,%r8,2),%rax # from + wcount*2 - 2
jbe acs_CopyRight
*** 267,280 ****
--- 287,300 ----
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
.type _Copy_arrayof_conjoint_jints,@function
.type _Copy_conjoint_jints_atomic,@function
! SYMBOL(_Copy_arrayof_conjoint_jints):
! _Copy_conjoint_jints_atomic:
+ ELF_TYPE(_Copy_arrayof_conjoint_jints,@function)
+ ELF_TYPE(_Copy_conjoint_jints_atomic,@function)
! SYMBOL(_Copy_conjoint_jints_atomic):
movq %rdx,%r8 # dword count
shrq %rdx # qword count
cmpq %rdi,%rsi
leaq -4(%rdi,%r8,4),%rax # from + dcount*4 - 4
jbe aci_CopyRight
*** 346,359 ****
--- 366,379 ----
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
.type _Copy_arrayof_conjoint_jlongs,@function
.type _Copy_conjoint_jlongs_atomic,@function
! SYMBOL(_Copy_arrayof_conjoint_jlongs):
! _Copy_conjoint_jlongs_atomic:
+ ELF_TYPE(_Copy_arrayof_conjoint_jlongs,@function)
+ ELF_TYPE(_Copy_conjoint_jlongs_atomic,@function)
! SYMBOL(_Copy_conjoint_jlongs_atomic):
cmpq %rdi,%rsi
leaq -8(%rdi,%rdx,8),%rax # from + count*8 - 8
jbe acl_CopyRight
cmpq %rax,%rsi
jbe acl_CopyLeft
src/os_cpu/bsd_x86/vm/bsd_x86_64.s
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File