From f87308e3f5d77147834f52bd0cc296f6abd10a03 Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Sun, 26 Aug 2018 19:23:52 -0500 Subject: [PATCH] Localentry 1 changes. Signed-off-by: Bill Schmidt --- specification/bk_main.xml | 12 +++++++++++- specification/ch_3.xml | 26 ++++++++++++++++++++------ 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/specification/bk_main.xml b/specification/bk_main.xml index 8ef802b..39dc4f5 100644 --- a/specification/bk_main.xml +++ b/specification/bk_main.xml @@ -57,7 +57,7 @@ Freescale Semiconductor, Inc - Revision 1.5e draft + Revision 1.5f draft OpenPOWER @@ -93,6 +93,16 @@ + + 2018-07-20 + + + + Revision 1.5f: PC-relative addressing sixth draft. + + + + 2018-05-21 diff --git a/specification/ch_3.xml b/specification/ch_3.xml index a6a2cd5..f7bae40 100644 --- a/specification/ch_3.xml +++ b/specification/ch_3.xml @@ -305,7 +305,9 @@ e_ident[EI_DATA] ELFDATA2LSB For all little-endian implementations. The OpenPOWER ABI uses the three most-significant bits in the - symbol st_other field to specify the number of instructions between a + symbol st_other field to specify the number of instructionsbytes between a function's global entry point and local entry point. The global entry point is used when it is necessary to set up the TOC pointer (r2) for the function. The local entry point is used when r2 is known to already be @@ -357,7 +359,9 @@ e_ident[EI_DATA] ELFDATA2LSB For all little-endian implementations.2 - The local entry point is at one instruction past the + The local entry point is at one instructionfour bytes past the global entry point. When called at the global entry point, r12 must be set to the function entry address. r2 will be set to the TOC base that @@ -373,7 +377,9 @@ e_ident[EI_DATA] ELFDATA2LSB For all little-endian implementations.3 - The local entry point is at two instructions past the + The local entry point is at two instructionseight bytes past the global entry point. When called at the global entry point, r12 must be set to the function entry address. r2 will be set to the TOC base that @@ -389,7 +395,9 @@ e_ident[EI_DATA] ELFDATA2LSB For all little-endian implementations.4 - The local entry point is at four instructions past the + The local entry point is at four instructionssixteen bytes past the global entry point. When called at the global entry point, r12 must be set to the function entry address. r2 will be set to the TOC base that @@ -405,7 +413,9 @@ e_ident[EI_DATA] ELFDATA2LSB For all little-endian implementations.5 - The local entry point is at eight instructions past the + The local entry point is at eight instructionsthirty-two bytes past the global entry point. When called at the global entry point, r12 must be set to the function entry address. r2 will be set to the TOC base that @@ -421,7 +431,9 @@ e_ident[EI_DATA] ELFDATA2LSB For all little-endian implementations.6 - The local entry point is at 16 instructions past the + The local entry point is at 16 instructionssixty-four bytes past the global entry point. When called at the global entry point, r12 must be set to the function entry address. r2 will be set to the TOC base that @@ -461,6 +473,8 @@ my_func: points, even if the global entry point will not be used. (In such a case, the instructions of the global entry setup sequence may optionally be initialized with TRAP instructions.) + A function with an st_other value of 1 is + identified by a .localentry directive with a value of 1. For very large programs, a 32-bit offset from the TOC base may not suffice to reach all function addresses. In this case, the large program model must be used, and the above sequence is