[Bug 1607] __RTEMS_SIZEOF_VOID_P__ flawed design
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Thu Jul 8 16:30:29 UTC 2010
https://www.rtems.org/bugzilla/show_bug.cgi?id=1607
--- Comment #9 from Ralf Corsepius <ralf.corsepius at rtems.org> 2010-07-08 11:30:22 CDT ---
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > 1. We need this per CPU structure to support multi-core systems.
> > > 2. We have to access fields of this CPU structure in assembly code.
> > Not quite - Your design does not allow otherwise.
> >
> > You could redesign your code in such a way it doesn't have these
> > limitations/restriction attached, e.g.
> > * by rewriting your code in inline-asm (There you can utilize sizeof())
>
> Inline-asm has be be within a function body?
Yes, but there are ways to work around this.
E.g. one trick is to wrap everything into one C-function and to add functions
entries using inline-asm inside of it.
> > or
> > * by using helper const variables being set up in C and refer to them in asm or
> > inline-asm
>
> This is a performance penalty in a time critical section.
Only marginally. The benefit: it's better portable.
> > or
> > * by re-writing everything in C, such that only very few atomic ops (functions)
> > would have to be needed.
>
> This is not possible on many architectures. The exception handling is usually
> not aware of an ABI.
It is (c.f. above).
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list