VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/misc/zero-alt.S@ 93288

Last change on this file since 93288 was 93288, checked in by vboxsync, 3 years ago

/Config.kmk,IPRT: Set arch bitness for assembler use through compiler for sparc32 and sparc64. Improve zero-alt.S to handle SPARC.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/* $Id: zero-alt.S 93288 2022-01-17 22:14:56Z 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_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#else
39# error "PORT ME!"
40#endif
41
42/* 64KB of zero memory with various sized labels. */
43 .globl NAME(g_abRTZeroPage)
44#ifdef ASM_FORMAT_ELF
45# if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
46 .hidden NAME(g_abRTZeroPage)
47# endif
48 .type NAME(g_abRTZeroPage),#object
49# if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
50 .size NAME(g_abRTZeroPage),8192
51# else
52 .size NAME(g_abRTZeroPage),4096
53# endif
54#endif
55NAME(g_abRTZeroPage):
56 .globl NAME(g_abRTZero4K)
57#ifdef ASM_FORMAT_ELF
58# if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
59 .hidden NAME(g_abRTZero4K)
60# endif
61 .type NAME(g_abRTZero4K),#object
62 .size NAME(g_abRTZero4K),4096
63#endif
64NAME(g_abRTZero4K):
65 .globl NAME(g_abRTZero8K)
66#ifdef ASM_FORMAT_ELF
67# if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
68 .hidden NAME(g_abRTZero8K)
69# endif
70 .type NAME(g_abRTZero8K),#object
71 .size NAME(g_abRTZero8K),8192
72#endif
73NAME(g_abRTZero8K):
74 .globl NAME(g_abRTZero16K)
75#ifdef ASM_FORMAT_ELF
76# if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
77 .hidden NAME(g_abRTZero16K)
78# endif
79 .type NAME(g_abRTZero16K),#object
80 .size NAME(g_abRTZero16K),16384
81#endif
82NAME(g_abRTZero16K):
83 .globl NAME(g_abRTZero32K)
84#ifdef ASM_FORMAT_ELF
85# if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
86 .hidden NAME(g_abRTZero32K)
87# endif
88 .type NAME(g_abRTZero32K),#object
89 .size NAME(g_abRTZero32K),32768
90#endif
91NAME(g_abRTZero32K):
92 .globl NAME(g_abRTZero64K)
93#ifdef ASM_FORMAT_ELF
94# if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
95 .hidden NAME(g_abRTZero64K)
96# endif
97 .type NAME(g_abRTZero64K),#object
98 .size NAME(g_abRTZero64K),65536
99#endif
100NAME(g_abRTZero64K):
101
102#ifdef ASM_FORMAT_MACHO
103 .space 65536
104#elif defined(ASM_FORMAT_ELF) && (defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64))
105 .skip 65536
106#endif
107
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette