186277eb844c4983c81de62d7c050e92fe7155788Stephen Hines#ifndef UTILS_H 286277eb844c4983c81de62d7c050e92fe7155788Stephen Hines#define UTILS_H 386277eb844c4983c81de62d7c050e92fe7155788Stephen Hines 486277eb844c4983c81de62d7c050e92fe7155788Stephen Hinesinline void break_optimization(void *arg) { 586277eb844c4983c81de62d7c050e92fe7155788Stephen Hines __asm__ __volatile__("" : : "r" (arg) : "memory"); 686277eb844c4983c81de62d7c050e92fe7155788Stephen Hines} 786277eb844c4983c81de62d7c050e92fe7155788Stephen Hines 886277eb844c4983c81de62d7c050e92fe7155788Stephen Hines// Tests will instantiate this class to pad out bit sets to test out the various 986277eb844c4983c81de62d7c050e92fe7155788Stephen Hines// ways we can represent the bit set (32-bit inline, 64-bit inline, memory). 1086277eb844c4983c81de62d7c050e92fe7155788Stephen Hines// This class has 37 virtual member functions, which forces us to use a 1186277eb844c4983c81de62d7c050e92fe7155788Stephen Hines// pointer-aligned bitset. 1286277eb844c4983c81de62d7c050e92fe7155788Stephen Hinestemplate <typename T, unsigned I> 1386277eb844c4983c81de62d7c050e92fe7155788Stephen Hinesclass Deriver : T { 1486277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f() {} 1586277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void g() {} 1686277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f1() {} 1786277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f2() {} 1886277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f3() {} 1986277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f4() {} 2086277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f5() {} 2186277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f6() {} 2286277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f7() {} 2386277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f8() {} 2486277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f9() {} 2586277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f10() {} 2686277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f11() {} 2786277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f12() {} 2886277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f13() {} 2986277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f14() {} 3086277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f15() {} 3186277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f16() {} 3286277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f17() {} 3386277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f18() {} 3486277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f19() {} 3586277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f20() {} 3686277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f21() {} 3786277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f22() {} 3886277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f23() {} 3986277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f24() {} 4086277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f25() {} 4186277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f26() {} 4286277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f27() {} 4386277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f28() {} 4486277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f29() {} 4586277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f30() {} 4686277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f31() {} 4786277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f32() {} 4886277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f33() {} 4986277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f34() {} 5086277eb844c4983c81de62d7c050e92fe7155788Stephen Hines virtual void f35() {} 5186277eb844c4983c81de62d7c050e92fe7155788Stephen Hines}; 5286277eb844c4983c81de62d7c050e92fe7155788Stephen Hines 5386277eb844c4983c81de62d7c050e92fe7155788Stephen Hines#endif 54