} GCVTable;
/*
- * We use the lowest bits in the vtable pointer of objects to tag whether they're forwarded,
- * pinned, and/or cemented. On 64 bit architectures, where vtables are 8-byte aligned, we
- * use one bit for each of those. On 32 bit architectures, we just use the lowest two bits,
- * which works because objects cannot both be forwarded and pinned/cemented, and cemented
- * objects are always pinned, too. These are the valid states:
+ * We use the lowest three bits in the vtable pointer of objects to tag whether they're
+ * forwarded, pinned, and/or cemented. These are the valid states:
*
- * | State | 64 bits | 32 bits |
- * |------------------+---------+---------|
- * | default | 000 | 00 |
- * | forwarded | 001 | 01 |
- * | pinned | 010 | 10 |
- * | pinned, cemented | 110 | 11 |
+ * | State | bits |
+ * |------------------+------+
+ * | default | 000 |
+ * | forwarded | 001 |
+ * | pinned | 010 |
+ * | pinned, cemented | 110 |
*
* We store them in the vtable slot because the bits are used in the sync block for other
* purposes: if we merge them and alloc the sync blocks aligned to 8 bytes, we can change
#define SGEN_VTABLE_BITS_MASK SGEN_TAGGED_POINTER_MASK
-#if SIZEOF_VOID_P == 8
#define SGEN_POINTER_IS_TAGGED_FORWARDED(p) SGEN_POINTER_IS_TAGGED_1((p))
#define SGEN_POINTER_TAG_FORWARDED(p) SGEN_POINTER_TAG_1((p))
#define SGEN_POINTER_IS_TAGGED_CEMENTED(p) SGEN_POINTER_IS_TAGGED_4((p))
#define SGEN_POINTER_TAG_CEMENTED(p) SGEN_POINTER_TAG_4((p))
-#else
-#define SGEN_POINTER_IS_TAGGED_FORWARDED(p) (SGEN_POINTER_TAG_12 ((p)) == 1)
-#define SGEN_POINTER_TAG_FORWARDED(p) SGEN_POINTER_SET_TAG_12((p), 1)
-
-#define SGEN_POINTER_IS_TAGGED_PINNED(p) SGEN_POINTER_IS_TAGGED_2 ((p))
-#define SGEN_POINTER_TAG_PINNED(p) SGEN_POINTER_TAG_2 ((p))
-
-#define SGEN_POINTER_IS_TAGGED_CEMENTED(p) (SGEN_POINTER_TAG_12 ((p)) == 3)
-#define SGEN_POINTER_TAG_CEMENTED(p) SGEN_POINTER_SET_TAG_12 ((p), 3)
-#endif
#define SGEN_POINTER_UNTAG_VTABLE(p) SGEN_POINTER_UNTAG_ALL((p))
#ifndef __MONO_SGEN_TAGGED_POINTER_H__
#define __MONO_SGEN_TAGGED_POINTER_H__
-#if SIZEOF_VOID_P == 8
#define SGEN_TAGGED_POINTER_MASK 7
-#else
-#define SGEN_TAGGED_POINTER_MASK 3
-#endif
#define SGEN_POINTER_IS_TAGGED_1(p) ((mword)(p) & 1)
#define SGEN_POINTER_TAG_1(p) ((void*)((mword)(p) | 1))
#define SGEN_POINTER_TAG_12(p) ((mword)(p) & 3)
#define SGEN_POINTER_SET_TAG_12(p,t) ((void*)(((mword)(p) & ~3) | (t)))
-#if SIZEOF_VOID_P == 8
#define SGEN_POINTER_IS_TAGGED_4(p) ((mword)(p) & 4)
#define SGEN_POINTER_TAG_4(p) ((void*)((mword)(p) | 4))
#define SGEN_POINTER_UNTAG_4(p) ((void*)((mword)(p) & ~4))
#define SGEN_POINTER_UNTAG_24(p) ((void*)((mword)(p) & ~6))
-#endif
#define SGEN_POINTER_IS_TAGGED_ANY(p) ((mword)(p) & SGEN_TAGGED_POINTER_MASK)
#define SGEN_POINTER_UNTAG_ALL(p) ((void*)((mword)(p) & ~SGEN_TAGGED_POINTER_MASK))