From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1792) id 9712F3858D37; Mon, 20 Feb 2023 00:33:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9712F3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676853208; bh=JqV+5XAzxiWpy4PAh297xFMV8Gs41e6lgLNsyM5kptc=; h=From:To:Subject:Date:From; b=cSpLSVUFc9qNHsaKl1b267HANK1r/w1Af58CNUj8xhCl7MEFDGKSCv6YNPQ26ygXr 0iMp/39ter3duQU9DfEPVZKK9RNYLC/RYjzHy8Oo9HyWqC8gBM+nBEWzJWshsYikQu +ObHO0rZgl5O8Tq69CEXBixzPKuYIfOB+9d3p5dM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Samuel Thibault To: glibc-cvs@sourceware.org Subject: [glibc] Define PC, SP and SYSRETURN for hurd x86_64 X-Act-Checkin: glibc X-Git-Author: Flavio Cruz X-Git-Refname: refs/heads/master X-Git-Oldrev: be318c0f38b6b72a0716edce818b755411e75600 X-Git-Newrev: b5b27ff1519d6ca20efcec46bc26964e1c7da68a Message-Id: <20230220003328.9712F3858D37@sourceware.org> Date: Mon, 20 Feb 2023 00:33:28 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b5b27ff1519d6ca20efcec46bc26964e1c7da68a commit b5b27ff1519d6ca20efcec46bc26964e1c7da68a Author: Flavio Cruz Date: Wed Feb 15 01:16:38 2023 -0500 Define PC, SP and SYSRETURN for hurd x86_64 Moved thread_state.h to x86 directory since we only need to customize those 3 definitions. Message-Id: Diff: --- sysdeps/mach/{i386 => x86}/thread_state.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sysdeps/mach/i386/thread_state.h b/sysdeps/mach/x86/thread_state.h similarity index 90% rename from sysdeps/mach/i386/thread_state.h rename to sysdeps/mach/x86/thread_state.h index 4e6ce1f7dd..5be0bec150 100644 --- a/sysdeps/mach/i386/thread_state.h +++ b/sysdeps/mach/x86/thread_state.h @@ -16,8 +16,8 @@ License along with the GNU C Library; if not, see . */ -#ifndef _MACH_I386_THREAD_STATE_H -#define _MACH_I386_THREAD_STATE_H 1 +#ifndef _MACH_X86_THREAD_STATE_H +#define _MACH_X86_THREAD_STATE_H 1 #include @@ -29,9 +29,15 @@ #define machine_thread_state i386_thread_state +#ifdef __x86_64__ +#define PC rip +#define SP ursp +#define SYSRETURN rax +#else #define PC eip #define SP uesp #define SYSRETURN eax +#endif #define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \ asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \ @@ -50,4 +56,4 @@ struct machine_thread_all_state #include -#endif /* mach/i386/thread_state.h */ +#endif /* mach/x86/thread_state.h */