[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] docs/misra: document the expected sizes of integer types
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Fri, 5 Apr 2024 07:16:15 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0ZAU5yR8ZYahL5Vh0LA3txYm1L6AvkKW/u83o15OKgo=; b=NJvTrYDj5o7hv6rwIUZDHYN8j7Tqo1A0TqNnP+kCAVKl0vFLvHqemULQhPRZhCFw4wqtk2Uw6/ENuQpg0Ox3PX4fjk5DWKi6MKJnCn3AsC3nuDMXFEOwymAYIm1CE+OTHwdc0B/p9GX3bRQU//52mXAs15BVCcKI3oFySFtkWHcRg1DwelR2rpWtbdmplJbhruY7nelKfkySOrpbD2EaPpmSx/3rTVJBDhuwCfmifSG2N/Q/hrSeIOXc8muisMoTtK2EuagQeWq79abCIi6llaXIjAyGXqxxn5iVyNr1U8wPW61tuzuphrkfZHFZQCle7KmzA/Nx6p+WAD4Fq4mE2w==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0ZAU5yR8ZYahL5Vh0LA3txYm1L6AvkKW/u83o15OKgo=; b=bDYxpSWbPBeuEil2D1JGVOSzoYMH0Fi4XdPxlGPsOwTZAD2BkcVwe37F/ISb0ycHDu2VvESaG5KEG2M7NIhMkvJFQS5MdtBVO226SmdvDn1SWaM3TR+bT7mCy+dqXek/ywRpFomBmol6Y6K/hL4TYJP8oFjOgZtOitd9dkJFV4Hp0OkiUos6wsojYKKIetyOdm3SpJyeNqwbz3oP1lOPbkftiE9nQtO6j9mypF+tGTdDgL9hUoa3ikisdtLn7AdRMcM/20rEp9zAn0JR5eCDI4eC9nVY+Al/4lzfo+D6OIkwf+abjkSgDrL8YfCZsuCPlp5isliBbHgFOdop/n3Auw==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Nv3XKTZzJUmrZICEz0DTDpL5iAxftPq/vHt1Qdv4vG4fU+xfwLT9BSQfdDs7jMU2LjN13iMzrUoyJ5AGduU0Hk1c7cCmARy5estAKibISoiWFFiFS3w/3mjOTomKvBCO2kRnFRnJ75azxqvsrcjRmjL/enaimFhXgPTgPGnyhTQZsToCkG0xh04KNlEaGj38LsgHXbLXgAqB8mA+A79bKv0BM2kD0x/CwRpXKesm6hmQhUxWPyq/rVlw6pgXVn6XGOVZYDD/JCBWOAglKeUzzwGTWFhjjctqF7Nz+8fxeLnoQhVlhLzu9OUbSzyl3W9UzJHhrj8KgSP9ID+bm9A3Nw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dRusB5MPoo5ZOi/nU+nPHYp677jQD+JP+A3/oK8oy4DChgl1NgciICrpygZi1OcT8SrRtvdOELNrHqADjWLSn3pGEXCpoL4aY+Y8j0T2ik/oWyaSFs7NKgKAQ/ZM1nQmF0KaP2qtUm745ARFWWWRIik/fTwW9AT1UWBLR+wLhsETq5ALqOcp3R1Tb0Umtg1fM7Xcjg68/D8oWI4yWpqFT5UwTBYtWptvXTRu+KBaI8SPPDJuUicU6nRDCllnQT4ID0z/mklkWAblE91gGU+/YLKjKlrjxV/3eU2AK/m707bP6XN++A1Gb8FAom5T06PIYIBP0QmmxAHerSZehcTCSA==
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 05 Apr 2024 07:16:52 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHahi02L7CmbuGs70iGCAZey/rjT7FXyCAAgAEDLACAAHqXAA==
- Thread-topic: [PATCH v3] docs/misra: document the expected sizes of integer types
Hi Stefano,
> On 5 Apr 2024, at 01:57, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>
> On Thu, 4 Apr 2024, Bertrand Marquis wrote:
>> Hi Stefano,
>>
>>> On 4 Apr 2024, at 03:12, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>>>
>>> Xen makes assumptions about the size of integer types on the various
>>> architectures. Document these assumptions.
>>>
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>> ---
>>> Changes in v3:
>>> - add links to System V, AAPCS32 and AAPCS64
>>>
>>> ---
>>> docs/misra/C-language-toolchain.rst | 69 +++++++++++++++++++++++++++++
>>> 1 file changed, 69 insertions(+)
>>>
>>> diff --git a/docs/misra/C-language-toolchain.rst
>>> b/docs/misra/C-language-toolchain.rst
>>> index b7c2000992..84b21992bc 100644
>>> --- a/docs/misra/C-language-toolchain.rst
>>> +++ b/docs/misra/C-language-toolchain.rst
>>> @@ -480,4 +480,73 @@ The table columns are as follows:
>>> - See Section "4.13 Preprocessing Directives" of GCC_MANUAL and Section
>>> "11.1 Implementation-defined behavior" of CPP_MANUAL.
>>>
>>>
>>> +Sizes of Integer types
>>> +______________________
>>> +
>>> +Xen expects System V ABI on x86_64:
>>> + https://gitlab.com/x86-psABIs/x86-64-ABI
>>> +
>>> +Xen expects AAPCS32 on ARMv8-A AArch32:
>>> + https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst
>>> +
>>> +Xen expects AAPCS64 LP64 on ARMv8-A AArch64:
>>> + https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst
>>
>> We still support armv7 somehow so we should add something for it here.
>>
>>> +
>>> +A summary table of data types, sizes and alignment is below:
>>> +
>>> +.. list-table::
>>> + :widths: 10 10 10 45
>>> + :header-rows: 1
>>> +
>>> + * - Type
>>> + - Size
>>> + - Alignment
>>> + - Architectures
>>> +
>>> + * - char
>>> + - 8 bits
>>> + - 8 bits
>>> + - all architectures
>>> +
>>> + * - short
>>> + - 16 bits
>>> + - 16 bits
>>> + - all architectures
>>> +
>>> + * - int
>>> + - 32 bits
>>> + - 32 bits
>>> + - all architectures
>>> +
>>> + * - long
>>> + - 32 bits
>>> + - 32 bits
>>> + - 32-bit architectures (x86_32, ARMv8-A AArch32, ARMv8-R AArch32)
>>
>> Same here armv7 should be mentioned.
>>
>>> +
>>> + * - long
>>> + - 64 bits
>>> + - 64 bits
>>> + - 64-bit architectures (x86_64, ARMv8-A AArch64, RV64, PPC64)
>>> +
>>> + * - long long
>>> + - 64-bit
>>> + - 32-bit
>>> + - x86_32
>>> +
>>> + * - long long
>>> + - 64-bit
>>> + - 64-bit
>>> + - 64-bit architectures, ARMv8-A AArch32, ARMv8-R AArch32
>>
>> Should this be all architecture except x86_32 ?
>
> yes
>
>>> +
>>> + * - pointer
>>> + - 32-bit
>>> + - 32-bit
>>> + - 32-bit architectures (x86_32, ARMv8-A AArch32, ARMv8-R AArch32)
>>
>> Armv7 missing here.
>
> What is the formal name I should use for it here? ARMv7 AArch32 ?
Armv7-A (no need to specify anything more as it was 32bit only).
Cheers
Bertrand
|