master
 1/* Assembler macros for x32.
 2   Copyright (C) 2012-2025 Free Software Foundation, Inc.
 3   This file is part of the GNU C Library.
 4
 5   The GNU C Library is free software; you can redistribute it and/or
 6   modify it under the terms of the GNU Lesser General Public
 7   License as published by the Free Software Foundation; either
 8   version 2.1 of the License, or (at your option) any later version.
 9
10   The GNU C Library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with the GNU C Library; if not, see
17   <https://www.gnu.org/licenses/>.  */
18
19/* zig patch: inline x86-lp_size.h */
20
21#include <sysdeps/x86_64/sysdep.h>
22#undef LP_SIZE
23#ifdef __ASSEMBLER__
24# define LP_SIZE 4
25#else
26# define LP_SIZE "4"
27#endif
28
29#undef LP_OP
30#undef ASM_ADDR
31
32#undef RAX_LP
33#undef RBP_LP
34#undef RBX_LP
35#undef RCX_LP
36#undef RDI_LP
37#undef RDX_LP
38#undef RSP_LP
39#undef RSI_LP
40#undef R8_LP
41#undef R9_LP
42#undef R10_LP
43#undef R11_LP
44#undef R12_LP
45#undef R13_LP
46#undef R14_LP
47#undef R15_LP
48
49#ifdef	__ASSEMBLER__
50
51# define LP_OP(insn) insn##l
52
53# define ASM_ADDR .long
54
55# define RAX_LP	eax
56# define RBP_LP	ebp
57# define RBX_LP	ebx
58# define RCX_LP	ecx
59# define RDI_LP	edi
60# define RDX_LP	edx
61# define RSI_LP	esi
62# define RSP_LP	esp
63# define R8_LP	r8d
64# define R9_LP	r9d
65# define R10_LP	r10d
66# define R11_LP	r11d
67# define R12_LP	r12d
68# define R13_LP	r13d
69# define R14_LP	r14d
70# define R15_LP	r15d
71
72#else	/* __ASSEMBLER__ */
73
74# define LP_OP(insn) #insn "l"
75
76# define ASM_ADDR ".long"
77
78# define RAX_LP	"eax"
79# define RBP_LP	"ebp"
80# define RBX_LP	"ebx"
81# define RCX_LP	"ecx"
82# define RDI_LP	"edi"
83# define RDX_LP	"edx"
84# define RSI_LP	"esi"
85# define RSP_LP	"esp"
86# define R8_LP	"r8d"
87# define R9_LP	"r9d"
88# define R10_LP	"r10d"
89# define R11_LP	"r11d"
90# define R12_LP	"r12d"
91# define R13_LP	"r13d"
92# define R14_LP	"r14d"
93# define R15_LP	"r15d"
94
95#endif	/* __ASSEMBLER__ */