hi all,
I am trying to run a rtos on my simple riscv core. Is the x4 register named 'thread pointer' used for storing current PC for current thread?
best,
vincent
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/SG2PR03MB143846F49AC9F8C33FE2161BC8830%40SG2PR03MB1438.apcprd03.prod.outlook.com.
I believe it's used to point to thread-local storage. The PC is in the PC register (it cannot fetch instructions otherwise).
On Dec 5, 2016 7:16 AM, "Ma vincent" <ma9...@live.cn> wrote:
--hi all,
I am trying to run a rtos on my simple riscv core. Is the x4 register named 'thread pointer' used for storing current PC for current thread?
best,
vincent
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/SG2PR03MB143846F49AC9F8C33FE2161BC8830%40SG2PR03MB1438.apcprd03.prod.outlook.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAEz%3Dso%3DxJioyucDXsUQXPm9JDhUQHBkUfA6fmesFuPP80fY9tw%40mail.gmail.com.
On 07 Dec 2016, at 15:38, Richard W.M. Jones <rjo...@redhat.com> wrote:
On Mon, Dec 05, 2016 at 11:11:46AM -0800, Andrew Waterman wrote:
Yeah, it's used by __thread / thread_local in pthreads / C++ programs.
I had a possibly naive question about this: Do implementations treat
these registers like x4, x2 (sp), x1 (ra) differently, perhaps
optimizing them in some way? I mean by this three points:
(1) Can a non-threaded program go ahead and use x4 for its own
purposes without any penalty or other issues?
(2) Apart from the obvious tools and ABI concerns, could an
implementation use different registers for stack pointer, TLS, etc?
(3) Apart from x0, are all registers identical at the chip level?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/20161207143824.GC18625%40redhat.com.