From: Niels Möller Date: Wed, 20 Mar 2024 08:38:43 +0000 (+0100) Subject: Update of powerpc64/README. X-Git-Tag: nettle_3.10rc1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=201a734079f7eb3a787cc8f1c325e3e2cbd7b6da;p=thirdparty%2Fnettle.git Update of powerpc64/README. --- diff --git a/powerpc64/README b/powerpc64/README index 9083d898..50859b00 100644 --- a/powerpc64/README +++ b/powerpc64/README @@ -24,6 +24,8 @@ GPR13 reserved Reserved under 64-bit environment; GPR14:GPR31 nonvolatile These registers must be preserved across a function call. +These registers are named rX in the assembly files. + Vector Register Conventions Register Status @@ -32,6 +34,22 @@ VR0:V19 Volatile VR20:VR31 Nonvolatile (extended ABI mode) their values are preserved across function calls +These registers are named vX in the assembly files. + +Float/VSR Register Conventions + +FPR0:FPR13 Volatile +FPR14:FPR31 Nonvolatile + +These registers are named fX in the assembly files, but aren't +currently used by Nettle. + +For ISA 2.06 and later, floating point registers are mapped to the +upper halves of the VSR registers. Then the corresponding VSR +registers (named vsX in the assembly files) are volatile and +non-volatile. (Formally, the lower halves of VSR14:VSR31 are volatile, +but that is not so useful). + Addressing memory There are many ways to reference data, to maintain support of @@ -58,7 +76,7 @@ little-endian mode VSX registers are defined with "X" suffix Function Prologue -Big-endian systems only support ELFv1 ABI which requires the following +Big-endian systems usually support only ELFv1 ABI which requires the following steps in the function prologue: 1. Write the "official procedure descriptor" in ".opd","aw" section 2. Write procedure description for .my_func in my_func label @@ -68,6 +86,14 @@ Refer to [1] for more information Little-endian systems are compatible with ELFv2 ABI, an example of function prologue for ELFv2 ABI can be seen in [2] +Stack + +There's a 288 byte "protected zone" below the stack pointer, that can +be used for storage (obviously "volatile": not preserved if calling +other functions). Both ELFv1 [4] and ELFv2 [3] ABIs are the same in +this respect. + [1] http://www.ibm.com/developerworks/linux/library/l-powasm1.html [2] https://openpowerfoundation.org/?resource_lib=64-bit-elf-v2-abi-specification-power-architecture -[3] https://openpowerfoundation.org/?resource_lib=ibm-power-isa-version-2-07-b +[3] https://openpowerfoundation.org/specifications/64bitelfabi/ +[4] https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#STACK