kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

i128_06_shifts_bitwise.c (481B)


      1 typedef unsigned __int128 u128;
      2 
      3 int test_main(void) {
      4   u128 x = (u128)0xf0ULL << 68;
      5   u128 y = x >> 64;
      6   u128 z = (x | ((u128)0x55ULL << 4)) ^ ((u128)0x5ULL << 4);
      7   u128 high_truth = ((u128)1 << 112) << 4;
      8   _Bool high_bool = high_truth;
      9   if ((unsigned long long)y != 0xf00ULL) return 11;
     10   if ((unsigned long long)z != 0x500ULL) return 12;
     11   if ((unsigned long long)(z >> 64) != 0xf00ULL) return 13;
     12   if (!high_truth) return 14;
     13   if (!high_bool) return 15;
     14   return 41;
     15 }