From nobody Mon Nov 25 09:30:26 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=1716752290; cv=none; d=zohomail.com; s=zohoarc; b=Kx2DWuXPLh2UREMsx1/YdACeSsDXUJvS/kkqYiluvdJIoaMP1NB/O5ljQc8+ocfJV6hI4ASDVCVvhaLYVPgvOq8CtqrXEkIP0EewzOhIFSZ87dZT4ifmlWSs6C2TXBy1A025ilCzQq5ynL3doGt0XIEFAJiw1cqkOlG1ygUI5Gg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716752290; 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=ElqrC+kfOF8uFzjstyWkNLjmAjCAVm1bIXGIBo6GgFl+XVxjFXDum6Ig+Pv23Trgsjpm2YZpgYAhIucX1gbxyw1QFQj+04+FurZNuHZXt2vRZk5bqDN7AON9q8o9QrYtGZGf+CkulC90R17+R+fcM4K21IomAwvWJwtGHrMqfh4= 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 171675229076929.30946291359885; Sun, 26 May 2024 12:38:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBJft-00081o-KK; Sun, 26 May 2024 15:36:57 -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 1sBJfq-0007zf-LC for qemu-devel@nongnu.org; Sun, 26 May 2024 15:36:54 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBJfn-0006U4-Ba for qemu-devel@nongnu.org; Sun, 26 May 2024 15:36:54 -0400 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2bf5bba7a7cso1980085a91.2 for ; Sun, 26 May 2024 12:36:44 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2bf5f6155b6sm4943761a91.29.2024.05.26.12.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 12:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716752203; x=1717357003; 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=DX+lzi7ZX36GtfGItUJLJpzfoO/m+acfHmvtXo9FKP0249AmJIDaLu3xlktDgFNrUm qmtzH9T4xhgaQ5qnjGJ679N+aixs6fnT0Kal5shEYiCO/LfyaRPB8i7MULrtr2PlhmvI 1dIu83DDmLm28IWw7h2btSQ5KR7mC1gHbh89pamKGYgcYqf7waCYWuxEHn7+xBJa7dOn ILNfChM5l3bB9FMLSbf4WavT48xhsFSAfH+OHzlaJ3Jwe9E6Q7hO300H0N6D9N3tfpPJ XshfL1lTy5ASAMPg506LaIW0tUjOht7N7fT+yqnoKt703nB+atNX06jGJsbB0emfJl59 h40Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716752203; x=1717357003; 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=Om+aLsGfcCnLR1bCc2aZaFypPVihl2SXXruQkyexreK+EoosPwAugjO6ZhqaXeDzJ+ +dg7JLX2rUgqHhxx2x4em++/9H5uuvomDsNO+AyANVCCztcEKLce9saw2jdPbUjxoLSv jKPdQzkQ8N+3osPkUHMvnYTsQvVjbi38JMAo3znp85FtjYt+JQLlJdM1X2XVbRKc965S Vi3h9kK7ZzdX6G5qxwAsyQIP9wZwHi+/CugxpvOABLqiF9fU1qYZlRe1DXpUKsVyuN2i POL+Qu7v2bSfUO5cpGAvygrnz8ezZjOrj6AO3f7oUbleaJRjlRcnSMS6Fm4w3rM6pg1k zV6Q== X-Gm-Message-State: AOJu0YyEBCGNikXRmMnr8m7he/k+d14VeyRy31iykYQhCh0ZclvYXfQA hg1g2erfBxqXHxukx/1czYasxXU5s1UUDI/F6+lsLqMafEJCf40fYFGz63USk3iZiH9y7sXu6ba g X-Google-Smtp-Source: AGHT+IGC/b356/JkBCFy+x3cCSdVOJ4kKHjhU0OW0YSpAzn29hx1piQnfY3aitSHOqzliw/0vaSDOg== X-Received: by 2002:a17:90b:8cb:b0:2bd:e68f:34b1 with SMTP id 98e67ed59e1d1-2bf5ee170fcmr7023716a91.31.1716752203198; Sun, 26 May 2024 12:36:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH RISU v2 05/13] risugen: Be explicit about print destinations Date: Sun, 26 May 2024 12:36:29 -0700 Message-Id: <20240526193637.459064-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240526193637.459064-1-richard.henderson@linaro.org> References: <20240526193637.459064-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::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1716752291469100007 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