LCOV - code coverage report
Current view: top level - gcc - common.md (source / functions) Coverage Total Hit
Test: gcc.info Lines: 60.6 % 66 40
Test Date: 2024-04-20 14:03:02 Functions: 76.5 % 17 13
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : ;; Common GCC machine description file, shared by all targets.
       2                 :             : ;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
       3                 :             : ;;
       4                 :             : ;; This file is part of GCC.
       5                 :             : ;;
       6                 :             : ;; GCC is free software; you can redistribute it and/or modify
       7                 :             : ;; it under the terms of the GNU General Public License as published by
       8                 :             : ;; the Free Software Foundation; either version 3, or (at your option)
       9                 :             : ;; any later version.
      10                 :             : ;;
      11                 :             : ;; GCC is distributed in the hope that it will be useful,
      12                 :             : ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
      13                 :             : ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14                 :             : ;; GNU General Public License for more details.
      15                 :             : ;;
      16                 :             : ;; You should have received a copy of the GNU General Public License
      17                 :             : ;; along with GCC; see the file COPYING3.  If not see
      18                 :             : ;; <http://www.gnu.org/licenses/>.  */
      19                 :             : 
      20                 :             : ;; This predicate is intended to be paired with register constraints that use
      21                 :             : ;; register filters to impose an alignment.  Operands that are aligned via
      22                 :             : ;; TARGET_HARD_REGNO_MODE_OK should use normal register_operands instead.
      23                 :             : (define_predicate "aligned_register_operand"
      24                 :             :   (match_code "reg,subreg")
      25                 :             : {
      26                 :             :   /* Require the offset in a non-paradoxical subreg to be naturally aligned.
      27                 :             :      For example, if we have a subreg of something that is double the size of
      28                 :             :      this operand, the offset must select the first or second half of it.  */
      29                 :           0 :   if (SUBREG_P (op)
      30                 :           0 :       && multiple_p (SUBREG_BYTE (op), GET_MODE_SIZE (GET_MODE (op))))
      31                 :           0 :     op = SUBREG_REG (op);
      32                 :           0 :   if (!REG_P (op))
      33                 :             :     return false;
      34                 :             : 
      35                 :           0 :   if (HARD_REGISTER_P (op))
      36                 :             :     {
      37                 :           0 :       if (!in_hard_reg_set_p (operand_reg_set, GET_MODE (op), REGNO (op)))
      38                 :             :         return false;
      39                 :             : 
      40                 :             :       /* Reject hard registers that would need reloading, so that the reload
      41                 :             :          is visible to IRA and to pre-RA optimizers.  */
      42                 :           0 :       if (REGNO (op) % REG_NREGS (op) != 0)
      43                 :           0 :         return false;
      44                 :             :     }
      45                 :             :   return true;
      46                 :             : })
      47                 :             : 
      48                 :             : (define_register_constraint "r" "GENERAL_REGS"
      49                 :           0 :   "Matches any general register.")
      50                 :             : 
      51                 :           0 : (define_memory_constraint "TARGET_MEM_CONSTRAINT"
      52                 :             :   "Matches any valid memory."
      53                 :           0 :   (and (match_code "mem")
      54                 :   383056890 :        (match_test "memory_address_addr_space_p (GET_MODE (op), XEXP (op, 0),
      55                 :   383056890 :                                                  MEM_ADDR_SPACE (op))")))
      56                 :             : 
      57                 :             : (define_memory_constraint "o"
      58                 :    44732292 :   "Matches an offsettable memory reference."
      59                 :           0 :   (and (match_code "mem")
      60                 :    44732292 :        (match_test "offsettable_nonstrict_memref_p (op)")))
      61                 :           0 : 
      62                 :             : ;; "V" matches TARGET_MEM_CONSTRAINTs that are rejected by "o".
      63                 :           0 : ;; This means that it is not a memory constraint in the usual sense,
      64                 :             : ;; since reloading the address into a base register would make the
      65                 :           0 : ;; address offsettable.
      66                 :             : (define_constraint "V"
      67                 :   125042635 :   "Matches a non-offsettable memory reference."
      68                 :             :   (and (match_code "mem")
      69                 :           0 :        (match_test "memory_address_addr_space_p (GET_MODE (op), XEXP (op, 0),
      70                 :           0 :                                                  MEM_ADDR_SPACE (op))")
      71                 :           0 :        (not (match_test "offsettable_nonstrict_memref_p (op)"))))
      72                 :             : 
      73                 :             : ;; Like "V", this is not a memory constraint, since reloading the address
      74                 :    61006036 : ;; into a base register would cause it not to match.
      75                 :             : (define_constraint "<"
      76                 :    61006036 :   "Matches a pre-dec or post-dec operand."
      77                 :             :   (and (match_code "mem")
      78                 :    61006036 :        (ior (match_test "GET_CODE (XEXP (op, 0)) == PRE_DEC")
      79                 :    61006036 :             (match_test "GET_CODE (XEXP (op, 0)) == POST_DEC"))))
      80                 :             : 
      81                 :             : ;; See the comment for "<".
      82                 :     7448540 : (define_constraint ">"
      83                 :             :   "Matches a pre-inc or post-inc operand."
      84                 :     7448540 :   (and (match_code "mem")
      85                 :     7448540 :        (ior (match_test "GET_CODE (XEXP (op, 0)) == PRE_INC")
      86                 :     7448540 :             (match_test "GET_CODE (XEXP (op, 0)) == POST_INC"))))
      87                 :             : 
      88                 :             : (define_address_constraint "p"
      89                 :        4719 :   "Matches a general address."
      90                 :        9438 :   (match_test "address_operand (op, VOIDmode)"))
      91                 :        4719 : 
      92                 :             : (define_constraint "i"
      93                 :   200119323 :   "Matches a general integer constant."
      94                 :   260121201 :   (and (match_test "CONSTANT_P (op)")
      95                 :   200119323 :        (match_test "!flag_pic || LEGITIMATE_PIC_OPERAND_P (op)")))
      96                 :             : 
      97                 :             : (define_constraint "s"
      98                 :         452 :   "Matches a symbolic integer constant."
      99                 :         904 :   (and (match_test "CONSTANT_P (op)")
     100                 :         452 :        (match_test "!CONST_SCALAR_INT_P (op)")
     101                 :         452 :        (match_test "!flag_pic || LEGITIMATE_PIC_OPERAND_P (op)")))
     102                 :             : 
     103                 :             : (define_constraint "n"
     104                 :    85371833 :   "Matches a non-symbolic integer constant."
     105                 :   126754992 :   (and (match_test "CONST_SCALAR_INT_P (op)")
     106                 :    85371833 :        (match_test "!flag_pic || LEGITIMATE_PIC_OPERAND_P (op)")))
     107                 :             : 
     108                 :             : (define_constraint "E"
     109                 :           0 :   "Matches a floating-point constant."
     110                 :           0 :   (ior (match_test "CONST_DOUBLE_AS_FLOAT_P (op)")
     111                 :           0 :        (match_test "GET_CODE (op) == CONST_VECTOR
     112                 :           0 :                     && GET_MODE_CLASS (GET_MODE (op)) == MODE_VECTOR_FLOAT")))
     113                 :             : 
     114                 :             : ;; There is no longer a distinction between "E" and "F".
     115                 :    96328493 : (define_constraint "F"
     116                 :             :   "Matches a floating-point constant."
     117                 :    96328493 :   (ior (match_test "CONST_DOUBLE_AS_FLOAT_P (op)")
     118                 :             :        (match_test "GET_CODE (op) == CONST_VECTOR
     119                 :           0 :                     && GET_MODE_CLASS (GET_MODE (op)) == MODE_VECTOR_FLOAT")))
     120                 :             : 
     121                 :             : (define_constraint "X"
     122                 :     2387231 :   "Matches anything."
     123                 :     2387231 :   (match_test "true"))
     124                 :     2387231 : /* /home/worker/buildworker/tiber-lcov/build/gcc/common.md not long enough */
     125                 :             : /* (content generated from line coverage data) */
     126                 :         463 : /* ... */
     127                 :             : /* ... */
     128                 :         463 : /* ... */
     129                 :         463 : /* ... */
     130                 :             : /* ... */
     131                 :             : /* ... */
     132                 :           0 : /* ... */
     133                 :             : /* ... */
     134                 :           0 : /* ... */
     135                 :           0 : /* ... */
     136                 :             : /* ... */
     137                 :             : /* ... */
     138                 :     3801980 : /* ... */
     139                 :             : /* ... */
     140                 :     3801980 : /* ... */
     141                 :     3801980 : /* ... */
     142                 :             : /* ... */
     143                 :             : /* ... */
     144                 :    29218604 : /* /home/worker/buildworker/tiber-lcov/build/gcc/common.md not long enough */
     145                 :             : /* (content generated from line coverage data) */
     146                 :    29218604 : /* ... */
     147                 :    33473605 : /* ... */
        

Generated by: LCOV version 2.1-beta

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.