From nobody Mon Nov 25 10:21:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1716349563; cv=none; d=zohomail.com; s=zohoarc; b=ZMqq5jgpNE0z2ybD2Omboju999srR5s/Hn1ewlMo6wVj7TqvctvpFqCS/oIrJd5obErHTQCwW3GeYvMiCdT1uQdG/vWUuLZOp+DOkUq0aSFMKjQrYXKfTVHiYD9J6WmIBDwxXS+d3afxylEOLpeBxRKZcADZTpAAQ7IbXEtZJcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716349563; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ANXC48sQiPcmwS+xOFwDre7pgTyWtySeXqXMB92Q6A0=; b=NwNDBtw5Tx6sPmOHQ3w8yfWWMzGwP80Pxqxc0Iv78OD3Encw6XJC1kzdatTREvLDFfsP3tz2bQkRhXSY9W/QNwbpYA51Vt5YcGAqZl4tVY1FoC377S6ErVAFz/ApF/Xq1XC0l7SK+jtJhi7yaGt6rxnay8YIWprJ02cq44J/lzI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716349563040848.1833574688945; Tue, 21 May 2024 20:46:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9cuL-0003Su-3M; Tue, 21 May 2024 23:44:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9cuJ-0003Rd-5w for qemu-devel@nongnu.org; Tue, 21 May 2024 23:44:51 -0400 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9cuH-0004AG-Dj for qemu-devel@nongnu.org; Tue, 21 May 2024 23:44:50 -0400 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3c99257e0cbso2559931b6e.3 for ; Tue, 21 May 2024 20:44:48 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2af2bafsm21416617b3a.162.2024.05.21.20.44.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716349488; x=1716954288; darn=nongnu.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=ANXC48sQiPcmwS+xOFwDre7pgTyWtySeXqXMB92Q6A0=; b=KXpx+4jgwPxFEJQAB6kaBqdAkphKeWZ6wDTgybIPtWiBukj5AyZd27DGCrMXEYH0QG DhPjV09mU/NG48nvU52e1s5ZDhVUJnigYO0N99vXTDe1O9ES98RSPuJjII4m0UrN2EX4 ND3PaCHjVj8kz7cNKtbsQKSmHEO6rm3JZue6jze2a9t+NXjYIGUvD5XZIbdMjukaw+FP Gd1aq6I3JGems8c9pqXNZm3X46PKQbv0kNdjcf9QQwD88J3bD7aMX0HIYaAbOeqmqppT S+fdp65ffCEtcq71KP7XLwkNrV5BWmmKMQB/zaIrXh/rf6RI+boITlAM5/s64r16Q4Hw SoKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716349488; x=1716954288; 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=ANXC48sQiPcmwS+xOFwDre7pgTyWtySeXqXMB92Q6A0=; b=CL7pd8d/JrgzTgpZr84Qz0D1KM7Zg7vnASgoDpRcifEQ8UyBuogRT2qBzUyfwObdG0 CojdLt75sirmrgzQMU8ialOJGkZG+ojIMG0Rat5AL+dIzKWle6Qy5TBySGvKPIiNR4Zw CxU0eAAIF/64mBLbVf2m1a0bD970fKmZVQeE/mdf+JwPr5szySO31qHlRy+AS6D6+/nB RD4u/XKRJHzSrU0nefzPsHP/aOEImd3vimAiMQpv52ycXkuvfHawGDgiEvLLj+JyMvCS 9LRwUqCy/5yW/eEq4qeFTfY1rtyBu4njC4Dp+8MSQBqvxan8nk7MCP33yY1C7UxEj7FF NltA== X-Gm-Message-State: AOJu0Yxy2in6sYQodtmb4IPE9KMackuBODId1jxotePRRyLp5SOBATOt jG8ehu92SRQ1gyZbs13YWlwsCLgWRo4osIEwGCoJ3G8Sdcus9yDQNcyzwteMu7td0QJEDdQ/+6q 6 X-Google-Smtp-Source: AGHT+IGSNEX5G9vutdoBSvbTK/y7n9ZUzqejze1hX9h7o386DVoyKuW+PeFr9RJS6gsmXfH14em54A== X-Received: by 2002:a05:6808:9a9:b0:3c9:94f2:5cae with SMTP id 5614622812f47-3cdb32e44b0mr997628b6e.17.1716349488011; Tue, 21 May 2024 20:44:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk Subject: [PATCH RISU v2 5/8] risugen: Be explicit about print destinations Date: Tue, 21 May 2024 20:44:39 -0700 Message-Id: <20240522034442.140293-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240522034442.140293-1-richard.henderson@linaro.org> References: <20240522034442.140293-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::22b; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1716349564148100007 Content-Type: text/plain; charset="utf-8" Printing directly to STDOUT and STDERR will allow the print destination to be selected elsewhere. Signed-off-by: Richard Henderson --- risugen_common.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/risugen_common.pm b/risugen_common.pm index 71ee996..5207c0e 100644 --- a/risugen_common.pm +++ b/risugen_common.pm @@ -76,7 +76,7 @@ sub progress_start($$) ($proglen, $progmax) =3D @_; $proglen -=3D 2; # allow for [] chars $| =3D 1; # disable buffering so we can see the meter... - print "[" . " " x $proglen . "]\r"; + print STDOUT "[" . " " x $proglen . "]\r"; $lastprog =3D 0; } =20 @@ -87,13 +87,13 @@ sub progress_update($) my $barlen =3D int($proglen * $done / $progmax); if ($barlen !=3D $lastprog) { $lastprog =3D $barlen; - print "[" . "-" x $barlen . " " x ($proglen - $barlen) . "]\r"; + print STDOUT "[" . "-" x $barlen . " " x ($proglen - $barlen) . "]= \r"; } } =20 sub progress_end() { - print "[" . "-" x $proglen . "]\n"; + print STDOUT "[" . "-" x $proglen . "]\n"; $| =3D 0; } =20 @@ -124,7 +124,7 @@ sub eval_with_fields($$$$$) { $evalstr .=3D "}"; my $v =3D eval $evalstr; if ($@) { - print "Syntax error detected evaluating $insnname $blockname strin= g:\n$block\n$@"; + print STDERR "Syntax error detected evaluating $insnname $blocknam= e string:\n$block\n$@"; exit(1); } return $v; @@ -163,20 +163,20 @@ sub dump_insn_details($$) { # Dump the instruction details for one insn my ($insn, $rec) =3D @_; - print "insn $insn: "; + print STDOUT "insn $insn: "; my $insnwidth =3D $rec->{width}; my $fixedbits =3D $rec->{fixedbits}; my $fixedbitmask =3D $rec->{fixedbitmask}; my $constraint =3D $rec->{blocks}{"constraints"}; - print sprintf(" insnwidth %d fixedbits %08x mask %08x ", $insnwidth, $= fixedbits, $fixedbitmask); + print STDOUT sprintf(" insnwidth %d fixedbits %08x mask %08x ", $insnw= idth, $fixedbits, $fixedbitmask); if (defined $constraint) { - print "constraint $constraint "; + print STDOUT "constraint $constraint "; } for my $tuple (@{ $rec->{fields} }) { my ($var, $pos, $mask) =3D @$tuple; - print "($var, $pos, " . sprintf("%08x", $mask) . ") "; + print STDOUT "($var, $pos, " . sprintf("%08x", $mask) . ") "; } - print "\n"; + print STDOUT "\n"; } =20 1; --=20 2.34.1