(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
iordi_notdi-1.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O2 -fno-inline --save-temps" } */
       3  
       4  extern void abort (void);
       5  
       6  typedef long long s64int;
       7  typedef int s32int;
       8  typedef unsigned long long u64int;
       9  typedef unsigned int u32int;
      10  
      11  s64int
      12  iordi_di_notdi (s64int a, s64int b)
      13  {
      14    return (a | ~b);
      15  }
      16  
      17  s64int
      18  iordi_di_notzesidi (s64int a, u32int b)
      19  {
      20    return (a | ~(u64int) b);
      21  }
      22  
      23  s64int
      24  iordi_notdi_zesidi (s64int a, u32int b)
      25  {
      26    return (~a | (u64int) b);
      27  }
      28  
      29  s64int
      30  iordi_di_notsesidi (s64int a, s32int b)
      31  {
      32    return (a | ~(s64int) b);
      33  }
      34  
      35  int main ()
      36  {
      37    s64int a64 = 0xdeadbeef00000000ll;
      38    s64int b64 = 0x000000004f4f0112ll;
      39    s64int c64 = 0xdeadbeef000f0000ll;
      40  
      41    u32int c32 = 0x01124f4f;
      42    s32int d32 = 0xabbaface;
      43  
      44    s64int z = iordi_di_notdi (a64, b64);
      45    if (z != 0xffffffffb0b0feedll)
      46      abort ();
      47  
      48    z = iordi_di_notzesidi (a64, c32);
      49    if (z != 0xfffffffffeedb0b0ll)
      50      abort ();
      51  
      52    z = iordi_notdi_zesidi (c64, c32);
      53    if (z != 0x21524110fff2ffffll)
      54      abort ();
      55  
      56    z = iordi_di_notsesidi (a64, d32);
      57    if (z != 0xdeadbeef54450531ll)
      58      abort ();
      59  
      60    return 0;
      61  }
      62  
      63  /* { dg-final { scan-assembler-times "orn\t" 6 { target arm_thumb2 } } } */
      64