From nobody Wed Apr 24 23:03:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) client-ip=209.85.128.42; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f42.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1610476920; cv=none; d=zohomail.com; s=zohoarc; b=YAnDr1mLiUgUFxHNtpUnVHXZ4xMM4mxBX4NUrJgr+2CiHvGxOjYE8teBuMSan7j1CAz+vLuHD5MjlWzCCX2tvujbZkwLFHjNOp0LArHlmEVt+wYnYQrP/mahW5fWwE9XgzMb9/9iOcbXKPoRXEmLzVyiynA5p5AiDNuks9VQ9Fw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610476920; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Sender:Subject:To; bh=2h2Lkh1nqLrN72EhYLNCgPb6E0o6hk4k8AQTBHNUFWg=; b=flAGvsKTC0WI6gerNyRRuis8at9K5lWvtnZ6TWOyP0GXjnu+jHTeoqlrz31s5YMJddJjJl+wJggcZjvavC0w14IZ9X8u8Ly+RVrvkJ8tJzIPA61BjW/6rooSXzMo9gcB37sDxqNH3jI92zZ5IgkmW/+SYkUYTx+1LVu+ZBiLJHQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.zohomail.com with SMTPS id 1610476920967659.0601972012636; Tue, 12 Jan 2021 10:42:00 -0800 (PST) Received: by mail-wm1-f42.google.com with SMTP id g10so1355614wmh.2 for ; Tue, 12 Jan 2021 10:42:00 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (190.red-83-57-173.dynamicip.rima-tde.net. [83.57.173.190]) by smtp.gmail.com with ESMTPSA id r13sm6016146wrt.10.2021.01.12.10.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 10:41:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2h2Lkh1nqLrN72EhYLNCgPb6E0o6hk4k8AQTBHNUFWg=; b=VFa5OfI3JYt17ny4tYPs2cTxoTfl8ebc1I+/UqQPq7LSIJ6cZQpQqwA9hSePvJYwQj dOegfF0ScNvCfqDPQhf5ZWb5+98aYjS/UshdbAIjBZzsq6a8RfXf81iYLXZ3LywZoVpb oPHUPBj4PutquC/xJyQYNuzTNjVAflMfcnBZ5Y9BnC90HJgWIiRB+xgk0mlxXiBA3jgH cdWRPTMO2iMXCIxOsa7kjijUj0JYQ1RyOfO7sG5e4tjTm0eALdNgN2RCCfEd/A4gFZEU Z6+H8K4N/Dy9k+asLi5SusKLxGjo824tWz4fzYgxK148ei1Tw64smsQ8ShdTC02vxkC9 cf+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=2h2Lkh1nqLrN72EhYLNCgPb6E0o6hk4k8AQTBHNUFWg=; b=kMUeoN0dWZG1OVKirv6xdeB3iMXbrotNgDJeNF6cM7RTHdDa7HZmWQRz5DPB6mfOMW rDfW6Q51JjlEfbOkasK6R8scrlwpBI3BPYfBnxUm6Tg0i1c3zHwVoANskIgnVMOrGbrU JwDb2hQ21YHp0LzFPGPyHrrHZ0Y4D24OIkUeo7kSgmbT5Ax6tK+LkhHZF/n07gTPr2Tk mdkJnNMoNx+fpXvKp3iCllmFjJ2GqM8hozQothbhdENejyoQCFd6PjJETY+KmbOujc9x a9W00XicMb4w7HOEWAjTwdYajvQ0WMDEbR0xzjyIurR667MzoBy5Jev02O249oBnbTOP Q57w== X-Gm-Message-State: AOAM532t3nATa1y77lnGTZdzCUChazc0v46096aBtiuBHj4yONz1C6xm REXiunXslS0q61CGYmPWsrk= X-Google-Smtp-Source: ABdhPJzQm4D4K8kGXLFBDWW97Zmgdh6aY2NnpDaCQ/p0Sc0qKoBCDvyV8umWvsJtBpa1dqcDsvJgng== X-Received: by 2002:a1c:2b46:: with SMTP id r67mr588615wmr.162.1610476919149; Tue, 12 Jan 2021 10:41:59 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Richard Henderson , Eduardo Habkost , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] decodetree: Allow 'dot' in opcode names Date: Tue, 12 Jan 2021 19:41:56 +0100 Message-Id: <20210112184156.2014305-1-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Some ISA use a dot in their opcodes. Allow the decodetree script to process them. The dot is replaced by an underscore in the generated code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- scripts/decodetree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 47aa9caf6d1..b7572589e64 100644 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -49,7 +49,7 @@ re_arg_ident =3D '&[a-zA-Z0-9_]*' re_fld_ident =3D '%[a-zA-Z0-9_]*' re_fmt_ident =3D '@[a-zA-Z0-9_]*' -re_pat_ident =3D '[a-zA-Z0-9_]*' +re_pat_ident =3D '[a-zA-Z0-9_.]*' =20 def error_with_file(file, lineno, *args): """Print an error message from file:line and args and exit.""" @@ -1082,6 +1082,7 @@ def parse_file(f, parent_pat): elif re.fullmatch(re_fmt_ident, name): parse_generic(start_lineno, None, name[1:], toks) elif re.fullmatch(re_pat_ident, name): + name =3D name.replace('.', '_') parse_generic(start_lineno, parent_pat, name, toks) else: error(lineno, 'invalid token "{0}"'.format(name)) --=20 2.26.2