[aarch64-port-dev ] Update enum Family CPU_Xxx for aarch64 from ISO8859-1 (ASCII) representation to HEX
Patrick Zhang OS
patrick at os.amperecomputing.com
Fri Apr 19 05:55:47 UTC 2019
Yes the character displays well in console but messy code in browsers. I would add some comment nearby to describe where the implementer codes come from.
Regards
Patrick
-----Original Message-----
From: Yangfei (Felix) <felix.yang at huawei.com>
Sent: Friday, April 19, 2019 11:14 AM
To: Patrick Zhang OS <patrick at os.amperecomputing.com>; aarch64-port-dev at openjdk.java.net; hotspot-dev at openjdk.java.net
Subject: Re: Update enum Family CPU_Xxx for aarch64 from ISO8859-1 (ASCII) representation to HEX
Patch02 looks better. But it's meaningless to keep the charater "'脌'" in the comment.
Thanks,
Felix
>
> Hi
>
> Here is a quick question about a change upon the "enum Family" defined
> in hotspot/cpu/aarch64/vm_version_aarch64.hpp.
>
> I want to add CPU_AMPERE (0xC0) into the enum; however it is not an
> "ASCII printable character" like others, instead it belongs to the
> list of "The extended ASCII codes"[2]. A simple patch [3] adding 'À'
> simply would cause many "multichar" warnings when making, while using
> HEX directly [4] for this item only will bring an 'inconsistency' into
> of the overall definition of this enum, the last choice is to use Hex
> representation for all [5]. It can be safe and better for future new
> IDs if any; however I know it looks bringing a potential impact to all aarch64 'buddies'.
>
> Thanks for any advice.
>
> I don't want to add below option in makefiles to suppress warnings as
> it might be helpful to detect real typos in future.
> -Wno-multichar
> Do not warn if a multicharacter constant (''FOOF'') is used. Usually
> they indicate a typo in the user's code, as they have
> implementation-defined values, and should not be used in portable code.
>
> [1] https://static.docs.arm.com/ddi0487/da/DDI0487D_a_armv8_arm.pdf,
> page 5945.
> [2] https://www.ascii-code.com/
> [3] http://cr.openjdk.java.net/~qpzhang/cpu_ampere/patch01.diff, use 'À'
> [4] http://cr.openjdk.java.net/~qpzhang/cpu_ampere/patch02.diff, use
> 0xC0 [5] http://cr.openjdk.java.net/~qpzhang/cpu_ampere/patch03.diff,
> use Hex representation for all
>
> FYI.
>
> Hex representation ISO8859-1 representation Implementer
> 0x0 NUL Reserved for software use
> 0xc0 À Ampere Computing
> 0x41 A ARM Limited
> 0x42 B Broadcom Corporation
> 0x43 C Cavium Inc.
> 0x44 D Digital Equipment Corporation
> 0x49 I Infineon Technologies AG
> 0x4D M Motorola or Freescale Semiconductor Inc.
> 0x4E N NVIDIA Corporation
> 0x50 P Applied Micro Circuits Corporation
> 0x51 Q Qualcomm Inc.
> 0x56 V Marvell International Ltd.
> 0x69 i Intel Corporation
>
> Regards
> Patrick
More information about the aarch64-port-dev
mailing list