Commit c1eb1af2 authored by Ivo Anjo's avatar Ivo Anjo

Add test for GCC < 4.5 and warn user that build will probably fail

The javartm fallback rtm intrinsics use the asm goto gcc extension, which was only introduced in
GCC 4.5, so we warn users instead of them just getting a cryptic "error: expected ‘(’ before
‘goto’" error.
parent 75046ed3
......@@ -27,6 +27,11 @@
#include <stdint.h>
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if GCC_VERSION < 40500
#warning GCC version >= 4.5 is needed for asm goto support, build will probably fail, see gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html .
#endif
#define __XBEGIN(label) \
asm volatile goto(".byte 0xc7,0xf8 ; .long %l0-1f\n1:" ::: "eax","memory" : label)
#define __XFAIL_STATUS(label, status) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment