[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] docs/misra: document the expected sizes of integer types
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Tue, 9 Apr 2024 06:57:14 +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=7ywumUPEqXGa3FzRxQd1bVCqoma0uwlxI6aAeNPh8GY=; b=O4PaIDFBNAe/xMEXw+qkIN70oOIcVqoEX3GOhW/DcxhW3rs4O1LEbD+qsjticrgN6WUSh6/zGtpDSu7TJyFHwikyeJ7YuI3lmbU7okQqN5cSzBdXSEK7VodOClJf5eZoCC8JRTW0lQQlCnpg7QsS0KpIwYKJ3OP7o2tL8oDoRZ7kRY2QSID9b40l2R/aLYNFNLEbrrcGBNnkuucSSoCgz96ysXc5P3nQ0ky8Rd/stbSzI8DocpXMs2buHGSyZRaSESsOMwUqfAmQqYDSrMEwmwY3OO4BanNG/WanbtXWWK8lZ3RaxDqkIMO5UMiKe5ZSvoSao/Zp6udGSmhZXwT77A==
- 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=7ywumUPEqXGa3FzRxQd1bVCqoma0uwlxI6aAeNPh8GY=; b=exu1hPzaZ7lYUsKuGWMU0gValfVhURgrMemaizt/6kDi9xG9CX96NUYp2FGTjGleHGZJLcZVPwuNUfYRX8ELgzcIp4a81Da8cS9Ob3HxcvpjwJGnRMG+FLo+nMq55ykWyLVXXSXRbEvMizNO8RSyQxZJpw5wm9bh9MUho9/ivVMSE7yNE91+rvsrUXE3yJlBdPm2XT7020Vc+iu8RqFrHDofebkTeDNT2Bc5aOBBLJdA4v+gN8JSINUTI95QUpnhMpV27hvlx4C4DpzHGzTzPWSBgQI2kZcEuN9M4+wQCNo3Iu75f+kcGoEwUDkQ+HBe/tK0z67oiFLWBoBxJz1Swg==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=I2qsmb/jjH8P+ZSpD64URS71mki9B4FXvPLVMiJePmGQiCllONyYMubwSKX+9RWx1pjD9ybjSxOadTa8eueYcTCEZ5vzKBJ7yAUAxZvBXD2kee3dz/BwKOUIDospRY2YTrsjPNB/Y84+pSOJ3iHGVKqBJhklrbzkuAQ8K90d3VEeQwvgpz8tyuEK9gzy9jDcvwJMBi4E++lKqibItOmrvNucTHjlrMXfqyxpGoFe75iqceLEL4Uy91D1uDvX+Xoh6a6qMWgaJeaofbn3O6g40dvkvpBXxq0GNmSTdIsvW1KM0pFZKIooK1nF/e2IDPxxJJa821r6RMEWSyrRq2qPaQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H4WJRYIxjrYWSUvjV9GoXMwR0vwebQzUEerwX7Zp8Oq5/yMLgulVSvmOGYLCRJX0PG5A8sq1qSs80hkkOcQRQJfDnxZ6zHw4RfIMxx133QS8tVL8skk9SPKwD13LKhpW12b7t0TwBxLg6sEiwxLCTms0xF3y77T5DoWiBEo3CMc3HD3Fiw3qBF+ai0SUbRDCqmGZRZRhWFGbe1AFH/piDdKL1N/l8Rp2zbucqwClf3yFFuHOkZZBTf5pu3J6eDFyPhSmagADHsVzoVmAJrZ/6iB7Zaoav4pVyI9ukxeqwIVBL+984HqChMkTRoITTbR5dKLiyk98k8Sx1wC3ZXjNKQ==
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 09 Apr 2024 06:58:06 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHah4lk+w1h9RgyfUmcoVl2Erm4ibFfhy2A
- Thread-topic: [PATCH v4] docs/misra: document the expected sizes of integer types
Hi Stefano,
> On 5 Apr 2024, at 20:44, 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>
I think it is a good start and definitely better than having nothing documented
so:
Acked-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Cheers
Bertrand
> ---
> Changes in v4:
> - list the architectures explicitly
> - add ARMv7-A
> ---
> docs/misra/C-language-toolchain.rst | 73 +++++++++++++++++++++++++++++
> 1 file changed, 73 insertions(+)
>
> diff --git a/docs/misra/C-language-toolchain.rst
> b/docs/misra/C-language-toolchain.rst
> index b7c2000992..5ddfe7bdbe 100644
> --- a/docs/misra/C-language-toolchain.rst
> +++ b/docs/misra/C-language-toolchain.rst
> @@ -480,4 +480,77 @@ 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 and ARMv7-A:
> + 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
> +
> +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
> + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A, x86_64,
> + ARMv8-A AArch64, RV64, PPC64
> +
> + * - short
> + - 16 bits
> + - 16 bits
> + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A, x86_64,
> + ARMv8-A AArch64, RV64, PPC64
> +
> + * - int
> + - 32 bits
> + - 32 bits
> + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A, x86_64,
> + ARMv8-A AArch64, RV64, PPC64
> +
> + * - long
> + - 32 bits
> + - 32 bits
> + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A
> +
> + * - long
> + - 64 bits
> + - 64 bits
> + - x86_64, ARMv8-A AArch64, RV64, PPC64
> +
> + * - long long
> + - 64-bit
> + - 32-bit
> + - x86_32
> +
> + * - long long
> + - 64-bit
> + - 64-bit
> + - x86_64, ARMv8-A AArch64, RV64, PPC64, ARMv8-A AArch32, ARMv8-R
> + AArch32, ARMv7-A
> +
> + * - pointer
> + - 32-bit
> + - 32-bit
> + - x86_32, ARMv8-A AArch32, ARMv8-R AArch32, ARMv7-A
> +
> + * - pointer
> + - 64-bit
> + - 64-bit
> + - x86_64, ARMv8-A AArch64, RV64, PPC64
> +
> +
> END OF DOCUMENT.
> --
> 2.25.1
>
|