From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2d.google.com (mail-vs1-xe2d.google.com [IPv6:2607:f8b0:4864:20::e2d]) by sourceware.org (Postfix) with ESMTPS id AF83F3858D32 for ; Mon, 30 Jan 2023 02:07:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF83F3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vs1-xe2d.google.com with SMTP id 3so11024783vsq.7 for ; Sun, 29 Jan 2023 18:07:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7Zwcp7RiHSCVDLhRPI+fgR8PLtOA8ylkoI2v80Fl7YE=; b=MmqSwecyHwXPH45SbuKbc/9j0Hd6VM6YhzCJ3CM7ROmPZ7PwNy8anYEhZ1yvzbUAWU 9hB8UoqsGPK8PcKHRBr1cpDjUt7ss5PMarkZde/Wmgw9UamQtrtuSwRPRf6lR4Pa7uMn O6/+gcHIFFexw3s1AHBxdmJeuEy2UpG91dnUIOGi9NtXJdFP/mDYR4YaAbcsa6tv7B1n Cm1yALluFLzmNi6kkJoPMz7Bl5upQG/dh/RLzVvSetcy1601oNCVbepRIj8WLTJyszhK 1qgC/KIx3DqEnUvUq1/q1i8Mk1ughJddglwV3OnNjGA5RWWXF21IxmzxJ1Cn5Am+kLPr a2Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7Zwcp7RiHSCVDLhRPI+fgR8PLtOA8ylkoI2v80Fl7YE=; b=t6MCDBja798X8FS36TBeb+ZYvPU9b4CzWlAq7zVGDc4Ds34Ov/j5BV4HQYhGJIWy0b Jm2Wse/t+JcGgmuhIliGX5AZctji6PQH7bixtQ0n3H+jVL29aOeOmMCQG1tQDKeDNKCi h4kdyznroHq7rZhUTu6W1VsxwBtib1Cm6W5R7R+tJab2ZeeXdhXB8yvvJlrtQSXLjSuw N0WjxFLMN6i8kLQkz+nAdZPu4OFgtAwKGYjvd5GCyeqHjPkuXKPhLc9Iuw9WffmqgWH7 GvVCaPxvepc2fLovjhAQB0xVVqdmFICZc7FqnGg8mz7w9h31bM0143iE4tNqRJEhOo3R IibA== X-Gm-Message-State: AFqh2krSP9UJbQubqozB7/RFy5nhoGUu3L1GAsB64e0y836XY8f0UYFj OO3ho5NUUQBrAFyJDjnSx9ueiwe6AWqq+XBqlmA90Q6O9gU= X-Google-Smtp-Source: AMrXdXtwgWMcSpLW5quDY/sLhOiya6K7ZoFMDYmXnlKqUH3bNQdF3Od2PHF0Z+rDDGs7ctSOnflH7nAKCmbykHbJZus= X-Received: by 2002:a05:6102:e95:b0:3c9:4a5f:c9db with SMTP id l21-20020a0561020e9500b003c94a5fc9dbmr6541160vst.77.1675044477825; Sun, 29 Jan 2023 18:07:57 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kito Cheng Date: Mon, 30 Jan 2023 10:07:46 +0800 Message-ID: Subject: Re: [PATCH] RISC-V: don't disassemble unrecognized insns as .byte To: Nelson Chu Cc: Jan Beulich , Binutils , Palmer Dabbelt , Andrew Waterman , Jim Wilson , Kito Cheng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: > > As to the special case code for 2-, 4-, and 8-byte insns: Any thoughts > > towards zero-padding the numbers there as well? That would make yet more > > noticable what the insn width is; in particular - see e.g. ".8byte 0x3f" > > in full disassembly of the testcases modified here - it would avoid the > > value looking like it was for a more narrow one. > > > > Taking it yet one step further - how about printing unknown insns as > > ".insn ...", matching what gas would consume? > > I don't remember how long ago, Kito did discuss this idea with me, but > since we haven't supported mapping symbols at that time, it's been > forgotten until this patch. Anyway, I vote to dump the unrecognized > instructions into .insn directives, so if there is no objection, > please go ahead. > > Also cc Kito, he should have almost forgotten about this :-) I like printing .insn too, we have mapping symbols now, so it should be able to distinguish between code and data :)