1 | /* $Id: zero-alt.S 94908 2022-05-07 19:25:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * IPRT - Zero Memory, mach-o version (for arm/sparc).
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2013-2022 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * The contents of this file may alternatively be used under the terms
|
---|
18 | * of the Common Development and Distribution License Version 1.0
|
---|
19 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | * CDDL are applicable instead of those of the GPL.
|
---|
22 | *
|
---|
23 | * You may elect to license modified versions of this file under the
|
---|
24 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | */
|
---|
26 |
|
---|
27 |
|
---|
28 | #ifdef ASM_FORMAT_MACHO
|
---|
29 | ; Putting it in the code segment/section for now.
|
---|
30 | .section __TEXT,__text,regular,pure_instructions
|
---|
31 | .section __TEXT,__const
|
---|
32 | # define NAME(a) _##a
|
---|
33 | #elif defined(ASM_FORMAT_ELF) && (defined(RT_ARCH_ARM64) || defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64))
|
---|
34 | /* Putting it in the rodata segment/section for now. */
|
---|
35 | .file "zero-alt.S"
|
---|
36 | .section ".rodata"
|
---|
37 | # define NAME(a) a
|
---|
38 | # define NEED_HIDDEN
|
---|
39 | #else
|
---|
40 | # error "PORT ME!"
|
---|
41 | #endif
|
---|
42 |
|
---|
43 | /* 64KB of zero memory with various sized labels. */
|
---|
44 | .globl NAME(g_abRTZeroPage)
|
---|
45 | #ifdef ASM_FORMAT_ELF
|
---|
46 | # ifdef NEED_HIDDEN
|
---|
47 | .hidden NAME(g_abRTZeroPage)
|
---|
48 | # endif
|
---|
49 | .type NAME(g_abRTZeroPage),#object
|
---|
50 | # if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
|
---|
51 | .size NAME(g_abRTZeroPage),8192
|
---|
52 | # else
|
---|
53 | .size NAME(g_abRTZeroPage),4096
|
---|
54 | # endif
|
---|
55 | #endif
|
---|
56 | NAME(g_abRTZeroPage):
|
---|
57 | .globl NAME(g_abRTZero4K)
|
---|
58 | #ifdef ASM_FORMAT_ELF
|
---|
59 | # ifdef NEED_HIDDEN
|
---|
60 | .hidden NAME(g_abRTZero4K)
|
---|
61 | # endif
|
---|
62 | .type NAME(g_abRTZero4K),#object
|
---|
63 | .size NAME(g_abRTZero4K),4096
|
---|
64 | #endif
|
---|
65 | NAME(g_abRTZero4K):
|
---|
66 | .globl NAME(g_abRTZero8K)
|
---|
67 | #ifdef ASM_FORMAT_ELF
|
---|
68 | # ifdef NEED_HIDDEN
|
---|
69 | .hidden NAME(g_abRTZero8K)
|
---|
70 | # endif
|
---|
71 | .type NAME(g_abRTZero8K),#object
|
---|
72 | .size NAME(g_abRTZero8K),8192
|
---|
73 | #endif
|
---|
74 | NAME(g_abRTZero8K):
|
---|
75 | .globl NAME(g_abRTZero16K)
|
---|
76 | #ifdef ASM_FORMAT_ELF
|
---|
77 | # ifdef NEED_HIDDEN
|
---|
78 | .hidden NAME(g_abRTZero16K)
|
---|
79 | # endif
|
---|
80 | .type NAME(g_abRTZero16K),#object
|
---|
81 | .size NAME(g_abRTZero16K),16384
|
---|
82 | #endif
|
---|
83 | NAME(g_abRTZero16K):
|
---|
84 | .globl NAME(g_abRTZero32K)
|
---|
85 | #ifdef ASM_FORMAT_ELF
|
---|
86 | # ifdef NEED_HIDDEN
|
---|
87 | .hidden NAME(g_abRTZero32K)
|
---|
88 | # endif
|
---|
89 | .type NAME(g_abRTZero32K),#object
|
---|
90 | .size NAME(g_abRTZero32K),32768
|
---|
91 | #endif
|
---|
92 | NAME(g_abRTZero32K):
|
---|
93 | .globl NAME(g_abRTZero64K)
|
---|
94 | #ifdef ASM_FORMAT_ELF
|
---|
95 | # ifdef NEED_HIDDEN
|
---|
96 | .hidden NAME(g_abRTZero64K)
|
---|
97 | # endif
|
---|
98 | .type NAME(g_abRTZero64K),#object
|
---|
99 | .size NAME(g_abRTZero64K),65536
|
---|
100 | #endif
|
---|
101 | NAME(g_abRTZero64K):
|
---|
102 |
|
---|
103 | #ifdef ASM_FORMAT_MACHO
|
---|
104 | .space 65536
|
---|
105 | #elif defined(ASM_FORMAT_ELF)
|
---|
106 | .skip 65536
|
---|
107 | #endif
|
---|
108 |
|
---|