From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YIumIu9aXGdfeRUAWB0awg (envelope-from ) for ; Fri, 13 Dec 2024 11:03:59 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=UQLMkRWM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8A5A11E097; Fri, 13 Dec 2024 11:03:59 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2F5C71E091 for ; Fri, 13 Dec 2024 11:03:59 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CEB2E3858294 for ; Fri, 13 Dec 2024 16:03:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEB2E3858294 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=UQLMkRWM Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id 0F5B13858C52 for ; Fri, 13 Dec 2024 15:57:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F5B13858C52 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 0F5B13858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::530 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734105457; cv=none; b=RtZaZrEVzhf0yauZjHH59T7hEO5xyYwO1IpPW5FO1UHsPgj7N7k8YYhzWkHBb75GmMX02JytnPWv2QYz1DqZjSqYehUeTnB06nbUX9xeCGWVPA0nz2lVmdSgf1cw0tO8S8hMkepEp0Wwbv5iFFv3hOrDolzd/0LaGGURwLfK/c0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734105457; c=relaxed/simple; bh=jPuzVspSvQEFONCOzncL/Z1hx5wssUSaFfVdVlb2SMM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=SfSUIPvFsPWiNA1q7LV/lgokj7SytclhE5TaSAWrom701o23Do3zh4Hycsc2vkJpn49yksasCNQgacr/uSzo8xg3T/3yDhuPtCo1mEVKUm/2wiZUOAQY7JNBWVQDVhrBJ/4zLFQich0b63rBoYtFqtMMPhDRoViYEL41dRVYGAg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F5B13858C52 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5d2726c0d45so3367063a12.2 for ; Fri, 13 Dec 2024 07:57:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734105455; x=1734710255; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ORZT7/W4lzTZC96cbA/8z2yd+DarTTQaXC77dyT3z5A=; b=UQLMkRWMljODw3Th64s7s3+FjaJ5ytvsfs1aXwErywC6fBwoHg/xZlJbQgHzOGcb2q HaIDmHrFA+FYrQPzyXXEht3ZWLOmzpKeaJTNE5zHMwyMfD/Tdoe/rdCg5UmTxLJBeyzp S4g0qNEyrjlvn2NpEnNrikrNcMP/tVSL09upfj3u8ZUeQgjaTVl6PyX4M8/64bjZcspQ +NZnlbZSgT6BblIHy3BD8DVBVzialNgW3SdRbNd0MWWE92JoSsd/yEtD5DH05FsqtlHA qaX8a3wSrNcwgXn1OA1RxVVLbdkROTeDBXH0XRUi4LcqELY50+lqE7q3tgTw7aZ2poDx Ao/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734105455; x=1734710255; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ORZT7/W4lzTZC96cbA/8z2yd+DarTTQaXC77dyT3z5A=; b=Wp+wmo9w89eSGouBNX9uhMp5dWg4tTdo5Srzo4iD2BztSQ0fiv+mB5922+iNZiAL6c MvJulgKIkwrJ/SFtIvyQa6xA9kImCjJOYkN8y1U15Z1/M6q5uJAqkLaZHKiTzWR7w9fY ja7gxkZiqEugP7ksaljw7oi4lp+iOKrO4q4+3cmmzc25qh4T5egCfZ3jj01cR3pi0V0q E566Z6IRSG/xNwV+uhmb3AB41gqwe1OLIfIptrEjnSD738Rk74bUUfCDREb9USLb0Y8o cioDERlQI4Ml8wOtnTXwSY7NUcWIogat9nV1rv7DJRV7Yimq4d+vPPmf8+UQYbpUAanJ w/9A== X-Gm-Message-State: AOJu0Yz9W3BptSH3YAikJELkO9dtSfw63awhE7ek3zlNayZt5aYpJEYh BjrCRyiJX0/x3itc9E9pKcPgPfi5rcF+csHbJBbi+i9FDP1aHMbvQMhSMiu1 X-Gm-Gg: ASbGncsb6WpiVRjdaa2uBbbftsHUNF9PrkojBpznv46304Q7Vd7kkRbumwwwuPAJKkN m7SdGTMkJXbB3H4ACou1aLUc3bCEB6vqYb5QuN6Bl2WzVVXzoXZ6bqu4l6fYlfyk9RHiMhqWKCX 64sBR8hqE0NCm+A3fk+rMNiKx1PHx3WwIlJtbjI5Ilvw2YijGQXxCtciEEWRMAYwpodWPHah4h0 RDor9s/Pg/HJepzrXCHW0+0P7J55lyXZUuICwihC3eP7cKSSB7ml6nhqPCobhquuhik/4vo X-Google-Smtp-Source: AGHT+IGGaGoBEyCLEJGcttpBV+pDHKAK2ZQMO0VkGTPDqnLD5PkHIIQxDxZZqazxrAadA91ngJsYdg== X-Received: by 2002:a05:6402:518a:b0:5d0:e50b:899e with SMTP id 4fb4d7f45d1cf-5d63c2eb98emr2708915a12.4.1734105455257; Fri, 13 Dec 2024 07:57:35 -0800 (PST) Received: from SYRN16-0224-L.. ([109.245.202.111]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5d6501d5863sm95355a12.76.2024.12.13.07.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 07:57:34 -0800 (PST) From: Milica Matic X-Google-Original-From: Milica Matic To: gdb-patches@sourceware.org Cc: milica.matic@htecgroup.com, simark@simark.ca, cfu@wavecomp.com, aburgess@redhat.com, kevinb@redhat.com, macro@orcam.me.uk, djordje.todorovic@htecgroup.com, Matthew Fortune , Matthew Fortune , Faraz Shahbazker Subject: [PATCH 03/21] Improve WARN for $0 constraint on MIPSR6 branches Date: Fri, 13 Dec 2024 16:53:10 +0100 Message-Id: <20241213155328.406003-5-milica.matic@htecgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241213155328.406003-1-milica.matic@htecgroup.com> References: <20241213155328.406003-1-milica.matic@htecgroup.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: Matthew Fortune Validation of warnings and error detection within branching instructions for the MIPS R6 architecture. The test ensures that the assembler generates accurate warnings when a user makes an error involving the use of the $0 register in branching instructions, thereby improving the reliability and correctness of binary outputs. Cherry-picked 280a501 from https://github.com/MIPS/binutils-gdb Signed-off-by: Matthew Fortune Signed-off-by: Faraz Shahbazker Signed-off-by: Milica Matic gas/ * testsuite/gas/mips/r6-branch-constraints.l: New file. --- .../gas/mips/r6-branch-constraints.l | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gas/testsuite/gas/mips/r6-branch-constraints.l diff --git a/gas/testsuite/gas/mips/r6-branch-constraints.l b/gas/testsuite/gas/mips/r6-branch-constraints.l new file mode 100644 index 00000000000..3be2005f571 --- /dev/null +++ b/gas/testsuite/gas/mips/r6-branch-constraints.l @@ -0,0 +1,25 @@ +.*: Assembler messages: +.*:2: Error: the source register must not be \$0 `blezc \$0,.' +.*:3: Error: the source register must not be \$0 `bgezc \$0,.' +.*:4: Error: the source register must not be \$0 `bgtzc \$0,.' +.*:5: Error: the source register must not be \$0 `bltzc \$0,.' +.*:6: Error: the source register must not be \$0 `beqzc \$0,.' +.*:7: Error: the source register must not be \$0 `bnezc \$0,.' +.*:8: Error: the source register must not be \$0 `bgec \$0,\$2,.' +.*:9: Error: invalid operands `bgec \$2,\$0,.' +.*:10: Error: invalid operands `bgec \$2,\$2,.' +.*:11: Error: the source register must not be \$0 `bgeuc \$0,\$2,.' +.*:12: Error: invalid operands `bgeuc \$2,\$0,.' +.*:13: Error: invalid operands `bgeuc \$2,\$2,.' +.*:14: Error: the source register must not be \$0 `bltc \$0,\$2,.' +.*:15: Error: invalid operands `bltc \$2,\$0,.' +.*:16: Error: invalid operands `bltc \$2,\$2,.' +.*:17: Error: the source register must not be \$0 `bltuc \$0,\$2,.' +.*:18: Error: invalid operands `bltuc \$2,\$0,.' +.*:19: Error: invalid operands `bltuc \$2,\$2,.' +.*:20: Error: the source register must not be \$0 `beqc \$0,\$2,.' +.*:21: Error: invalid operands `beqc \$2,\$0,.' +.*:22: Error: invalid operands `beqc \$2,\$2,.' +.*:23: Error: the source register must not be \$0 `bnec \$0,\$2,.' +.*:24: Error: invalid operands `bnec \$2,\$0,.' +.*:25: Error: invalid operands `bnec \$2,\$2,.' \ No newline at end of file -- 2.34.1