Fix make-array transforms.
[sbcl.git] / tests / swap-lispobjs.c
1 #include "arch.h"
2 #include "genesis/config.h"
3 #include "genesis/constants.h"
4 #include "runtime.h"
5 #include "target-arch.h"
6
7 #if defined(LISP_FEATURE_X86) || defined (LISP_FEATURE_X86_64)
8
9 int
10 try_to_zero_with_swap_lispobjs(volatile lispobj *word)
11 {
12     /* GCC with high enough optimization settings optimizes away the
13      * whole assembly if it is not marked as volatile. */
14     swap_lispobjs(word,0);
15     if (*word==0) {
16         return 0;
17     } else {
18         return 1;
19     }
20 }
21
22 #endif