Message ID | cafa617c-0491-49f5-bb71-54cf40a2698d@suse.com |
---|---|
State | New |
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 8CE883858D38 for <patchwork@sourceware.org>; Mon, 27 Jan 2025 16:17:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CE883858D38 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=H3cfRPFj X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 1A1283858282 for <binutils@sourceware.org>; Mon, 27 Jan 2025 16:14:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A1283858282 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 1A1283858282 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737994450; cv=none; b=MJvB8MttlnCsWTFph2Yqwr8vhknWeIaYjKWgQUJ8gOl5wirPhiWJqtH3kt6Et01Pc6KhZNq1EYLdjsEPmce+0IJtpWUUyVoRuGrmZhV+VoRohaxkysjPPPmbSjPEZAny9KWcXWMvigHj0Jiu+qB6L78bvLGOkqwi/p9OZy6bbiY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737994450; c=relaxed/simple; bh=lBv4JnEXruLrSyrKc8oP6phCJrcwcZAAZmYB8qQZUgQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=TVdQMDKQigFQm7ahRp5UjNj5czyA3qd5HSkl9WHHB21shoTGdf26LQMYmEDn1LMia1TIl1iLijHqubwEySxXsJpm7kg7HpeZbP9zLssJnpJx0oc2kQbvCx7/AlsnPdglNid4cqgBySbtDBswJg6dUCOIy827eewG6GBFM9OcdMM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A1283858282 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-aa67ac42819so741936066b.0 for <binutils@sourceware.org>; Mon, 27 Jan 2025 08:14:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1737994449; x=1738599249; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ybOa6WViTKc33FctxDSqyxq0TdQrd7o49/nKdocGycs=; b=H3cfRPFj8v7OyPoIF2GdKDCQeMPZHj5/P+p8AW36qgVi4WqxZhIOgcYnWbT4gmcs4Q 49Alv7dMRePk06nutbwLxfOJGlhvwyuSCcClMC9IlkuBQCbXJhSrctpfKJ6JPZIG1AcY Q7HQLEa5HT3y4c7qByoYpWwrmctZwcxWUP45iOZwkMB92coNsjpxaj/+NkKH+92s0uUL lD7rPwmwSvbk0U+aX/e5bADpbUgiWvi9o6woQmwrooqmyLlLoB+yHZmjWX8/yfiLxIEo 4EoEvk/48I/lBX8qp7emOU6Pk8KiF789z47KbO2E8wAcScDT0k7AUhOE8hMhUXAphljY n8AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737994449; x=1738599249; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ybOa6WViTKc33FctxDSqyxq0TdQrd7o49/nKdocGycs=; b=YJ18TiahsGN0RYc/WzR6jwmCEWKqfPUTg19Xfv8A8YK7V3TAjcvcvrX/Ot56n8a3I/ awEbBcs1t+85Sk4D99USK6iRShoGcl2oz8CLSX55IfRR44QD2hihGDgIWnQl7nXmLA7x ibMckL55hRHMpfmVaB/4vKhk2SjWaWzeRMOM62wbdqfF6FpGBOD19K4r84up9w3OXai8 zv1VsDBlbgvlMtm049i1RAqR5w9ahsXJ1T30DvEbYzOYDsj7BkfRxFrI7SJfbAQDx3RE pziACon0WBypRbjb7lynDHMm9ODc6LhmCZEdwybV+Eh8iq+VZPYDjtgk9xyrEqbAgwb7 cOgQ== X-Gm-Message-State: AOJu0Yyo+Tda7uDnotMgD5mLMytxnYYGMY1f+mvo32eUTB5iy+S9LSsv XQgj7pGTcbu5ViNtqY6knsh5xtq/EZwfChcLRYTxiWpP8iMnA3m0o72g7ATucE5NZ7ERJ8wNs74 = X-Gm-Gg: ASbGncsD+hCQRRxSQ3PiUPxjVrCFTEVK9V2cVHM2Agj1OHxK5ZNUCdVUQ0LdmbdRiOt QxT2zCEfKfj0ZCLxPtFlbp0etuOYbWNBeFjYDNHE+KY+oTkX8Atgo4xS6Wjwzgiun8xkF8WIY0Z hv0ohofLnKXBMZdWn/4ztfFCG9ajl2c8G6TXE86M0MesxwOc8UWJ+wYNjnHff11546O/KaHowVz WXSBMQFxIBideqcW5JUdw10sPT96iMSHdLOyW2FLl7ZgqGLOpXDSt+CeoTaHznGRdZ/vQ5liSqT TMlOwe+6U2Eu2YyzPHz7wMqvyUD2aS64Md5TjZ1hK6oR7N/a5k7cuXyikXpULiF8PQ== X-Google-Smtp-Source: AGHT+IGUg473twRtNcpgyFWFQzlSxDdmkpxiRxrYuisLm7IQRibL7hZXofJDgEUChj14URybhtt9qQ== X-Received: by 2002:a17:907:7fa8:b0:aa6:af66:7c89 with SMTP id a640c23a62f3a-ab38b0b68b1mr4259547066b.5.1737994448682; Mon, 27 Jan 2025 08:14:08 -0800 (PST) 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 a640c23a62f3a-ab6760fbb72sm599635766b.129.2025.01.27.08.14.08 for <binutils@sourceware.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jan 2025 08:14:08 -0800 (PST) Message-ID: <cafa617c-0491-49f5-bb71-54cf40a2698d@suse.com> Date: Mon, 27 Jan 2025 17:14:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 14/65] d10v: use is_whitespace() From: Jan Beulich <jbeulich@suse.com> To: Binutils <binutils@sourceware.org> References: <2316ac5c-7870-4b46-9c80-eaecaef93a31@suse.com> Content-Language: en-US Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <2316ac5c-7870-4b46-9c80-eaecaef93a31@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3022.2 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, T_SCC_BODY_TEXT_LINE 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: whitespace handling
|
|
Commit Message
Jan Beulich
Jan. 27, 2025, 4:14 p.m. UTC
Wherever blanks are permissible in input, tabs ought to be permissible, too. This is particularly relevant when -f is passed to gas (alongside appropriate input). Also convert open-coded checks where tabs were already included. At the same time use is_end_of_stmt() instead of open- coded checks in adjacent code. --- v2: New.
--- a/gas/config/tc-d10v.c +++ b/gas/config/tc-d10v.c @@ -140,8 +140,7 @@ register_name (expressionS *expressionP) int reg_number; char c, *p = input_line_pointer; - while (*p - && *p != '\n' && *p != '\r' && *p != ',' && *p != ' ' && *p != ')') + while (!is_end_of_stmt (*p) && *p != ',' && !is_whitespace (*p) && *p != ')') p++; c = *p; @@ -356,9 +355,9 @@ get_operands (expressionS exp[]) while (*p) { - while (*p == ' ' || *p == '\t' || *p == ',') + while (is_whitespace (*p) || *p == ',') p++; - if (*p == 0 || *p == '\n' || *p == '\r') + if (is_end_of_stmt (*p)) break; if (*p == '@') @@ -1410,12 +1409,12 @@ do_assemble (char *str, struct d10v_opco expressionS myops[6]; /* Drop leading whitespace. */ - while (*str == ' ') + while (is_whitespace (*str)) str++; /* Find the opcode end. */ for (op_start = op_end = (unsigned char *) str; - *op_end && !is_end_of_line[*op_end] && *op_end != ' '; + !is_end_of_stmt (*op_end) && !is_whitespace (*op_end); op_end++) { name[nlen] = TOLOWER (op_start[nlen]);