From patchwork Fri Oct 27 21:42:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 23944 Received: (qmail 123860 invoked by alias); 27 Oct 2017 21:42:09 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 123851 invoked by uid 89); 27 Oct 2017 21:42:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_STOCKGEN, NO_DNS_FOR_FROM, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:7905 X-HELO: mga04.intel.com X-ExtLoop1: 1 Date: Fri, 27 Oct 2017 14:42:05 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] x86: Add sysdeps/x86/sysdep.h Message-ID: <20171027214205.GA17473@gmail.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) Add a new header file, sysdeps/x86/sysdep.h, for common assembly code macros bewteen i386 and x86-64. Tested on i686 and x86-64. There are no differences in outputs of "readelf -a" and "objdump -dw" on all glibc shared objects before and after the patch. Any comments? H.J. --- * sysdeps/i386/sysdep.h: Include instead of . (ALIGNARG): Removed. (ASM_SIZE_DIRECTIVE): Likewise. (ENTRY): Likewise. (END): Likewise. (ENTRY_CHK): Likewise. (END_CHK): Likewise. (syscall_error): Likewise. (mcount): Likewise. (PSEUDO_END): Likewise. (L): Likewise. (atom_text_section): Likewise. * sysdeps/x86/sysdep.h: New file. * sysdeps/x86_64/sysdep.h: Include instead of . (ALIGNARG): Removed. (ASM_SIZE_DIRECTIVE): Likewise. (ENTRY): Likewise. (END): Likewise. (ENTRY_CHK): Likewise. (END_CHK): Likewise. (syscall_error): Likewise. (mcount): Likewise. (PSEUDO_END): Likewise. (L): Likewise. (atom_text_section): Likewise. --- sysdeps/i386/sysdep.h | 45 +------------------------------- sysdeps/x86/sysdep.h | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ sysdeps/x86_64/sysdep.h | 42 +----------------------------- 3 files changed, 71 insertions(+), 85 deletions(-) create mode 100644 sysdeps/x86/sysdep.h diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h index d2b0860b99..5cd7f25e0d 100644 --- a/sysdeps/i386/sysdep.h +++ b/sysdeps/i386/sysdep.h @@ -16,7 +16,7 @@ License along with the GNU C Library; if not, see . */ -#include +#include #include /* For __GNUC_PREREQ. */ @@ -39,32 +39,6 @@ /* Syntactic details of assembler. */ -/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ -#define ALIGNARG(log2) 1<. */ + +#ifndef _X86_SYSDEP_H +#define _X86_SYSDEP_H 1 + +#include + +#ifdef __ASSEMBLER__ + +/* Syntactic details of assembler. */ + +/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ +#define ALIGNARG(log2) 1< +#include #ifdef __ASSEMBLER__ @@ -32,28 +32,6 @@ #define cfi_offset_rel_rsp(regn, off) .cfi_escape 0x10, regn, 0x4, 0x13, \ 0x77, off & 0x7F | 0x80, off >> 7 -/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ -#define ALIGNARG(log2) 1<