On Sat, Jul 31, 2021 at 9:34 PM Segher Boessenkool
wrote:
>
> On Thu, Jul 29, 2021 at 04:08:36PM +, Joseph Myers wrote:
> > On Thu, 29 Jul 2021, Florian Weimer via Gcc wrote:
> > > On GNU/Linux, SEGFS is used to implement the thread pointer, to avoid
> > > dedicating a general-purpose register
On Thu, Jul 29, 2021 at 04:08:36PM +, Joseph Myers wrote:
> On Thu, 29 Jul 2021, Florian Weimer via Gcc wrote:
> > On GNU/Linux, SEGFS is used to implement the thread pointer, to avoid
> > dedicating a general-purpose register to it. At address zero with the
> > SEGFS prefix, the offset itself
On Thu, Jul 29, 2021 at 6:09 PM Joseph Myers wrote:
>
> On Thu, 29 Jul 2021, Florian Weimer via Gcc wrote:
>
> > On GNU/Linux, SEGFS is used to implement the thread pointer, to avoid
> > dedicating a general-purpose register to it. At address zero with the
> > SEGFS prefix, the offset itself is s
On Thu, 29 Jul 2021, Florian Weimer via Gcc wrote:
> On GNU/Linux, SEGFS is used to implement the thread pointer, to avoid
> dedicating a general-purpose register to it. At address zero with the
> SEGFS prefix, the offset itself is stored so that userspace can read it
> without having to call int
The x86-64 architecture supports two instruction prefixes, SEGFS and
SEGGS that apply an additional offset to memory operands. The offset
lives in a special register that is accessible to the kernel only
(historically).
On GNU/Linux, SEGFS is used to implement the thread pointer, to avoid
dedicat