-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright 2015 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// System calls and other sys.stuff for ARM64, Darwin | ||
// System calls are implemented in libSystem, this file contains | ||
// trampolines that convert from Go to C calling convention. | ||
|
||
#include "go_asm.h" | ||
#include "go_tls.h" | ||
#include "textflag.h" | ||
|
||
TEXT runtime·res_search_trampoline(SB),NOSPLIT,$0 | ||
MOVW 16(R0). R4 // arg 5 anslen | ||
MOVW 12(R0), R3 // arg 4 answer | ||
MOVW 4(R0), R1 // arg 2 class | ||
MOVW 8(R0), R2 // arg 3 type | ||
MOVW 0(R0), R0 // arg 1 name | ||
BL libc_res_search | ||
RET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2019 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
#include "go_asm.h" | ||
#include "go_tls.h" | ||
#include "textflag.h" | ||
|
||
TEXT runtime·res_search_trampoline(SB),NOSPLIT,$0 | ||
SUB $16, RSP | ||
MOVW 24(R0), R4 // arg 5 anslen | ||
MOVD 16(R0), R3 // arg 4 answer | ||
MOVW 8(R0), R1 // arg 2 class | ||
MOVD 12(R0), R2 // arg 3 type | ||
MOVD 0(R0), R0 // arg 1 name | ||
BL libc_res_search(SB) | ||
RET |