This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, ARM] Atomic builtins using kernel helpers for Linux/EABI


Andrew Haley wrote:
Helge Deller wrote:
But else, everything seems usable.
So, why not finding a way to share the code for various architectures? I'm sure not only ARMEL and HPPA would need this?

Hmm. This could turn into a horrible mess of #ifdefs for the various architectures.

There would be set of cpp conditionals per sync operation. You need to detect the following:


1. If the target implements the sync operation, do nothing.
2. If the target doesn't implement the sync operation, implement it using another sync operation e.g. __sync_val_compare_and_swap.


With the possibility of one more cpp conditional to disable #2.

Do you think that will get messy?

Cheers,
Carlos.
--
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]