29 #define SYMBOL(s) s
30 #define ELF_TYPE(name, description) .type name,description
31 #endif
32
33 # NOTE WELL! The _Copy functions are called directly
34 # from server-compiler-generated code via CallLeafNoFP,
35 # which means that they *must* either not use floating
36 # point or use it in the same manner as does the server
37 # compiler.
38
39 .globl SYMBOL(_Copy_arrayof_conjoint_bytes)
40 .globl SYMBOL(_Copy_arrayof_conjoint_jshorts)
41 .globl SYMBOL(_Copy_conjoint_jshorts_atomic)
42 .globl SYMBOL(_Copy_arrayof_conjoint_jints)
43 .globl SYMBOL(_Copy_conjoint_jints_atomic)
44 .globl SYMBOL(_Copy_arrayof_conjoint_jlongs)
45 .globl SYMBOL(_Copy_conjoint_jlongs_atomic)
46
47 .text
48
49 .globl SYMBOL(SpinPause)
50 .p2align 4,,15
51 ELF_TYPE(SpinPause,@function)
52 SYMBOL(SpinPause):
53 rep
54 nop
55 movq $1, %rax
56 ret
57
58 # Support for void Copy::arrayof_conjoint_bytes(void* from,
59 # void* to,
60 # size_t count)
61 # rdi - from
62 # rsi - to
63 # rdx - count, treated as ssize_t
64 #
65 .p2align 4,,15
66 ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
67 SYMBOL(_Copy_arrayof_conjoint_bytes):
68 movq %rdx,%r8 # byte count
69 shrq $3,%rdx # qword count
70 cmpq %rdi,%rsi
71 leaq -1(%rdi,%r8,1),%rax # from + bcount*1 - 1
72 jbe acb_CopyRight
73 cmpq %rax,%rsi
74 jbe acb_CopyLeft
75 acb_CopyRight:
76 leaq -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8
77 leaq -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8
|
29 #define SYMBOL(s) s
30 #define ELF_TYPE(name, description) .type name,description
31 #endif
32
33 # NOTE WELL! The _Copy functions are called directly
34 # from server-compiler-generated code via CallLeafNoFP,
35 # which means that they *must* either not use floating
36 # point or use it in the same manner as does the server
37 # compiler.
38
39 .globl SYMBOL(_Copy_arrayof_conjoint_bytes)
40 .globl SYMBOL(_Copy_arrayof_conjoint_jshorts)
41 .globl SYMBOL(_Copy_conjoint_jshorts_atomic)
42 .globl SYMBOL(_Copy_arrayof_conjoint_jints)
43 .globl SYMBOL(_Copy_conjoint_jints_atomic)
44 .globl SYMBOL(_Copy_arrayof_conjoint_jlongs)
45 .globl SYMBOL(_Copy_conjoint_jlongs_atomic)
46
47 .text
48
49 # Support for void Copy::arrayof_conjoint_bytes(void* from,
50 # void* to,
51 # size_t count)
52 # rdi - from
53 # rsi - to
54 # rdx - count, treated as ssize_t
55 #
56 .p2align 4,,15
57 ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
58 SYMBOL(_Copy_arrayof_conjoint_bytes):
59 movq %rdx,%r8 # byte count
60 shrq $3,%rdx # qword count
61 cmpq %rdi,%rsi
62 leaq -1(%rdi,%r8,1),%rax # from + bcount*1 - 1
63 jbe acb_CopyRight
64 cmpq %rax,%rsi
65 jbe acb_CopyLeft
66 acb_CopyRight:
67 leaq -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8
68 leaq -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8
|