XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1 | // Copyright (c) Facebook, Inc. and its affiliates. |
| 2 | // All rights reserved. |
| 3 | // |
| 4 | // Copyright 2019 Google LLC |
| 5 | // |
| 6 | // This source code is licensed under the BSD-style license found in the |
| 7 | // LICENSE file in the root directory of this source tree. |
| 8 | |
| 9 | #ifdef __ELF__ |
| 10 | .macro BEGIN_FUNCTION name |
| 11 | .text |
| 12 | .p2align 4 |
| 13 | .global \name |
| 14 | .type \name, %function |
| 15 | \name: |
| 16 | .endm |
| 17 | |
| 18 | .macro END_FUNCTION name |
| 19 | .size \name, .-\name |
| 20 | .endm |
| 21 | #elif defined(__MACH__) |
| 22 | .macro BEGIN_FUNCTION name |
| 23 | .text |
| 24 | .p2align 4 |
| 25 | .global _\name |
| 26 | .private_extern _\name |
| 27 | _\name: |
| 28 | .endm |
| 29 | |
| 30 | .macro END_FUNCTION name |
| 31 | .endm |
| 32 | #endif |