summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-12-25 18:43:58 +0100
committerAndreas Kling <kling@serenityos.org>2022-12-28 11:53:41 +0100
commit7b9ea3efdec9f86a1042893e8107d0b23aad8727 (patch)
treeca8e97f3a02c61f75d07625f28dab3e69998d53d /Userland
parent36980d2a66668a164079bef80c31952698e928da (diff)
downloadserenity-7b9ea3efdec9f86a1042893e8107d0b23aad8727.zip
Kernel+Userland: Remove uses of the __i386__ compiler macro
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibC/elf.h6
-rw-r--r--Userland/Libraries/LibC/inttypes.h9
-rw-r--r--Userland/Libraries/LibC/setjmp.h13
3 files changed, 5 insertions, 23 deletions
diff --git a/Userland/Libraries/LibC/elf.h b/Userland/Libraries/LibC/elf.h
index 9d968e59bf..76baf1525e 100644
--- a/Userland/Libraries/LibC/elf.h
+++ b/Userland/Libraries/LibC/elf.h
@@ -39,11 +39,7 @@
# include <AK/Types.h>
#endif
-#ifdef __i386__
-# define ElfW(type) Elf32_##type
-#else
-# define ElfW(type) Elf64_##type
-#endif
+#define ElfW(type) Elf64_##type
typedef uint8_t Elf_Byte;
diff --git a/Userland/Libraries/LibC/inttypes.h b/Userland/Libraries/LibC/inttypes.h
index 21d114add9..aad48a1022 100644
--- a/Userland/Libraries/LibC/inttypes.h
+++ b/Userland/Libraries/LibC/inttypes.h
@@ -12,13 +12,8 @@
__BEGIN_DECLS
-#ifdef __i386__
-# define __PRI64_PREFIX "ll"
-# define __PRIPTR_PREFIX
-#else
-# define __PRI64_PREFIX "l"
-# define __PRIPTR_PREFIX "l"
-#endif
+#define __PRI64_PREFIX "l"
+#define __PRIPTR_PREFIX "l"
#define PRId8 "d"
#define PRId16 "d"
diff --git a/Userland/Libraries/LibC/setjmp.h b/Userland/Libraries/LibC/setjmp.h
index 3b4c7d9a75..d4b7c75db1 100644
--- a/Userland/Libraries/LibC/setjmp.h
+++ b/Userland/Libraries/LibC/setjmp.h
@@ -19,14 +19,7 @@ __BEGIN_DECLS
//
struct __jmp_buf {
-#ifdef __i386__
- uint32_t ebx;
- uint32_t esi;
- uint32_t edi;
- uint32_t ebp;
- uint32_t esp;
- uint32_t eip;
-#elif defined(__x86_64__)
+#if defined(__x86_64__)
uint64_t rbx;
uint64_t r12;
uint64_t r13;
@@ -52,9 +45,7 @@ typedef struct __jmp_buf sigjmp_buf[1];
* Since setjmp.h may be included by ports written in C, we need to guard this.
*/
#ifdef __cplusplus
-# ifdef __i386__
-static_assert(sizeof(struct __jmp_buf) == 32, "struct __jmp_buf unsynchronized with i386/setjmp.S");
-# elif defined(__x86_64__)
+# if defined(__x86_64__)
static_assert(sizeof(struct __jmp_buf) == 72, "struct __jmp_buf unsynchronized with x86_64/setjmp.S");
# elif defined(__aarch64__)
static_assert(sizeof(struct __jmp_buf) == 184, "struct __jmp_buf unsynchronized with aarch64/setjmp.S");