mirror of
https://github.com/golang/go
synced 2024-11-19 15:54:46 -07:00
519474451a
This is a subset of https://golang.org/cl/20022 with only the copyright header lines, so the next CL will be smaller and more reviewable. Go policy has been single space after periods in comments for some time. The copyright header template at: https://golang.org/doc/contribute.html#copyright also uses a single space. Make them all consistent. Change-Id: Icc26c6b8495c3820da6b171ca96a74701b4a01b0 Reviewed-on: https://go-review.googlesource.com/20111 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
54 lines
1.2 KiB
ArmAsm
54 lines
1.2 KiB
ArmAsm
// 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.
|
|
|
|
/*
|
|
* Apple still insists on underscore prefixes for C function names.
|
|
*/
|
|
#if defined(__APPLE__)
|
|
#define EXT(s) _##s
|
|
#else
|
|
#define EXT(s) s
|
|
#endif
|
|
|
|
// Apple's ld64 wants 4-byte alignment for ARM code sections.
|
|
// .align in both Apple as and GNU as treat n as aligning to 2**n bytes.
|
|
.align 2
|
|
|
|
/*
|
|
* void crosscall1(void (*fn)(void), void (*setg_gcc)(void *g), void *g)
|
|
*
|
|
* Calling into the gc tool chain, where all registers are caller save.
|
|
* Called from standard ARM EABI, where x19-x29 are callee-save, so they
|
|
* must be saved explicitly, along with x30 (LR).
|
|
*/
|
|
.globl EXT(crosscall1)
|
|
EXT(crosscall1):
|
|
stp x19, x20, [sp, #-16]!
|
|
stp x21, x22, [sp, #-16]!
|
|
stp x23, x24, [sp, #-16]!
|
|
stp x25, x26, [sp, #-16]!
|
|
stp x27, x28, [sp, #-16]!
|
|
stp x29, x30, [sp, #-16]!
|
|
mov x29, sp
|
|
|
|
mov x19, x0
|
|
mov x20, x1
|
|
mov x0, x2
|
|
|
|
blr x20
|
|
blr x19
|
|
|
|
ldp x29, x30, [sp], #16
|
|
ldp x27, x28, [sp], #16
|
|
ldp x25, x26, [sp], #16
|
|
ldp x23, x24, [sp], #16
|
|
ldp x21, x22, [sp], #16
|
|
ldp x19, x20, [sp], #16
|
|
ret
|
|
|
|
|
|
#ifdef __ELF__
|
|
.section .note.GNU-stack,"",%progbits
|
|
#endif
|