Shenghou Ma | 56e8f8e | 2014-12-26 01:07:10 -0500 | [diff] [blame] | 1 | // Copyright 2014 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | #include "textflag.h" |
| 6 | |
| 7 | TEXT _rt0_arm_darwin(SB),7,$-4 |
| 8 | // prepare arguments for main (_rt0_go) |
| 9 | MOVW (R13), R0 // argc |
| 10 | MOVW $4(R13), R1 // argv |
| 11 | MOVW $main(SB), R4 |
| 12 | B (R4) |
| 13 | |
| 14 | TEXT main(SB),NOSPLIT,$-8 |
| 15 | // save argc and argv onto stack |
| 16 | MOVM.DB.W [R0-R1], (R13) |
| 17 | MOVW $runtime·rt0_go(SB), R4 |
| 18 | B (R4) |