Changes to relocs per Alan Modra; move/rewrite code alignment

Signed-off-by: Bill Schmidt <wschmidt@linux.ibm.com>
master
Bill Schmidt 5 years ago
parent 479f5ba76c
commit 323a50cbca

@ -4080,6 +4080,21 @@ xml:id="dbdoclet.50655240_pgfId-1156194">
all be on 4-byte (integer) boundaries.</para> all be on 4-byte (integer) boundaries.</para>
</note> </note>
</section> </section>
<section xml:id="dbdoclet.50655240___codealign"
revisionflag="added">
<title>Code Alignment</title>
<para>
Functions must be aligned on at least a 4-byte boundary.
</para>
<para>
If a function contains any prefixed (8-byte) instructions,
functions should preferably be aligned on at least a 64-byte
boundary. In ISA 3.1, executing a prefixed instruction that
crosses a 64-byte boundary will cause a SIGILL that must be
handled by the kernel. Compilers and assemblers can avoid
this if functions are aligned on a 64-byte boundary.
</para>
</section>
</section> </section>
</section> </section>
<section xml:id="dbdoclet.50655240_85672"> <section xml:id="dbdoclet.50655240_85672">
@ -6637,20 +6652,6 @@ s6 - 72 (stored)</programlisting>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</section> </section>
<section xml:id="dbdoclet.50655240___codealign"
revisionflag="added">
<title>Code Alignment</title>
<para>
Functions must be aligned on at least a 4-byte boundary.
</para>
<para>
If a function contains any prefixed (8-byte) instructions,
functions must be aligned on at least a 64-byte boundary.
This is necessary so that compilers and assemblers can avoid
placing a prefixed instruction so that it crosses a 64-byte
boundary.
</para>
</section>
<section xml:id="dbdoclet.50655240___tailcall" <section xml:id="dbdoclet.50655240___tailcall"
revisionflag="added"> revisionflag="added">
<title>Tail-Call Optimization</title> <title>Tail-Call Optimization</title>

@ -2837,12 +2837,18 @@ my_func:
<entry> <entry>
<para>Allocates two contiguous entries in the GOT to hold a <para>Allocates two contiguous entries in the GOT to hold a
tls_index structure, with values dtpmod and dtprel, and tls_index structure, with values dtpmod and dtprel, and
computes the offset from .TOC. of the first entry.</para> computes the <phrase revisionflag="deleted">offset
<para>If n is the offset computed:</para> from .TOC.</phrase><phrase
<para>GOT[n] = dtpmod</para> revisionflag="added">address</phrase> of the first
<para>GOT[n + 1] = dtprel</para> entry.</para>
<para>The call to __tls_get_addr ( ) happens as:</para> <para revisionflag="deleted">If n is the offset
<para>__tls_get_addr ((tls_index *) &amp;GOT[n])</para> computed:</para>
<para revisionflag="deleted">GOT[n] = dtpmod</para>
<para revisionflag="deleted">GOT[n + 1] = dtprel</para>
<para revisionflag="deleted">The call to
__tls_get_addr ( ) happens as:</para>
<para revisionflag="deleted">__tls_get_addr
((tls_index *) &amp;GOT[n])</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -2852,12 +2858,27 @@ my_func:
<entry> <entry>
<para>Allocates two contiguous entries in the GOT to hold a <para>Allocates two contiguous entries in the GOT to hold a
tls_index structure, with values dtpmod and zero, and computes tls_index structure, with values dtpmod and zero, and computes
the offset from .TOC. of the first entry.</para> the <phrase revisionflag="deleted">offset from
<para>If n is the offset computed:</para> .TOC.</phrase><phrase
<para>GOT[n] = dtpmod</para> revisionflag="added">address</phrase> of the first
<para>GOT[n + 1] = 0</para> entry.</para>
<para>The call to __tls_get_addr ( ) happens as:</para> <para revisionflag="deleted">If n is the offset
<para>__tls_get_addr ((tls_index *) &amp;GOT[n])</para> computed:</para>
<para revisionflag="deleted">GOT[n] = dtpmod</para>
<para revisionflag="deleted">GOT[n + 1] = 0</para>
<para revisionflag="deleted">The call to
__tls_get_addr ( ) happens as:</para>
<para revisionflag="deleted">__tls_get_addr
((tls_index *) &amp;GOT[n])</para>
</entry>
</row>
<row revisionflag="added">
<entry>
<para>@got@dtprel</para>
</entry>
<entry>
<para>Allocates an entry in the GOT with value dtprel,
and computes the address of the entry.</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -2866,10 +2887,15 @@ my_func:
</entry> </entry>
<entry> <entry>
<para>Allocates an entry in the GOT with value tprel, and <para>Allocates an entry in the GOT with value tprel, and
computes the offset from .TOC. of the entry.</para> computes the <phrase revisionflag="deleted">offset
<para>If n is the offset computed:</para> from .TOC.</phrase><phrase
<para>GOT[n] = tprel</para> revisionflag="added">address</phrase> of the
<para>The value of tprel is loaded into a register from the entry.</para>
<para revisionflag="deleted">If n is the offset
computed:</para>
<para revisionflag="deleted">GOT[n] = tprel</para>
<para revisionflag="deleted">The value of tprel is
loaded into a register from the
location (GOT + n) to be used in an r2 form instruction.</para> location (GOT + n) to be used in an r2 form instruction.</para>
</entry> </entry>
</row> </row>
@ -3997,7 +4023,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>@got@tlsgd</para> <para>@got@tlsgd <phrase revisionflag="added">&#8211;
.TOC.</phrase></para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4011,7 +4038,8 @@ my_func:
<para>half16</para> <para>half16</para>
</entry> </entry>
<entry> <entry>
<para>#lo(@got@tlsgd)</para> <para>#lo(@got@tlsgd <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4025,7 +4053,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>#hi(@got@tlsgd)</para> <para>#hi(@got@tlsgd <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4039,7 +4068,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>#ha(@got@tlsgd)</para> <para>#ha(@got@tlsgd <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4053,7 +4083,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>@got@tlsld</para> <para>@got@tlsld <phrase revisionflag="added">&#8211;
.TOC.</phrase></para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4067,7 +4098,8 @@ my_func:
<para>half16</para> <para>half16</para>
</entry> </entry>
<entry> <entry>
<para>#lo(@got@tlsld)</para> <para>#lo(@got@tlsld <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4081,7 +4113,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>#hi(@got@tlsld)</para> <para>#hi(@got@tlsld <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4095,7 +4128,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>#ha(@got@tlsld)</para> <para>#ha(@got@tlsld <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4109,7 +4143,8 @@ my_func:
<para>half16ds*</para> <para>half16ds*</para>
</entry> </entry>
<entry> <entry>
<para>@got@tprel</para> <para>@got@tprel <phrase revisionflag="added">&#8211;
.TOC.</phrase></para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4123,7 +4158,8 @@ my_func:
<para>half16ds</para> <para>half16ds</para>
</entry> </entry>
<entry> <entry>
<para>#lo(@got@tprel)</para> <para>#lo(@got@tprel <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4137,7 +4173,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>#hi(@got@tprel)</para> <para>#hi(@got@tprel <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4151,7 +4188,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>#ha(@got@tprel)</para> <para>#ha(@got@tprel <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4165,7 +4203,8 @@ my_func:
<para>half16ds*</para> <para>half16ds*</para>
</entry> </entry>
<entry> <entry>
<para>@got@dtprel</para> <para>@got@dtprel <phrase revisionflag="added">&#8211;
.TOC.</phrase></para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4179,7 +4218,8 @@ my_func:
<para>half16ds</para> <para>half16ds</para>
</entry> </entry>
<entry> <entry>
<para>#lo(@got@dtprel)</para> <para>#lo(@got@dtprel <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4193,7 +4233,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>#hi(@got@dtprel)</para> <para>#hi(@got@dtprel <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4207,7 +4248,8 @@ my_func:
<para>half16*</para> <para>half16*</para>
</entry> </entry>
<entry> <entry>
<para>#ha(@got@dtprel)</para> <para>#ha(@got@dtprel <phrase revisionflag="added">&#8211;
.TOC.</phrase>)</para>
</entry> </entry>
</row> </row>
<row> <row>
@ -4916,7 +4958,7 @@ my_func:
<para>prefix34*</para> <para>prefix34*</para>
</entry> </entry>
<entry> <entry>
<para>@got@tlsgd</para> <para>@got@tlsgd &#8211; <emphasis>P</emphasis></para>
</entry> </entry>
</row> </row>
<row revisionflag="added"> <row revisionflag="added">
@ -4930,7 +4972,7 @@ my_func:
<para>prefix34*</para> <para>prefix34*</para>
</entry> </entry>
<entry> <entry>
<para>@got@tlsld</para> <para>@got@tlsld &#8211; <emphasis>P</emphasis></para>
</entry> </entry>
</row> </row>
<row revisionflag="added"> <row revisionflag="added">
@ -4944,7 +4986,7 @@ my_func:
<para>prefix34*</para> <para>prefix34*</para>
</entry> </entry>
<entry> <entry>
<para>@got@tprel</para> <para>@got@tprel &#8211; <emphasis>P</emphasis></para>
</entry> </entry>
</row> </row>
<row revisionflag="added"> <row revisionflag="added">
@ -4958,7 +5000,7 @@ my_func:
<para>prefix34*</para> <para>prefix34*</para>
</entry> </entry>
<entry> <entry>
<para>@got@dtprel</para> <para>@got@dtprel &#8211; <emphasis>P</emphasis></para>
</entry> </entry>
</row> </row>
<row revisionflag="added"> <row revisionflag="added">

Loading…
Cancel
Save