From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by sourceware.org (Postfix) with ESMTPS id 4CFC13858C52 for ; Mon, 10 Apr 2023 14:39:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4CFC13858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-54f21cdfadbso51686167b3.7 for ; Mon, 10 Apr 2023 07:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681137596; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=5wW8bZeIvNIG5RG+1COemHqs/SuZYmCSlAYfOJJFWh0=; b=jDDGvzwtCQXx6Le5WqpnfwbfViEgUyLah2/HoLhtGX+dqiZkWxy6HydzMrtDB+iBSK ttEjKe0E8oWcyxnY2tCjMeZahvr+bg3N1jg/JyeDo/xumcluD/Lj9uZoaS0837A58+Os ItYDewRUL7RnUb4bHlFk0+kB/nccQRC0b45rZYD45EXGN6jj1bardiVWLR+rQFBjtqY6 xrGbp6/xyrDbpBLKdzULes9i4DtoNkdrsth6oQhBYal7lk1vtUIceYQHjTUMfESZ+eN3 dHA0k0oMIv/PBxMAOHNlZOu7d1JQCxUlDToV4ykxLZZ53GD5eMBqI+sWxHz6UdCo6x4Q eUEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681137596; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5wW8bZeIvNIG5RG+1COemHqs/SuZYmCSlAYfOJJFWh0=; b=fqJBEawuUsl8WDsFPi7UL9sxXvvV/6K6epbK/J/z7HxiAF8XTwF9+gJfj7ctuz6IS+ 8PPvJoUF3cXZjCUAHvf1bzqeGv2VLHN0naN2oyOrPl5Eh5VzYzoJxq+VxH/gCo42Hycs HH29YdRXNg/7occDG6JFDJQI8D+SrZIY1dyNF+WyeRbSq1nkHgFMUB1NMicpB8lXpryA yTw7RD+PR4XEQIW8jilE0ZBSvfPLpD/wTWixI5FjPHY64U2XrKepiNpa8hj4SIKgmX+B JQ7N2HXCdDCZzDmTDKRXpzdAYbrSHT0fWW3OSeVz+O6Js1x2mGUiIrCErJp67LGzWYUm aIMA== X-Gm-Message-State: AAQBX9ekDgAaOZqVAmEny1ZuTB0lRb80q/5or29ky/VS6wluMVLgomDA KCBzm3ImlqGLnZhC7k+ZWnL+5H/M0KEKuzFFnkLUr4iZzgvy8g== X-Google-Smtp-Source: AKy350aqUJxSuNB6yF1fPukUA+pz3W1ttUJKFNGgvFM3X0XG6NwwSjgrK92fGlB1BWqre5TmvN/Qhr4enew7KaTTTpM= X-Received: by 2002:a81:a94a:0:b0:541:a0ab:bd28 with SMTP id g71-20020a81a94a000000b00541a0abbd28mr6602242ywh.4.1681137596066; Mon, 10 Apr 2023 07:39:56 -0700 (PDT) MIME-Version: 1.0 From: Joshua Saxby Date: Mon, 10 Apr 2023 15:39:45 +0100 Message-ID: Subject: Symbol name character restrictions To: jit@gcc.gnu.org Content-Type: multipart/alternative; boundary="0000000000003b6e9605f8fc5946" X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000003b6e9605f8fc5946 Content-Type: text/plain; charset="UTF-8" Dear All, I noticed that currently libgccjit restricts symbol names for generated functions (and I assume all other symbols) to match the rules for C symbol names, that is, alphanumeric and underscores. >From the source for gcc_jit_context_new_function() ( https://github.com/gcc-mirror/gcc/blob/725bcdeec60771cb9ee387978716028b64ea1b7f/gcc/jit/libgccjit.cc#L1173-L1177 ): /* The assembler can only handle certain names, so for now, enforce C's rules for identifiers upon the name, using ISALPHA and ISALNUM from safe-ctype.h to ignore the current locale. Eventually we'll need some way to interact with e.g. C++ name mangling. */ I've seen some suggestions elsewhere that some assemblers can handle symbols with wider varieties of symbols than these, I have struggled to find any documentation of the exact restrictions on symbol-naming in the assembler itself (I could assume it's identical to C symbol naming rules, but I like to be sure), any pointers to where I could find such a specification? Also, any plans to follow up on the hinted extension toward the end of that comment, RE C++ name mangling? Best Regards, *J.S.* *My PGP Public Key Identity* pub 4096R/*B7A947E4* 2016-11-16 [expires: 2025-12-31] Key fingerprint = *E2C4 514F F0FA 52D1 896A B1D6 3D42 BFD9 B7A9 47E4* uid Joshua Saxby uid Joshua Saxby (saxbophone) sub 4096R/0A445946 2016-11-16 [expires: 2025-12-31] --0000000000003b6e9605f8fc5946--