src/os_cpu/bsd_x86/vm/bsd_x86_64.s
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
7089790_bsd_vs_linux Cdiff src/os_cpu/bsd_x86/vm/bsd_x86_64.s
src/os_cpu/bsd_x86/vm/bsd_x86_64.s
Print this page
rev 2698 : new bsd files
*** 19,71 ****
# 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.
#
# 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 _Copy_arrayof_conjoint_bytes
! .globl _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
.text
! .globl SafeFetch32, Fetch32PFI, Fetch32Resume
.align 16
! .type SafeFetch32,@function
// Prototype: int SafeFetch32 (int * Adr, int ErrValue)
! SafeFetch32:
movl %esi, %eax
! Fetch32PFI:
movl (%rdi), %eax
! Fetch32Resume:
ret
! .globl SafeFetchN, FetchNPFI, FetchNResume
.align 16
! .type SafeFetchN,@function
// Prototype: intptr_t SafeFetchN (intptr_t * Adr, intptr_t ErrValue)
! SafeFetchN:
movq %rsi, %rax
! FetchNPFI:
movq (%rdi), %rax
! FetchNResume:
ret
! .globl SpinPause
.align 16
! .type SpinPause,@function
! SpinPause:
rep
nop
movq $1, %rax
ret
--- 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 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 SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume)
! #ifdef __APPLE__
! .align 4
! #else
.align 16
! #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 SYMBOL(SafeFetchN), SYMBOL(FetchNPFI), SYMBOL(FetchNResume)
! #ifdef __APPLE__
! .align 4
! #else
.align 16
! #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
! #endif
! ELF_TYPE(SpinPause,@function)
! SYMBOL(SpinPause):
rep
nop
movq $1, %rax
ret
*** 75,86 ****
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
! .type _Copy_arrayof_conjoint_bytes,@function
! _Copy_arrayof_conjoint_bytes:
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
--- 95,106 ----
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
! ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
! SYMBOL(_Copy_arrayof_conjoint_bytes):
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 ****
# 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
! _Copy_arrayof_conjoint_jshorts:
! _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
--- 197,210 ----
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
! ELF_TYPE(_Copy_arrayof_conjoint_jshorts,@function)
! ELF_TYPE(_Copy_conjoint_jshorts_atomic,@function)
! SYMBOL(_Copy_arrayof_conjoint_jshorts):
! 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 ****
# 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
! _Copy_arrayof_conjoint_jints:
! _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
--- 287,300 ----
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
! ELF_TYPE(_Copy_arrayof_conjoint_jints,@function)
! ELF_TYPE(_Copy_conjoint_jints_atomic,@function)
! SYMBOL(_Copy_arrayof_conjoint_jints):
! 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 ****
# 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
! _Copy_arrayof_conjoint_jlongs:
! _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
--- 366,379 ----
# rdi - from
# rsi - to
# rdx - count, treated as ssize_t
#
.p2align 4,,15
! ELF_TYPE(_Copy_arrayof_conjoint_jlongs,@function)
! ELF_TYPE(_Copy_conjoint_jlongs_atomic,@function)
! SYMBOL(_Copy_arrayof_conjoint_jlongs):
! 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