Re: [Xenomai-core] [PATCH 2/3] x86-64: Work around gcc issues with populating syscall registers
Philippe Gerum wrote: > On Sun, 2009-07-19 at 17:23 +0200, Jan Kiszka wrote: >> Gilles Chanteperdrix wrote: >>> Jan Kiszka wrote: gcc-4.1.3 of kubuntu has problem with proper syscall register initialization in rt_task_shadow if TLS is enabled. But it is likely that more compiler versions below 4.3 and more configuration variants are affected. This patch installs a workaround for these gcc versions which places an optimization barrier before the register variable setup. This forces gcc to actually load the registers. >>> I have tried the barrier with arm gcc, it does not work. However, >>> marking the registered clobbered instead of the memory fixes arm gcc 4.3 >>> bug. So, I wonder, would not it make more sense to mark the registers as >>> clobbered by the barrier instead of memory on x86 too? >>> >> Sounds reasonable. Will give it a try later. Sounded reasonable - but didn't work. So we have to stick with the original version. >> >> I just noticed that my unification patch includes some unwanted merge >> artifact, so it requires another round in any case. > > So I'm discarding the pending pull request entirely. Please re-submit > when ready. I just pushed an updated for patch 3 (removing the original "+r" workaround from the unified version). Please pull now from git://git.xenomai.org/xenomai-jki.git for-upstream Jan signature.asc Description: OpenPGP digital signature ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] [PATCH 2/3] x86-64: Work around gcc issues with populating syscall registers
On Sun, 2009-07-19 at 17:23 +0200, Jan Kiszka wrote: > Gilles Chanteperdrix wrote: > > Jan Kiszka wrote: > >> gcc-4.1.3 of kubuntu has problem with proper syscall register > >> initialization in rt_task_shadow if TLS is enabled. But it is likely > >> that more compiler versions below 4.3 and more configuration variants > >> are affected. > >> > >> This patch installs a workaround for these gcc versions which places an > >> optimization barrier before the register variable setup. This forces gcc > >> to actually load the registers. > > > > I have tried the barrier with arm gcc, it does not work. However, > > marking the registered clobbered instead of the memory fixes arm gcc 4.3 > > bug. So, I wonder, would not it make more sense to mark the registers as > > clobbered by the barrier instead of memory on x86 too? > > > > Sounds reasonable. Will give it a try later. > > I just noticed that my unification patch includes some unwanted merge > artifact, so it requires another round in any case. So I'm discarding the pending pull request entirely. Please re-submit when ready. > > Jan > -- Philippe. ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] [PATCH 2/3] x86-64: Work around gcc issues with populating syscall registers
Gilles Chanteperdrix wrote: > Jan Kiszka wrote: >> gcc-4.1.3 of kubuntu has problem with proper syscall register >> initialization in rt_task_shadow if TLS is enabled. But it is likely >> that more compiler versions below 4.3 and more configuration variants >> are affected. >> >> This patch installs a workaround for these gcc versions which places an >> optimization barrier before the register variable setup. This forces gcc >> to actually load the registers. > > I have tried the barrier with arm gcc, it does not work. However, > marking the registered clobbered instead of the memory fixes arm gcc 4.3 > bug. So, I wonder, would not it make more sense to mark the registers as > clobbered by the barrier instead of memory on x86 too? > Sounds reasonable. Will give it a try later. I just noticed that my unification patch includes some unwanted merge artifact, so it requires another round in any case. Jan signature.asc Description: OpenPGP digital signature ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] [PATCH 2/3] x86-64: Work around gcc issues with populating syscall registers
Jan Kiszka wrote: > gcc-4.1.3 of kubuntu has problem with proper syscall register > initialization in rt_task_shadow if TLS is enabled. But it is likely > that more compiler versions below 4.3 and more configuration variants > are affected. > > This patch installs a workaround for these gcc versions which places an > optimization barrier before the register variable setup. This forces gcc > to actually load the registers. I have tried the barrier with arm gcc, it does not work. However, marking the registered clobbered instead of the memory fixes arm gcc 4.3 bug. So, I wonder, would not it make more sense to mark the registers as clobbered by the barrier instead of memory on x86 too? -- Gilles. ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] [PATCH 2/3] x86-64: Work around gcc issues with populating syscall registers
On Sun, 2009-07-19 at 15:42 +0200, Gilles Chanteperdrix wrote: > Jan Kiszka wrote: > > +#define LOAD_ARGS_0() asm volatile ("" ::: "memory"); > > g++, at least some verions in the past, chokes on ::: so, you should do > : /* */ : /* */ : > I will fix this manually while merging. > > -- Philippe. ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] [PATCH 2/3] x86-64: Work around gcc issues with populating syscall registers
Jan Kiszka wrote: > +#define LOAD_ARGS_0()asm volatile ("" ::: "memory"); g++, at least some verions in the past, chokes on ::: so, you should do : /* */ : /* */ : -- Gilles. ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core