From patchwork Thu Nov 17 17:05:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 21850 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp519993wrr; Thu, 17 Nov 2022 09:16:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf6WYVRAzZww7+8vbooZi976dVYVgT40mUmgZgNh5wc2JHz1UuxhubKfep/hZCTk62rY5NU1 X-Received: by 2002:a17:906:6d88:b0:7ad:b86b:3ff with SMTP id h8-20020a1709066d8800b007adb86b03ffmr3050092ejt.448.1668705383971; Thu, 17 Nov 2022 09:16:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668705383; cv=none; d=google.com; s=arc-20160816; b=Q/1p1s1uysvBXugsaWMKkUP92w5g6327aT97GgCXeu9RtDAKHPiNi8gpp0uexZ8zSi nLBs9V/7KyJmaE7A29JTtAH/p9UdMmrBewhN+rgaz+2LfW/dabn2beb60Qo1+yYpySLN e3irYKyrv5aHkjdQxo8PF+4rkA9hLcXrMrMKn0pNmu68rMDdMZb9k/b3uuimC0dEqMVg Y2Uth5k1XcNl28ly6NQMk632ZElhajb+L6FeH78PA2eK4TWmT8c0QTE4UymZPJqH+Djb kkySBl4DGaAwM5guQsAlGoR6JnjxXwvf6thpLPhVERd24Hgg08NnN0RUixcr6bgNupm/ uusA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ZG5wDSpn5PZs24u9BqArY3rhps2GDp00MwT4NOz8ckw=; b=uY9V8JHTp+I23a6gbsBM+Pbzf99cq1KX5loahaEFhRSRIFeqLlZvmL/2OWOgH6C3j9 EwM2thg+vVAvRq3hd4Q8ZaDlDbPQn1MGFNWxvpriqkfHf9z3+fRlQEILlICi18Jz+ahS n+riBP14T1Z2bEgLzRLxN2HGYtYr/AHFP/tC/2V0100n7WIf7vFAxAJH2MqrP7fWZ9i+ Fh6MhcwGEqs/DbPmRgQoPQhEpHqlHruFb6DlKaASvSO7ybJy1zinX7KtOiayIgnmsxt/ 4y7Tdf5lVY+5demQd3paJ57jKxV8FqfJbtUwvC0wZpO+MQLtyXWDtrmg9FOQdZmyU1rN 47Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=tphREp2m; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id nc27-20020a1709071c1b00b00783c42d2da1si1160090ejc.425.2022.11.17.09.16.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 09:16:23 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=tphREp2m; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E2F7B3847CC7 for ; Thu, 17 Nov 2022 17:06:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2F7B3847CC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668704760; bh=ZG5wDSpn5PZs24u9BqArY3rhps2GDp00MwT4NOz8ckw=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=tphREp2mBCdCNthzYwx/E+TFvh4BGDbkhFbR8zvcKAKRoj7YA5dUV/sm1c+13y6Yn 9v+ceqRNk9/iExGjUvgSmelmXkOvYwrG141t9cI2TUSsttMeYXQyoPezP3EM457Vfc sM/OnXquVLv1UEinZdHvVELlxOpaNPtqBtzkHga8= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 519DF3852216 for ; Thu, 17 Nov 2022 17:05:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 519DF3852216 Received: by mail-pj1-x102d.google.com with SMTP id k2-20020a17090a4c8200b002187cce2f92so764220pjh.2 for ; Thu, 17 Nov 2022 09:05:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZG5wDSpn5PZs24u9BqArY3rhps2GDp00MwT4NOz8ckw=; b=TQgDjErnxP4mFTmBnBGfLq+Nbtm6Puyg57MIK3XqVhsmUO0QMhiq6EARVcAnSAEPgF xnl2+egIfgJN6ZQc8EVrIG72xVD6pezse2ZsU3xmbwb/QE0Sl4BzjFnCE4S1xmtpjFpl j2ch0dkNEh0PdwIWPXWLMZCttOVtDStPDljCGX8BEPlOiteY3J1TtiTorY3M7N72pXfv tB3FmZYer0rPlG3jEhNBRBY9fwTV9U9uYpGBXu3f7RFIj0kUfsU5KL8b7u7LZoMzACqC ytsL+ZovvuKH8AwpH1hJ0ExVc+eLh+TLNE/SpsbjXWofUD1pMWvWnnpPgWckJAp+eaos M/+Q== X-Gm-Message-State: ANoB5plTpAPoG8Z8wWED7DMBX3peS+4TDAMYs4/RBy8+82zOT862q7RT jtOG1jz0TLKrUhz8Is55u+m31zWfBVs= X-Received: by 2002:a17:902:9f8f:b0:186:738e:5703 with SMTP id g15-20020a1709029f8f00b00186738e5703mr3505440plq.136.1668704749340; Thu, 17 Nov 2022 09:05:49 -0800 (PST) Received: from gnu-tgl-3.localdomain ([172.56.31.158]) by smtp.gmail.com with ESMTPSA id w4-20020a170902e88400b001868ed86a95sm1627976plg.174.2022.11.17.09.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 09:05:48 -0800 (PST) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id E013DC0263; Thu, 17 Nov 2022 09:05:46 -0800 (PST) To: binutils@sourceware.org Cc: Jan Beulich Subject: [PATCH] i386: Move i386_seg_prefixes to gas Date: Thu, 17 Nov 2022 09:05:46 -0800 Message-Id: <20221117170546.1941945-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-3026.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Binutils" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749764417129693278?= X-GMAIL-MSGID: =?utf-8?q?1749764417129693278?= gas/ * config/tc-i386.c (i386_seg_prefixes): New. Moved from opcodes. opcodes/ * i386-opc.c (i386_seg_prefixes): Removed. * i386-opc.h (i386_seg_prefixes): Likewise. --- gas/config/tc-i386.c | 10 ++++++++++ opcodes/i386-opc.c | 10 ---------- opcodes/i386-opc.h | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 5bc3a56e4b2..f54e7fddee0 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -464,6 +464,16 @@ static const struct RC_name RC_NamesTable[] = { saeonly, STRING_COMMA_LEN ("sae") }, }; +/* To be indexed by segment register number. */ +static const unsigned char i386_seg_prefixes[] = { + ES_PREFIX_OPCODE, + CS_PREFIX_OPCODE, + SS_PREFIX_OPCODE, + DS_PREFIX_OPCODE, + FS_PREFIX_OPCODE, + GS_PREFIX_OPCODE +}; + /* List of chars besides those in app.c:symbol_chars that can start an operand. Used to prevent the scrubber eating vital white-space. */ const char extra_symbol_chars[] = "*%-([{}" diff --git a/opcodes/i386-opc.c b/opcodes/i386-opc.c index 66566bd54b6..729c22932b1 100644 --- a/opcodes/i386-opc.c +++ b/opcodes/i386-opc.c @@ -22,13 +22,3 @@ #include "libiberty.h" #include "i386-opc.h" #include "i386-tbl.h" - -/* To be indexed by segment register number. */ -const unsigned char i386_seg_prefixes[] = { - ES_PREFIX_OPCODE, - CS_PREFIX_OPCODE, - SS_PREFIX_OPCODE, - DS_PREFIX_OPCODE, - FS_PREFIX_OPCODE, - GS_PREFIX_OPCODE -}; diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h index 168729fec62..459268f3656 100644 --- a/opcodes/i386-opc.h +++ b/opcodes/i386-opc.h @@ -1014,4 +1014,3 @@ reg_entry; extern const reg_entry i386_regtab[]; extern const unsigned int i386_regtab_size; -extern const unsigned char i386_seg_prefixes[6];