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] Add __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*


On 5/18/07, Paolo Carlini <pcarlini@suse.de> wrote:

> Could __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 for cmpxchg16b also be added
> to these checks? For testing, you need -mcx16 compile flag on x86_64.

Isn't completely trivial, because HAVE_sync_compare_and_swapti is not
defined on i386... Paolo, or Uros, can you suggest a quick solution for
this extension?

+#include "insn-codes.h"


IMO you should #include "insn-flags.h". HAVE_ macros are defined there.

Perhaps adding

#ifdef HAVE_sync_compare_and_swapqi
+  if (HAVE_sync_compare_and_swapqi)
+    cpp_define (pfile, "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
#endif

could solve this problem?

Uros.


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