From patchwork Sun Nov 5 20:02:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 161772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2285343vqu; Sun, 5 Nov 2023 12:03:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDbNOOiWJZSCULTe+wqmqbUBvUSjSdfYeoAm0NnOkfObkhXXX8qcU2tlrficf3saNMSuKX X-Received: by 2002:a05:6214:1313:b0:656:4712:af9f with SMTP id pn19-20020a056214131300b006564712af9fmr38611067qvb.13.1699214586581; Sun, 05 Nov 2023 12:03:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699214586; cv=pass; d=google.com; s=arc-20160816; b=Mg/xKx/1jPWqhraCrJbGNUlSqWlgB90WhfaSTQyKb5uUmvrP4vs2a+mIDtg9Np32+h 1mPp31pqSuugzzCsIdp8k3Va49XCLtle2suYGZHTs09i161P2iPiYMUqTHIcZZl5hONt WihLP7AFc46n3nVW+PBXjQdy84MIha/BLJKyEdm3DaZsaGbTf4vxDhjR48d2FoCjwvsZ 3oQYpWFmEdrAVMBt54ICaJxlQM1vxS3hYxcc2XkxSeaFUrAZcJc02QkLNLwOa4AhXvem UW3mLIR++fmrd93HdovvSEoBQRkF5p9QqvEEMNuAPY3YbDVomFHdi2c4ew+I8BV5cx5n Cy9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:subject:message-id:date:from :mime-version:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=wlO67h25EFRGH5dsx5DlQzkDoTY6p+s9Z0Lf+MSqYjQ=; fh=XNn3asQvIblazGK92GBt13dVv+YmGV3pBS0JC29ZQco=; b=eRvJj9FVOWFl2Anh2tUOx6D/pOIncsT5r/Vts/9+/jmIFPHvCz64Zu9Z2sE7geaegj Tnj1nQOdTZPfxyFH0gbcloxIayuzV2KlmE/5uKaMjqWAyDgdNB6QNCE9KVSqUPrtL3pQ TrIgWcmH9LW2uZNecDzdo5Tp33trNBkKTzMThMJXsdLass7UeqrxPVZF8SeZdU5gFb9L ERjyvTBo7l+n9/iK958su/h5RY1OYA7RHsXW3VNjbIn6mYailEj75fDzWTmyOECA4h+1 r/pGwJOSIZJap9hlBI3Y/4sq+OAaz3A+iL9h1OyW/N0q3N34DTnbEPJHkQSirX7GgcZV 0tIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RPier2oY; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id x4-20020a0ceb84000000b0066d854ccbe4si4359661qvo.449.2023.11.05.12.03.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 12:03:06 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.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=@gmail.com header.s=20230601 header.b=RPier2oY; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AA8E33856967 for ; Sun, 5 Nov 2023 20:02:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 967C03858C20 for ; Sun, 5 Nov 2023 20:02:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 967C03858C20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 967C03858C20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::534 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699214553; cv=none; b=Hu5zvRzUp2HfQsTc1ZTSQUvziAEwn/Ojn/nh+1qBsfYmVBniepcydXy0aO1IVaxD7UgvX+qje3zxlu9j6CmO2fyR7JJk0DacW0N/0r2+v9x5HIJXl88JHBMiCdQQZiqsXy4bSganuwT3HUYIexgVYE1OyRTtZku6QaqLikhuv2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699214553; c=relaxed/simple; bh=xXpQlyIT/oF7v2JG6TiupEA43++RVAO/jTUf2wS8ZfA=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=VVR+2jtesynNusuljAYaAkVXyj4OW9O+DgP5p2md4tdSU1HNDDgPc6Z1bEactMQfCR+KU4ffYnoMEl4hwcWZgaZvKGIIx07qTw0QGu9YXaRIprSqUaW4ico7Hl8egq/dRNnM8nsQNymxikEyzMvRs1+U3cRRrgLSerJugF0TNVc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-53e08b60febso6464658a12.1 for ; Sun, 05 Nov 2023 12:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699214550; x=1699819350; darn=gcc.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=wlO67h25EFRGH5dsx5DlQzkDoTY6p+s9Z0Lf+MSqYjQ=; b=RPier2oYUQtiTnIy0C34PneOWRgH18rl1KrcF4dbi+Sb5iWtyBJIFzMwWyGDchvC7w GcV3HBIxnBipqrPpC8vE9tCHiscEQuSa5HYFZd5RCN6cUPwXzbvcwGvWls2JChIcTQ+v dPGD2TyXq3yjZUx4yB2L2970Y0VcrLH6FW8zz108DJIk8ufSBT6xa5XNr1H6aB4Yclou Y6s5pSHf6beE0SXMtEB0LuzBrbBESIZ4vg5z9opJ49i1xbhOUKweHV+1yhr+5BZqAIDg 1F8X5O1DaNTATjsyJ3wzcT6VzvuELpk3lm3lPFyip8ogpfR5f+SGJKxswCA058dqIaUv LJ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699214550; x=1699819350; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wlO67h25EFRGH5dsx5DlQzkDoTY6p+s9Z0Lf+MSqYjQ=; b=KWAb1xYIHEFRUaNVlkcg96hO36N9x1tQr03e5+z6DQy+ZkHLu5fUkGrSYa3ormr9t5 2OlsQBal1U3vMhzKJjz1jWzdbkzEg3P3YgQeh8jPuDRTiAB0ifdgRZF1KV2GiiJ+Y9id bDZ2W4yVZjgaWLqiXNCdgAGBisUI3ZGVipXcdXmnDpWw4TWvyuBGoRxJ0ZKOk10jvEXa cJANKqMRAWdmq5fIPHY50FMzP+XYz/wFqk/9+Rbjq4ps6aMqIwLz7uvFZDRPY5VSrFAi gEihAfSAJIFEH0Cec6e/X+gyCeWJRd7BgWXh44Rw3sP5KiTMzdIrp45kIOFZMDFiSuO4 Gb8g== X-Gm-Message-State: AOJu0YycQ0bZkNjmsjAhEEHxXdctsngzfGsy0xbF2Ruz/9BOsobcrr7F im9Ok8fRitNgo6HR/fTuqx+pDQXFzsbqjfBa0ZjmwcQ9R2a5ng== X-Received: by 2002:a50:9b06:0:b0:543:d642:949f with SMTP id o6-20020a509b06000000b00543d642949fmr9840900edi.3.1699214549700; Sun, 05 Nov 2023 12:02:29 -0800 (PST) MIME-Version: 1.0 From: Uros Bizjak Date: Sun, 5 Nov 2023 21:02:18 +0100 Message-ID: Subject: [committed] i386: Add LEGACY_INDEX_REG register class. To: "gcc-patches@gcc.gnu.org" X-Spam-Status: No, score=-7.8 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, SCC_5_SHORT_WORD_LINES, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781755634533311264 X-GMAIL-MSGID: 1781755634533311264 Also rename LEGACY_REGS to LEGACY_GENERAL_REGS. gcc/ChangeLog: * config/i386/i386.h (enum reg_class): Add LEGACY_INDEX_REGS. Rename LEGACY_REGS to LEGACY_GENERAL_REGS. (REG_CLASS_NAMES): Ditto. (REG_CLASS_CONTENTS): Ditto. * config/i386/constraints.md ("R"): Update for rename. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Uros. diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md index dc91bd94b27..f6275740eb2 100644 --- a/gcc/config/i386/constraints.md +++ b/gcc/config/i386/constraints.md @@ -23,7 +23,7 @@ ;; Integer register constraints. ;; It is not necessary to define 'r' here. -(define_register_constraint "R" "LEGACY_REGS" +(define_register_constraint "R" "LEGACY_GENERAL_REGS" "Legacy register---the eight integer registers available on all i386 processors (@code{a}, @code{b}, @code{c}, @code{d}, @code{si}, @code{di}, @code{bp}, @code{sp}).") diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index a56367a947b..3367197a633 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1307,12 +1307,16 @@ enum reg_class Q_REGS, /* %eax %ebx %ecx %edx */ NON_Q_REGS, /* %esi %edi %ebp %esp */ TLS_GOTBASE_REGS, /* %ebx %ecx %edx %esi %edi %ebp */ - INDEX_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp */ - LEGACY_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp %esp */ + LEGACY_GENERAL_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp %esp */ + LEGACY_INDEX_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp */ GENERAL_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp %esp %r8 %r9 %r10 %r11 %r12 %r13 %r14 %r15 %r16 %r17 %r18 %r19 %r20 %r21 %r22 %r23 %r24 %r25 %r26 %r27 %r28 %r29 %r30 %r31 */ + INDEX_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp + %r8 %r9 %r10 %r11 %r12 %r13 %r14 %r15 + %r16 %r17 %r18 %r19 %r20 %r21 %r22 %r23 + %r24 %r25 %r26 %r27 %r28 %r29 %r30 %r31 */ GENERAL_GPR16, /* %eax %ebx %ecx %edx %esi %edi %ebp %esp %r8 %r9 %r10 %r11 %r12 %r13 %r14 %r15 */ INDEX_GPR16, /* %eax %ebx %ecx %edx %esi %edi %ebp @@ -1376,9 +1380,10 @@ enum reg_class "CLOBBERED_REGS", \ "Q_REGS", "NON_Q_REGS", \ "TLS_GOTBASE_REGS", \ - "INDEX_REGS", \ - "LEGACY_REGS", \ + "LEGACY_GENERAL_REGS", \ + "LEGACY_INDEX_REGS", \ "GENERAL_REGS", \ + "INDEX_REGS", \ "GENERAL_GPR16", \ "INDEX_GPR16", \ "FP_TOP_REG", "FP_SECOND_REG", \ @@ -1416,11 +1421,12 @@ enum reg_class { 0x0f, 0x0, 0x0 }, /* Q_REGS */ \ { 0x900f0, 0x0, 0x0 }, /* NON_Q_REGS */ \ { 0x7e, 0xff0, 0x0 }, /* TLS_GOTBASE_REGS */ \ - { 0x7f, 0xff0, 0xffff000 }, /* INDEX_REGS */ \ - { 0x900ff, 0x0, 0x0 }, /* LEGACY_REGS */ \ - { 0x900ff, 0xff0, 0xffff000 }, /* GENERAL_REGS */ \ + { 0x900ff, 0x0, 0x0 }, /* LEGACY_GENERAL_REGS */ \ + { 0x7f, 0x0, 0x0 }, /* LEGACY_INDEX_REGS */ \ + { 0x900ff, 0xff0, 0xffff000 }, /* GENERAL_REGS */ \ + { 0x7f, 0xff0, 0xffff000 }, /* INDEX_REGS */ \ { 0x900ff, 0xff0, 0x0 }, /* GENERAL_GPR16 */ \ - { 0x0007f, 0xff0, 0x0 }, /* INDEX_GPR16 */ \ + { 0x7f, 0xff0, 0x0 }, /* INDEX_GPR16 */ \ { 0x100, 0x0, 0x0 }, /* FP_TOP_REG */ \ { 0x200, 0x0, 0x0 }, /* FP_SECOND_REG */ \ { 0xff00, 0x0, 0x0 }, /* FLOAT_REGS */ \