Message ID | d3aae0b5-2e58-4538-b707-80d60439dd35@suse.com |
---|---|
State | Superseded |
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A84303826DD2 for <patchwork@sourceware.org>; Fri, 28 Jun 2024 13:21:23 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 19EE33826DC3 for <binutils@sourceware.org>; Fri, 28 Jun 2024 13:20:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19EE33826DC3 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 19EE33826DC3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::231 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719580845; cv=none; b=XVemlJN0c18BDs7479/SWxgXP2Sks1f2b6fj4JY2zUYt0d8mmlik/Q7LOT+jebYUx13XsN0MNRmbNPA9MFt+GS8xZzR+E6eVS2DDVYWtGNf5ENof9ynVhhtmOmym82wTY7sIFNkon5fqMW/qD0HsMNKmzQ1mYeU7jk+UkbmMj1Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719580845; c=relaxed/simple; bh=/l0AgLx5uSfayf4Q6U7lwubL+YvJmBu1Az2EbvxQ500=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=j2yBjc/Ii+n57gTo+VsbiikVp1u0CePjlhJh3bl9WxpxE+iw2KfsuPXmVDF2Ub9UPN21LjPHXw4Q8H4nQwzyi9kmU+ls9iC/w0+9jHvZFBmULI3G9qrQJj1c4Zt1IPOT1ZO6hbBNDWijw29qb62bG5XnJSwT6j2+pBQQEHtUXpM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2eaa89464a3so5944381fa.3 for <binutils@sourceware.org>; Fri, 28 Jun 2024 06:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1719580842; x=1720185642; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=+6BwLknVnBYS5RY9SwloojnY7gDkgxygQzu3C5fSyM0=; b=UTSIl8q79JQN26acxkRDPTeSCod69OH5Gh3FQ/ByuFYrXvPMrGF0wlMkuZVx6ycBtx ej4veLVHCNeDpRJXFk5VthLlczVl9G1vHFu0W/A0xDZmlMS11TUenaddSFpAibG1GRYe 7kbuTu7omU75SNJ1E77nd+dwAXGFCtcWMClDR9Rv7aEsZ+wqBTt0KF4/82Bz4nO2AwQz 2FrBXO2GL3IEZY/DwGS/i2AOMcgHD0IyQuhH5Zrk+A/ABnehOxinDE/aBGuDnKjr0TPC 5+VUaHk7DJSPJDcl2lBou/ph2uFRbWn71IM13gltgykCFKUuoACVpwft4YyhP0lxrOzY iz4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719580842; x=1720185642; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+6BwLknVnBYS5RY9SwloojnY7gDkgxygQzu3C5fSyM0=; b=Ls9izV4J4rtb0o+99NuajWI5DauaI7iDqWI2sBftIUWnSSw3mvbXpuZ8yTLgdU+ZHt fn/CldFrdoMYK9zce0z5nHyNYTqMtxJXvxBRP0yip8smJBoFjd2DSuJxaap4yIZIBoGe kAwCfb6uowSkuLy/7HbjnZeG+31bwILcGyifZGwyCC8BHocvlllXtvz4b+ORnvZ6aoik 9s+LykilJNQFbYvqnTHgUUnIh/6CfNyKDaiFEvUfJobaOWz4g0yNNcfIej7UJ+TR2i+m 37CEWF0W8YDC3sL85BU7EGMPAUuoKK+hWg8i4t/C1ecnGJQPfQhdoEarV6Mrl1Px2OkG kH9Q== X-Gm-Message-State: AOJu0Yy2wmGSAt//W3E/7lDiB+aHs3xb/5zZ+J06umE8ayTWJp6joOnT sKP/vMnBMHo+jS+bvjpg66hM6TMiIxBkXj+uNG5eGCbohsMyF6ouHWvVYPdopOX55bHa8RumL0Y = X-Google-Smtp-Source: AGHT+IEyNb1BF/8t4zL1kFdsLOQKSpmP+gn2Fe2gQLFN9P6QEfw3pOJIeOwzzB4zMfGXgVf1HCnyDQ== X-Received: by 2002:a2e:a7d6:0:b0:2ed:58d0:b711 with SMTP id 38308e7fff4ca-2ed58d0b749mr69321291fa.33.1719580842349; Fri, 28 Jun 2024 06:20:42 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac1596915sm14870235ad.245.2024.06.28.06.20.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jun 2024 06:20:41 -0700 (PDT) Message-ID: <d3aae0b5-2e58-4538-b707-80d60439dd35@suse.com> Date: Fri, 28 Jun 2024 15:20:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 06/11] gas: re-work tic6x scrubber special case From: Jan Beulich <jbeulich@suse.com> To: Binutils <binutils@sourceware.org> Cc: Joseph Myers <josmyers@redhat.com> References: <f12de588-f77f-41b5-a6d0-83c1eb7de05c@suse.com> Content-Language: en-US Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiw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tlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <f12de588-f77f-41b5-a6d0-83c1eb7de05c@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3024.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org |
Series |
gas: scrubber adjustments
|
|
Commit Message
Jan Beulich
June 28, 2024, 1:20 p.m. UTC
Two successive PUT() without a state change in between can't be right: The first PUT() may take the "goto tofull" path, leading to the subsequent character being processed later in the previously set state (1 in this case), rather than the state we were in upon entry to the switch() (13 in this case). Move to state 2 instead, thus forcing the retaining of possible whitespace between "||" and a subsequent '>', making sure not to mistake that for "||>". --- While running the testsuite suggests this is okay a change to make just on its own, if this was assumed to cause issues by the tic6x maintainer merely because of issues with whitespace between what the states description calls "opcode" and "operands" right now, this would need folding into the subsequent "gas: have scrubber retain more whitespace". The assumption here is (as the new comment says) that no label may follow the "||" or "||>". In fact, if that assumption was true for all targets setting DOUBLEBAR_PARALLEL, the #ifdef could be avoided altogether, the latest with said subsequent "gas: have scrubber retain more whitespace".
--- a/gas/app.c +++ b/gas/app.c @@ -685,20 +685,16 @@ do_scrub_chars (size_t (*get) (char *, s if (ch != '|') abort (); +#ifndef TC_TIC6X /* Reset back to state 1 and pretend that we are parsing a line from just after the first white space. */ state = 1; - PUT ('|'); -#ifdef TC_TIC6X - /* "||^" is used for SPMASKed instructions. */ - ch = GET (); - if (ch == EOF) - goto fromeof; - else if (ch == '^') - PUT ('^'); - else - UNGET (ch); +#else + /* Don't permit white space between "||" and a possible '>'. There + shouldn't be any labels subsequent to that anyway. */ + state = 2; #endif + PUT ('|'); continue; #endif #ifdef TC_Z80