• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #define T(TYPE)			__##TYPE##_TYPE__
2 #define cmp(TYPE, X, OP, Y)	((T(TYPE)) X OP (T(TYPE)) Y)
3 #define TEST(T1, T2, X, OP, Y)	cmp(T1, X, OP, Y) == cmp(T2, X, OP, Y)
4 
5 #define ARGS(TYPE)	T(TYPE) a, T(TYPE)b
6 
cmpe_zext(ARGS (UINT32))7 _Bool cmpe_zext(ARGS(UINT32)) { return TEST(UINT64, UINT32, a, ==, 0xffffffff); }
cmps_zext(ARGS (UINT32))8 _Bool cmps_zext(ARGS(UINT32)) { return TEST( INT64, UINT32, a, < , 0xffffffff); }
cmpu_zext(ARGS (UINT32))9 _Bool cmpu_zext(ARGS(UINT32)) { return TEST(UINT64, UINT32, a, < , 0xffffffff); }
10 
11 /*
12  * check-name: cmp-zext
13  * check-command: test-linearize -Wno-decl $file
14  *
15  * check-output-ignore
16  * check-output-returns: 1
17  */
18