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(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume)
50 .p2align 4,,15
51 ELF_TYPE(SafeFetch32,@function)
52 // Prototype: int SafeFetch32 (int * Adr, int ErrValue)
53 SYMBOL(SafeFetch32):
54 movl %esi, %eax
55 SYMBOL(Fetch32PFI):
56 movl (%rdi), %eax
57 SYMBOL(Fetch32Resume):
58 ret
59
60 .globl SYMBOL(SafeFetchN), SYMBOL(FetchNPFI), SYMBOL(FetchNResume)
61 .p2align 4,,15
62 ELF_TYPE(SafeFetchN,@function)
63 // Prototype: intptr_t SafeFetchN (intptr_t * Adr, intptr_t ErrValue)
64 SYMBOL(SafeFetchN):
65 movq %rsi, %rax
66 SYMBOL(FetchNPFI):
67 movq (%rdi), %rax
68 SYMBOL(FetchNResume):
69 ret
70
71 .globl SYMBOL(SpinPause)
72 .p2align 4,,15
73 ELF_TYPE(SpinPause,@function)
74 SYMBOL(SpinPause):
75 rep
76 nop
77 movq $1, %rax
78 ret
79
80 # Support for void Copy::arrayof_conjoint_bytes(void* from,
81 # void* to,
82 # size_t count)
83 # rdi - from
84 # rsi - to
85 # rdx - count, treated as ssize_t
86 #
87 .p2align 4,,15
88 ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
89 SYMBOL(_Copy_arrayof_conjoint_bytes):
90 movq %rdx,%r8 # byte count
|
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
|