mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
prefix assembly functions with _ on macos
This commit is contained in:
parent
60babcc56e
commit
341ef9bb7b
7 changed files with 84 additions and 72 deletions
|
@ -71,8 +71,8 @@
|
|||
*/
|
||||
|
||||
|
||||
# .type __folly_memcpy_short_{[prefetch]s}, @function not supported by windows
|
||||
__folly_memcpy_short_{[prefetch]s}:
|
||||
# .type {[function_prefix]s}__folly_memcpy_short_{[prefetch]s}, @function not supported by windows
|
||||
{[function_prefix]s}__folly_memcpy_short_{[prefetch]s}:
|
||||
.cfi_startproc
|
||||
|
||||
.L_GE1_LE7_{[prefetch]s}:
|
||||
|
@ -106,7 +106,7 @@ __folly_memcpy_short_{[prefetch]s}:
|
|||
ret
|
||||
|
||||
.cfi_endproc
|
||||
# .size __folly_memcpy_short_{[prefetch]s}, .-__folly_memcpy_short_{[prefetch]s} not supported by windows
|
||||
# .size {[function_prefix]s}__folly_memcpy_short_{[prefetch]s}, .-{[function_prefix]s}__folly_memcpy_short_{[prefetch]s} not supported by windows
|
||||
|
||||
// memcpy is an alternative entrypoint into the function named __folly_memcpy.
|
||||
// The compiler is able to call memcpy since the name is global while
|
||||
|
@ -114,10 +114,10 @@ __folly_memcpy_short_{[prefetch]s}:
|
|||
// This is intended to aid in debugging by making it obvious which version of
|
||||
// memcpy is being used.
|
||||
.balign 64
|
||||
.globl __folly_memcpy_{[prefetch]s}
|
||||
# .type __folly_memcpy_{[prefetch]s}, @function not supported by windows
|
||||
.globl {[function_prefix]s}__folly_memcpy_{[prefetch]s}
|
||||
# .type {[function_prefix]s}__folly_memcpy_{[prefetch]s}, @function not supported by windows
|
||||
|
||||
__folly_memcpy_{[prefetch]s}:
|
||||
{[function_prefix]s}__folly_memcpy_{[prefetch]s}:
|
||||
.cfi_startproc
|
||||
|
||||
mov %rdi, %rax # return: $rdi
|
||||
|
@ -434,4 +434,4 @@ __folly_memcpy_{[prefetch]s}:
|
|||
ret
|
||||
|
||||
.cfi_endproc
|
||||
# .size __folly_memcpy_{[prefetch]s}, .-__folly_memcpy_{[prefetch]s} not supported by windows
|
||||
# .size {[function_prefix]s}__folly_memcpy_{[prefetch]s}, .-{[function_prefix]s}__folly_memcpy_{[prefetch]s} not supported by windows
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const arch = builtin.cpu.arch;
|
||||
const function_prefix = @import("../assembly_util.zig").function_prefix;
|
||||
|
||||
comptime {
|
||||
switch (arch) {
|
||||
.x86_64 => {
|
||||
inline for ([_][]const u8{ "prefetchw", "prefetcht0" }) |prefetch| {
|
||||
asm (std.fmt.comptimePrint(@embedFile("memcpy-x86_64.S"), .{ .prefetch = prefetch }));
|
||||
asm (std.fmt.comptimePrint(@embedFile("memcpy-x86_64.S"), .{ .prefetch = prefetch, .function_prefix = function_prefix }));
|
||||
}
|
||||
},
|
||||
else => unreachable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue