From patchwork Fri Jun 16 07:25:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 108892 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1146822vqr; Fri, 16 Jun 2023 00:26:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6R8qmCt4Z1k+VWj8r2Biu6kVRXnBM+0DQK4Xz57u/cs1viWhX2CYhedA5fHbEpCAF92EkW X-Received: by 2002:a17:906:ef0a:b0:978:2b56:d76e with SMTP id f10-20020a170906ef0a00b009782b56d76emr6206413ejs.12.1686900387278; Fri, 16 Jun 2023 00:26:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686900387; cv=pass; d=google.com; s=arc-20160816; b=DMIv9oJTzI1Y024p9yaDQbnT8YZjEB2yDYg7+2EDl7Hdd3g9o89T4pUHw7ksiPFwMm iYgFGmawbYfirXuVPIxoyFhMQhcmi9bVvABUgCaU7kTgPGHX/jKdSuT3FKRro29JkVm2 BlN2VI15uGNg0UhXWD8mRqW/mGgvUsqvW6syBlOqgKz7qzO+U8EbKiEIKdEwfgLEo9oE E9zfFEg5xapvCm9WzqaEMDngpoEiZiEEQ7BQP38q+6GdJjCo0ms81NoiSLj/gB49oN+3 wdZbl89wUxGBPAYoJ52T0sdzGj2eNqMn1AiT3x77ZPyQmr/WPUzclSIWntgSWps7nl4R zX/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dmarc-filter:delivered-to; bh=ZkxLIzi8tPPzG/hbvGgS6WHD+UBKVVjR+WTKdnGCZoY=; b=JEihAJeejMtblduU0dUKwXeCHB1Rb+H5jgUdJs6f6hKTzIMNX6EWGiHhM0I+fAQ0Hn 2k8Y9kR7x+NKHA5Hj/A+LombzvohLuvO5e8gIakL2hjkjuLHbbHjcOe6EYXsoIGJGBBZ jtwKJY9FQaRokBd5TOU8CbCnvhAWSLdovXtx5bpV4lkBvbGfOUIy4UzKlLksGGfjYs+6 5BWcSRM3BAdkpz4TaBTGzA/dGjp4UGkB1fpLV66v5iCKMNngiEUPFVWzKsaBkCA9X2v2 aJsgKaSITaXebQ+PHRbOLSZFOIM28hkaAjs7hZN4gd/Qb0qVzIXQ5oj+7JkLO4gROMp8 6dlQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=uBFtK2QL; arc=pass (i=1 spf=pass spfdomain=cipunited.com dkim=pass dkdomain=cipunited.com dmarc=pass fromdomain=cipunited.com); 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" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a22-20020a170906275600b00965ab5999c6si7529992ejd.93.2023.06.16.00.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 00:26:27 -0700 (PDT) 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=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=uBFtK2QL; arc=pass (i=1 spf=pass spfdomain=cipunited.com dkim=pass dkdomain=cipunited.com dmarc=pass fromdomain=cipunited.com); 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E12AF385480C for ; Fri, 16 Jun 2023 07:26:16 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2103.outbound.protection.outlook.com [40.107.255.103]) by sourceware.org (Postfix) with ESMTPS id 8972D385701B for ; Fri, 16 Jun 2023 07:26:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8972D385701B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cipunited.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cipunited.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m/kkhkfpfi4SAr8B1Jz8YhbUhJuNRBUr71c9sxuQgrr0mc51/vm6P09RiLfvXc5I7lmsXWfHHzZxZl1lU05lMhkLS1gSx6nhai3AD8a3BiGuF7suq+Wpb4lamLGD29JLYYahV4Te0PLtAopW8O/0XSI5HRZz109sbivCqsN0NRj8omn6eG5+bsZIB+L1tl3u+MbwniMS+BmesSt9Rq7VA2RHaZIZR+Rexx3Klmr+g5SHqe6YcE+0sL0yfcz+fwj7JF6A5+BuUl8/LAj/i2GeB3httRmf9HYFLXosP73sKuz+cEI19JmOh2yEPqLYe897fWRQFH+ZKxxrZuWevJETxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZkxLIzi8tPPzG/hbvGgS6WHD+UBKVVjR+WTKdnGCZoY=; b=QdMvj6jIXkNpjGxMmsPuoZa6JTFCq/H7UksM02sa3V0Gf7/kVpe1e67gUAAV6QIRTDU2dY+ncWSn8FHB5jA5XMspVdtdEJs7FFDid49cqmaUxlGon9avkVqYuIq+s5JG38OgtqJ2lBfy06shRDkWJJLFJf+Yk5Mw9Jrc9YHtmodSAHLy9Oe/JeUks6GoAAbbHj0K/N8jZ5h85BzXZP0iLNJbCaVSYjNH4pKrLoSgAMVzsvOZrJYqKDUjocoULY2jI4A9iyfsbIfWLyOufm3qksVktKFd1k2KzSUenoeovXnSfC4bzCKHfvzndHIN5pzrM91XZit2eSZt10YK8xdz6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cipunited.com; dmarc=pass action=none header.from=cipunited.com; dkim=pass header.d=cipunited.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cipunited.onmicrosoft.com; s=selector1-cipunited-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZkxLIzi8tPPzG/hbvGgS6WHD+UBKVVjR+WTKdnGCZoY=; b=uBFtK2QLjLaTZqyv/z0KhS7fQhHoYx5R1Hv+UN0wsYS3NB2ppE549MASYM/uOshRWHpqZawoyj9mXdKsR4wloZENztiMkKpLDGqEj3xOa1+nhR08zSKz1yyZn/JzgJ4OyIfZQzLS2e879eUofCjJYfcPa7Eeeq3caTUdi7OYdyE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cipunited.com; Received: from SEZPR04MB6121.apcprd04.prod.outlook.com (2603:1096:101:98::10) by PSAPR04MB4374.apcprd04.prod.outlook.com (2603:1096:301:35::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.27; Fri, 16 Jun 2023 07:25:56 +0000 Received: from SEZPR04MB6121.apcprd04.prod.outlook.com ([fe80::8969:4dde:3fc5:33c9]) by SEZPR04MB6121.apcprd04.prod.outlook.com ([fe80::8969:4dde:3fc5:33c9%4]) with mapi id 15.20.6500.026; Fri, 16 Jun 2023 07:25:56 +0000 From: YunQiang Su To: binutils@sourceware.org Cc: macro@orcam.me.uk, paul.hua.gm@gmail.com, YunQiang Su Subject: [PATCH v3 2/2] MIPS: Sync oprand char usage between mips and micromips Date: Fri, 16 Jun 2023 15:25:36 +0800 Message-Id: <20230616072536.1805704-2-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230616072536.1805704-1-yunqiang.su@cipunited.com> References: <20230616072536.1805704-1-yunqiang.su@cipunited.com> X-ClientProxiedBy: SG2PR02CA0038.apcprd02.prod.outlook.com (2603:1096:3:18::26) To SEZPR04MB6121.apcprd04.prod.outlook.com (2603:1096:101:98::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR04MB6121:EE_|PSAPR04MB4374:EE_ X-MS-Office365-Filtering-Correlation-Id: 3fd1c95a-16b5-4f0c-b80e-08db6e3aed04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YdZKGuifYqhQdpTooLyTSQgP3uixySGnoPOOF0Rbe5uLZVxO/8eKZ17ENTmMRCNdM+/C4pseL7+ytvfjW9m2aAD42i/2oFBRG3DTSNDbK3RtXk25H9iVzJOaNYLwa+lsQQS3NIZ3RJ5h84ZQ8x6rm71tbYgpz5BeAgelfSrOjR2yuRtM2oYSOYq0/bQJdyyDf8nUqQL4fd6kpGaKKA0HrFzi05YCS4fLbKjhBwkF2Sw/bqkCv1HSIDg/ptV1I03aDAP7+MyKzWDO9Lf8Ceq12c8eG/1bbLWtDGtJDWM/Mv3koQZrH4ZelxJdgXAk2XoFSZFMiOpCoVM8PeBjTATvz/SvjWOYBSY2cBhjcQOouQhd1133gqINspfoZm6kt5/F5yBRBz8A0/xNeKrqGO9ptftjfyHEnXNuD7Vc1QAN0HO4QxV4O4coWQ/QHTwlmywuyZSxD3yIIvS0wzhgB7uWMcPYwAH4unXBCDt/q7ueHfclUpWwk4m7SrpDIxzjMj1ZLpWPUPptnes+ACb7GX/WBAzKqgrlKoV4cFAns6q/R9RdpUk9dRBNFHst1DFeEf53mXUoF+oW9t1SOma3oeyst1kys4a2P5TaW4ttmFRLbsahld0Bwb2nbee663IiHznX X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SEZPR04MB6121.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(39830400003)(396003)(346002)(376002)(366004)(451199021)(8676002)(8936002)(6666004)(41300700001)(5660300002)(30864003)(2906002)(316002)(66946007)(6916009)(4326008)(66476007)(66556008)(36756003)(478600001)(52116002)(6486002)(38100700002)(38350700002)(86362001)(186003)(2616005)(83380400001)(107886003)(6512007)(6506007)(1076003)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LiDvOsRszqeBqGrCfXoa1Ezni7vioOOhiTWUZb2NLplY7bMlo12/B2h8wSwKTcb5mnPfavbDrkQ5OVdltacKI/KT76yu7YpuuswGP2TIUyUR+aOXjkWAO0JjuJcMSt/wfl8UvnEOMPOSWKCzJKCreyzmHcEpRZhdOfES+x9Nv75cYNxw4pSnuP9I1M2zro2mjJXE2nFnhgp8gkBKmSSIc3RgzEuz9B7YVuksyUbmqWdbsoxz0iuTCgm3/ko8TuJjQNvjAwpe3FDW2i6TOcSC2bIBjnMcPTYTdC3SSlicBzMVhFhaFksxdg95TUqM9/173omktB1puH8QQ2JiB0I75gIHn4kL1WIHn2As3XSikHXOu/U9/7/N7SKAVcAGujncPo355p/i9qtdzR+LjFhUZUsZFgSbqxJKpF6Oga+vW+HhKmUfvbaNCN13GxlaaZHx5ii/KcfkcKRjDaxn1y+R0QNVoZDIY7XC9FCGhyOAybZG0rFWd0Dh7RPSBH09T+0XB1nsuH16dq4bNt2N4ZuSQ1ZLcSRdU0WkFtcIvV+awYNbRCAT1LuQkNc8/2eR76Ym0f6wm51ZxS3R2tJxajXNjvhkgk1IlNwXiIN/Hz2hdKuRzxWPgpLMR5p6qcvHMjI14MKoj3cO/h1sQtxGMMAHvxySeSuD1E2a4Oy73Il7fbFXybv9Vxd+/cZhbYyPqZkFaIJ9h18LzRh9cVCgTS8FXbKL1SUMyrhQYgzINaJcdlMxDIquNetSq/LDDbOZ42C1pb/EJIdcDIBituyodJZkd2dbHvrjAsPEIm5dKGk0GUo85nxAnAJsR8R1XdUaOXfiipere15yCOyAjBw4xVv5BlFa1i/9B6yEl+lQwQq4XsfpUUnboUAIScOiqLM9Rh1fD72AI9wfQLcxgAuQjAeNLzXRJE1I3kcp16ozIPEHdxON11KKxUKeS6IMtCSDeIKpuVhgf5Y1l5LqBK8aIOhuYWanhcfpONq0npLQP0NfpnOQhrW9Q91APwtwn6TV62qhb0knVN3rtqp5UDHk7MXnKtIwMdTsIEwmhcsZP8TUbsQqGYUzvR2m8mBR+5VE59BhK5EPpD1trnf2q0bGvvy8HvuAgfokT0nY1WAX4u3GI2Tvq0++Ohn2QmKqJRxuJoSx0/SFnn+l1rJjhQv3n2Iw3DyVmJGNT5SMPwWXcMFflWe0HIiTLVryYiGV9kglJX9729sz51g80pXDaj92sW327Qm6PjZAiEjtziBdhJ7uLJPAbxXT9roXFQ1YZsz0wRe5OiuQNV1Nb0iI0d2bmFei8dqREPnHer/vFdUyGVtEJly6UWZV4wjbBPxDzdtkk+xbQQYuTuUHdQkM39BtSSbb1h25b5xtjXwkpvEI8pWo/Tk+8g9zC2UQf2jP4nvhXUwdzCFOAPAgZg2ziTnR0zdSigot/v7oRnCwMCTC/XaacWiJ+90ZU1COzQ2o6XedUDeY38l7FXRzi4HxhaiLNWPsODZAJcMGIR1CyPjS7ozzX2rlWJ8cLwHdiJrQTr/I+VU/EuL8D4AQxUgGxA21iWwn8oj8sGOI56ygbafAfjeXEq6mSOSw0oSwXfjc/Ae13pxvEVgZXpms+sgjz6CpTKaq+g== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fd1c95a-16b5-4f0c-b80e-08db6e3aed04 X-MS-Exchange-CrossTenant-AuthSource: SEZPR04MB6121.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 07:25:56.7693 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e31cf5b5-ee69-4d5f-9c69-edeeda2458c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: znepQyS1/pY4DtfDbpDIhbQXJ2SzL8qBXWRaEVORKnT7bvsAcdGvtJkwp7vB8ES8ih3etNbvmKwnmMC1rCSM2YbKBkg9rmo6sOIvxBK96pM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR04MB4374 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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: 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: , 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?1768843260298187728?= X-GMAIL-MSGID: =?utf-8?q?1768843260298187728?= We should try our best to make mips32 using the same oprand char with micromips. So for mips32, we use: ^ is added for 5bit sa oprand for some new DSPr2 instructions: APPEND, PREPEND, PRECR_SRA[_R].PH.W the LSB bit is 11, like RD. +t is removed for coprocessor 0 destination register. 'E' does the samething. +t is now used for RX oprand for MFTR/MTTR (MT ASE) ? is added for sel oprand for MFTR/MTTR (MT ASE) For mips32, the position of sel in MFTR/MTTR is same with mfc0 etc, while for micromips, they are different. We also add an extesion format of cftc2/cttc2/mftc2/mfthc2/mttc2/mtthc2: concatenating rs with rx as the index of control or data. --- include/opcode/mips.h | 14 ++++++++++++-- opcodes/mips-opc.c | 28 ++++++++++++++++++---------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/include/opcode/mips.h b/include/opcode/mips.h index b21c9993945..c56d7423bb7 100644 --- a/include/opcode/mips.h +++ b/include/opcode/mips.h @@ -170,6 +170,10 @@ extern "C" { #define OP_MASK_SA3 0x7 #define OP_SH_SA4 21 #define OP_MASK_SA4 0xf +#define OP_SH_SA5 21 +#define OP_MASK_SA5 0x1f +#define OP_SH_SA5_D 11 +#define OP_MASK_SA5_D 0x1f #define OP_SH_IMM8 16 #define OP_MASK_IMM8 0xff #define OP_SH_IMM10 16 @@ -190,6 +194,10 @@ extern "C" { #define OP_MASK_MTACC_T 0x3 #define OP_SH_MTACC_D 13 #define OP_MASK_MTACC_D 0x3 +#define OP_MASK_MT_RX 0x1f +#define OP_SH_MT_RX 6 +#define OP_MASK_MT_SEL 0x7 +#define OP_SH_MT_SEL 0 /* MIPS MCU ASE */ #define OP_MASK_3BITPOS 0x7 @@ -890,7 +898,7 @@ mips_opcode_32bit_p (const struct mips_opcode *mo) "3" 3 bit unsigned immediate (OP_*_SA3) "4" 4 bit unsigned immediate (OP_*_SA4) "5" 8 bit unsigned immediate (OP_*_IMM8) - "6" 5 bit unsigned immediate (OP_*_RS) + "6" 5 bit unsigned immediate (OP_*_SA5) "7" 2 bit dsp accumulator register (OP_*_DSPACC) "8" 6 bit unsigned immediate (OP_*_WRDSP) "9" 2 bit dsp accumulator register (OP_*_DSPACC_S) @@ -898,14 +906,16 @@ mips_opcode_32bit_p (const struct mips_opcode *mo) ":" 7 bit signed immediate (OP_*_DSPSFT_7) "'" 6 bit unsigned immediate (OP_*_RDDSP) "@" 10 bit signed immediate (OP_*_IMM10) + "^" 5 bit unsigned immediate (OP_*_SA5_D) MT ASE usage: "!" 1 bit usermode flag (OP_*_MT_U) "$" 1 bit load high flag (OP_*_MT_H) "*" 2 bit dsp/smartmips accumulator register (OP_*_MTACC_T) "&" 2 bit dsp/smartmips accumulator register (OP_*_MTACC_D) + "?" 3-bit MFTR and MTTR sel (OP_SH_MT_SEL) "y" 5 bit control target register (OP_*_RT) - "+t" 5 bit coprocessor 0 destination register (OP_*_RT) + "+t" 5 bit control rx register (OP_*_MT_RX) MCU ASE usage: "~" 12 bit offset (OP_*_OFFSET12) diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c index 2cc82010a4b..320210266e9 100644 --- a/opcodes/mips-opc.c +++ b/opcodes/mips-opc.c @@ -117,7 +117,7 @@ decode_mips_operand (const char *p) case 'q': REG (0, 0, R5900_Q); case 'r': REG (0, 0, R5900_R); case 's': MSB (5, 11, 0, false, 31); /* (0 .. 31) */ - case 't': REG (5, 16, COPRO); + case 't': UINT (5, 6); case 'u': SPECIAL (3, 16, IMM_INDEX); case 'v': SPECIAL (2, 16, IMM_INDEX); case 'w': SPECIAL (1, 16, IMM_INDEX); @@ -151,10 +151,12 @@ decode_mips_operand (const char *p) case '@': SINT (10, 16); case '!': UINT (1, 5); case '$': UINT (1, 4); + case '^': HINT (5, 11); case '*': REG (2, 18, ACC); case '&': REG (2, 13, ACC); case '~': SINT (12, 0); case '\\': BIT (3, 12, 0); /* (0 .. 7) */ + case '?': UINT (3, 0); case '0': SINT (6, 20); case '1': HINT (5, 6); @@ -988,6 +990,7 @@ const struct mips_opcode mips_builtin_opcodes[] = {"cftc1", "d,y", 0x41000023, 0xffe007ff, WR_1|RD_C1|TRAP|LC, 0, 0, MT32, 0 }, {"cftc1", "d,T", 0x41000023, 0xffe007ff, WR_1|RD_C1|TRAP|LC, 0, 0, MT32, 0 }, {"cftc2", "d,y", 0x41000025, 0xffe007ff, WR_1|RD_C2|TRAP|LC, 0, 0, MT32, IOCT|IOCTP|IOCT2 }, +{"cftc2", "d,y,+t", 0x41000025, 0xffe0003f, WR_1|RD_C2|TRAP|LC, 0, 0, MT32, IOCT|IOCTP|IOCT2 }, {"cins32", "t,r,+p,+s", 0x70000033, 0xfc00003f, WR_1|RD_2, 0, IOCT, 0, 0 }, {"cins", "t,r,+P,+S", 0x70000033, 0xfc00003f, WR_1|RD_2, 0, IOCT, 0, 0 }, /* cins32 */ {"cins", "t,r,+p,+S", 0x70000032, 0xfc00003f, WR_1|RD_2, 0, IOCT, 0, 0 }, @@ -1005,6 +1008,7 @@ const struct mips_opcode mips_builtin_opcodes[] = {"cttc1", "t,g", 0x41800023, 0xffe007ff, RD_1|WR_CC|TRAP|CM, 0, 0, MT32, 0 }, {"cttc1", "t,S", 0x41800023, 0xffe007ff, RD_1|WR_CC|TRAP|CM, 0, 0, MT32, 0 }, {"cttc2", "t,g", 0x41800025, 0xffe007ff, RD_1|WR_CC|TRAP|CM, 0, 0, MT32, IOCT|IOCTP|IOCT2 }, +{"cttc2", "t,g,+t", 0x41800025, 0xffe0003f, RD_1|WR_CC|TRAP|CM, 0, 0, MT32, IOCT|IOCTP|IOCT2 }, {"cvt.d.l", "D,S", 0x46a00021, 0xffff003f, WR_1|RD_2|FP_D, 0, I3_33, 0, 0 }, {"cvt.d.s", "D,S", 0x46000021, 0xffff003f, WR_1|RD_2|FP_S|FP_D, 0, I1, 0, SF }, {"cvt.d.w", "D,S", 0x46800021, 0xffff003f, WR_1|RD_2|FP_S|FP_D, 0, I1, 0, SF }, @@ -1406,21 +1410,23 @@ const struct mips_opcode mips_builtin_opcodes[] = {"mfps", "t,P", 0x4000c800, 0xffe0ffc1, WR_1|RD_C0|LC, 0, M1|N5|EE, 0, 0 }, {"mftacx", "d", 0x41020021, 0xffff07ff, WR_1|RD_a|TRAP, 0, 0, MT32, 0 }, {"mftacx", "d,*", 0x41020021, 0xfff307ff, WR_1|RD_a|TRAP, 0, 0, MT32, 0 }, -{"mftc0", "d,+t", 0x41000000, 0xffe007ff, WR_1|RD_C0|TRAP|LC, 0, 0, MT32, 0 }, -{"mftc0", "d,E,H", 0x41000000, 0xffe007f8, WR_1|RD_C0|TRAP|LC, 0, 0, MT32, 0 }, +{"mftc0", "d,E", 0x41000000, 0xffe007ff, WR_1|RD_C0|TRAP|LC, 0, 0, MT32, 0 }, +{"mftc0", "d,E,?", 0x41000000, 0xffe007f8, WR_1|RD_C0|TRAP|LC, 0, 0, MT32, 0 }, {"mftc1", "d,T", 0x41000022, 0xffe007ff, WR_1|RD_2|TRAP|LC|FP_S, 0, 0, MT32, 0 }, {"mftc1", "d,E", 0x41000022, 0xffe007ff, WR_1|RD_2|TRAP|LC|FP_S, 0, 0, MT32, 0 }, {"mftc2", "d,E", 0x41000024, 0xffe007ff, WR_1|RD_C2|TRAP|LC, 0, 0, MT32, IOCT|IOCTP|IOCT2 }, +{"mftc2", "d,E,+t", 0x41000024, 0xffe0003f, WR_1|RD_C2|TRAP|LC, 0, 0, MT32, 0 }, {"mftdsp", "d", 0x41100021, 0xffff07ff, WR_1|TRAP, 0, 0, MT32, 0 }, {"mftgpr", "d,t", 0x41000020, 0xffe007ff, WR_1|RD_2|TRAP, 0, 0, MT32, 0 }, {"mfthc1", "d,T", 0x41000032, 0xffe007ff, WR_1|RD_2|TRAP|LC|FP_D, 0, 0, MT32, 0 }, {"mfthc1", "d,E", 0x41000032, 0xffe007ff, WR_1|RD_2|TRAP|LC|FP_D, 0, 0, MT32, 0 }, {"mfthc2", "d,E", 0x41000034, 0xffe007ff, WR_1|RD_C2|TRAP|LC, 0, 0, MT32, IOCT|IOCTP|IOCT2 }, +{"mfthc2", "d,E,+t", 0x41000034, 0xffe0003f, WR_1|RD_C2|TRAP|LC, 0, 0, MT32, 0 }, {"mfthi", "d", 0x41010021, 0xffff07ff, WR_1|RD_a|TRAP, 0, 0, MT32, 0 }, {"mfthi", "d,*", 0x41010021, 0xfff307ff, WR_1|RD_a|TRAP, 0, 0, MT32, 0 }, {"mftlo", "d", 0x41000021, 0xffff07ff, WR_1|RD_a|TRAP, 0, 0, MT32, 0 }, {"mftlo", "d,*", 0x41000021, 0xfff307ff, WR_1|RD_a|TRAP, 0, 0, MT32, 0 }, -{"mftr", "d,t,!,H,$", 0x41000000, 0xffe007c8, WR_1|TRAP, 0, 0, MT32, 0 }, +{"mftr", "d,t,!,?,$", 0x41000000, 0xffe007c8, WR_1|TRAP, 0, 0, MT32, 0 }, {"mfc0", "t,G", 0x40000000, 0xffe007ff, WR_1|RD_C0|LC, 0, I1, 0, 0 }, {"mfc0", "t,G,H", 0x40000000, 0xffe007f8, WR_1|RD_C0|LC, 0, I32, 0, 0 }, {"mfgc0", "t,G", 0x40600000, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT, 0 }, @@ -1562,10 +1568,11 @@ const struct mips_opcode mips_builtin_opcodes[] = {"mtsab", "s,j", 0x04180000, 0xfc1f0000, RD_1, 0, EE, 0, 0 }, {"mtsah", "s,j", 0x04190000, 0xfc1f0000, RD_1, 0, EE, 0, 0 }, {"mttc0", "t,G", 0x41800000, 0xffe007ff, RD_1|WR_C0|WR_CC|TRAP|CM, 0, 0, MT32, 0 }, -{"mttc0", "t,G,H", 0x41800000, 0xffe007f8, RD_1|WR_C0|WR_CC|TRAP|CM, 0, 0, MT32, 0 }, +{"mttc0", "t,G,?", 0x41800000, 0xffe007f8, RD_1|WR_C0|WR_CC|TRAP|CM, 0, 0, MT32, 0 }, {"mttc1", "t,S", 0x41800022, 0xffe007ff, RD_1|WR_2|TRAP|CM|FP_S, 0, 0, MT32, 0 }, {"mttc1", "t,G", 0x41800022, 0xffe007ff, RD_1|WR_2|TRAP|CM|FP_S, 0, 0, MT32, 0 }, {"mttc2", "t,G", 0x41800024, 0xffe007ff, RD_1|WR_C2|WR_CC|TRAP|CM, 0, 0, MT32, IOCT|IOCTP|IOCT2 }, +{"mttc2", "t,G,+t", 0x41800024, 0xffe0003f, RD_1|WR_C2|WR_CC|TRAP|CM, 0, 0, MT32, 0 }, {"mttacx", "t", 0x41801021, 0xffe0ffff, RD_1|WR_a|TRAP, 0, 0, MT32, 0 }, {"mttacx", "t,&", 0x41801021, 0xffe09fff, RD_1|WR_a|TRAP, 0, 0, MT32, 0 }, {"mttdsp", "t", 0x41808021, 0xffe0ffff, RD_1|TRAP, 0, 0, MT32, 0 }, @@ -1573,11 +1580,12 @@ const struct mips_opcode mips_builtin_opcodes[] = {"mtthc1", "t,S", 0x41800032, 0xffe007ff, RD_1|WR_2|TRAP|CM|FP_D, 0, 0, MT32, 0 }, {"mtthc1", "t,G", 0x41800032, 0xffe007ff, RD_1|WR_2|TRAP|CM|FP_D, 0, 0, MT32, 0 }, {"mtthc2", "t,G", 0x41800034, 0xffe007ff, RD_1|WR_C2|WR_CC|TRAP|CM, 0, 0, MT32, IOCT|IOCTP|IOCT2 }, +{"mtthc2", "t,G,+t", 0x41800034, 0xffe0003f, RD_1|WR_C2|WR_CC|TRAP|CM, 0, 0, MT32, 0 }, {"mtthi", "t", 0x41800821, 0xffe0ffff, RD_1|WR_a|TRAP, 0, 0, MT32, 0 }, {"mtthi", "t,&", 0x41800821, 0xffe09fff, RD_1|WR_a|TRAP, 0, 0, MT32, 0 }, {"mttlo", "t", 0x41800021, 0xffe0ffff, RD_1|WR_a|TRAP, 0, 0, MT32, 0 }, {"mttlo", "t,&", 0x41800021, 0xffe09fff, RD_1|WR_a|TRAP, 0, 0, MT32, 0 }, -{"mttr", "t,d,!,H,$", 0x41800000, 0xffe007c8, RD_1|TRAP, 0, 0, MT32, 0 }, +{"mttr", "t,d,!,?,$", 0x41800000, 0xffe007c8, RD_1|TRAP, 0, 0, MT32, 0 }, {"mul.d", "D,V,T", 0x46200002, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, I1, 0, SF }, {"mul.s", "D,V,T", 0x46000002, 0xffe0003f, WR_1|RD_2|RD_3|FP_S, 0, I1, 0, 0 }, {"mul.ob", "X,Y,Q", 0x78000030, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 }, @@ -2358,7 +2366,7 @@ const struct mips_opcode mips_builtin_opcodes[] = {"addu_s.ph", "d,s,t", 0x7c000310, 0xfc0007ff, WR_1|RD_2|RD_3, 0, 0, D33, 0 }, {"adduh.qb", "d,s,t", 0x7c000018, 0xfc0007ff, WR_1|RD_2|RD_3, 0, 0, D33, 0 }, {"adduh_r.qb", "d,s,t", 0x7c000098, 0xfc0007ff, WR_1|RD_2|RD_3, 0, 0, D33, 0 }, -{"append", "t,s,h", 0x7c000031, 0xfc0007ff, MOD_1|RD_2, 0, 0, D33, 0 }, +{"append", "t,s,^", 0x7c000031, 0xfc0007ff, MOD_1|RD_2, 0, 0, D33, 0 }, {"balign", "t,s,I", 0, (int) M_BALIGN, INSN_MACRO, 0, 0, D33, 0 }, {"balign", "t,s,2", 0x7c000431, 0xfc00e7ff, MOD_1|RD_2, 0, 0, D33, 0 }, {"cmpgdu.eq.qb", "d,s,t", 0x7c000611, 0xfc0007ff, WR_1|RD_2|RD_3, 0, 0, D33, 0 }, @@ -2373,9 +2381,9 @@ const struct mips_opcode mips_builtin_opcodes[] = {"mulq_s.w", "d,s,t", 0x7c000598, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, 0, D33, 0 }, {"mulsa.w.ph", "7,s,t", 0x7c0000b0, 0xfc00e7ff, RD_2|RD_3|MOD_a, 0, 0, D33, 0 }, {"precr.qb.ph", "d,s,t", 0x7c000351, 0xfc0007ff, WR_1|RD_2|RD_3, 0, 0, D33, 0 }, -{"precr_sra.ph.w", "t,s,h", 0x7c000791, 0xfc0007ff, MOD_1|RD_2, 0, 0, D33, 0 }, -{"precr_sra_r.ph.w", "t,s,h", 0x7c0007d1, 0xfc0007ff, MOD_1|RD_2, 0, 0, D33, 0 }, -{"prepend", "t,s,h", 0x7c000071, 0xfc0007ff, MOD_1|RD_2, 0, 0, D33, 0 }, +{"precr_sra.ph.w", "t,s,^", 0x7c000791, 0xfc0007ff, MOD_1|RD_2, 0, 0, D33, 0 }, +{"precr_sra_r.ph.w", "t,s,^", 0x7c0007d1, 0xfc0007ff, MOD_1|RD_2, 0, 0, D33, 0 }, +{"prepend", "t,s,^", 0x7c000071, 0xfc0007ff, MOD_1|RD_2, 0, 0, D33, 0 }, {"shra.qb", "d,t,3", 0x7c000113, 0xff0007ff, WR_1|RD_2, 0, 0, D33, 0 }, {"shra_r.qb", "d,t,3", 0x7c000153, 0xff0007ff, WR_1|RD_2, 0, 0, D33, 0 }, {"shrav.qb", "d,t,s", 0x7c000193, 0xfc0007ff, WR_1|RD_2|RD_3, 0, 0, D33, 0 },