LCOV - code coverage report
Current view: top level - gcc - common.md (source / functions) Hit Total Coverage
Test: gcc.info Lines: 39 52 75.0 %
Date: 2020-04-04 11:58:09 Functions: 12 15 80.0 %
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-2020 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                 :            : (define_register_constraint "r" "GENERAL_REGS"
      21                 :            :   "Matches any general register.")
      22                 :            : 
      23                 :            : (define_memory_constraint "TARGET_MEM_CONSTRAINT"
      24                 :            :   "Matches any valid memory."
      25                 :            :   (and (match_code "mem")
      26                 :  269984000 :        (match_test "memory_address_addr_space_p (GET_MODE (op), XEXP (op, 0),
      27                 :  269984000 :                                                  MEM_ADDR_SPACE (op))")))
      28                 :            : 
      29                 :            : (define_memory_constraint "o"
      30                 :   24299900 :   "Matches an offsettable memory reference."
      31                 :            :   (and (match_code "mem")
      32                 :   24299900 :        (match_test "offsettable_nonstrict_memref_p (op)")))
      33                 :            : 
      34                 :            : ;; "V" matches TARGET_MEM_CONSTRAINTs that are rejected by "o".
      35                 :          0 : ;; This means that it is not a memory constraint in the usual sense,
      36                 :            : ;; since reloading the address into a base register would make the
      37                 :          0 : ;; address offsettable.
      38                 :            : (define_constraint "V"
      39                 :            :   "Matches a non-offsettable memory reference."
      40                 :            :   (and (match_code "mem")
      41                 :          0 :        (match_test "memory_address_addr_space_p (GET_MODE (op), XEXP (op, 0),
      42                 :          0 :                                                  MEM_ADDR_SPACE (op))")
      43                 :          0 :        (not (match_test "offsettable_nonstrict_memref_p (op)"))))
      44                 :            : 
      45                 :            : ;; Like "V", this is not a memory constraint, since reloading the address
      46                 :   39937500 : ;; into a base register would cause it not to match.
      47                 :            : (define_constraint "<"
      48                 :   39937500 :   "Matches a pre-dec or post-dec operand."
      49                 :            :   (and (match_code "mem")
      50                 :   39937500 :        (ior (match_test "GET_CODE (XEXP (op, 0)) == PRE_DEC")
      51                 :   39937500 :             (match_test "GET_CODE (XEXP (op, 0)) == POST_DEC"))))
      52                 :            : 
      53                 :            : ;; See the comment for "<".
      54                 :    5104160 : (define_constraint ">"
      55                 :            :   "Matches a pre-inc or post-inc operand."
      56                 :    5104160 :   (and (match_code "mem")
      57                 :    5104160 :        (ior (match_test "GET_CODE (XEXP (op, 0)) == PRE_INC")
      58                 :    5104160 :             (match_test "GET_CODE (XEXP (op, 0)) == POST_INC"))))
      59                 :            : 
      60                 :            : (define_address_constraint "p"
      61                 :       4388 :   "Matches a general address."
      62                 :       8776 :   (match_test "address_operand (op, VOIDmode)"))
      63                 :       4388 : 
      64                 :            : (define_constraint "i"
      65                 :  144098000 :   "Matches a general integer constant."
      66                 :  201808000 :   (and (match_test "CONSTANT_P (op)")
      67                 :  144098000 :        (match_test "!flag_pic || LEGITIMATE_PIC_OPERAND_P (op)")))
      68                 :            : 
      69                 :            : (define_constraint "s"
      70                 :        452 :   "Matches a symbolic integer constant."
      71                 :        904 :   (and (match_test "CONSTANT_P (op)")
      72                 :        452 :        (match_test "!CONST_SCALAR_INT_P (op)")
      73                 :        452 :        (match_test "!flag_pic || LEGITIMATE_PIC_OPERAND_P (op)")))
      74                 :            : 
      75                 :            : (define_constraint "n"
      76                 :   49145100 :   "Matches a non-symbolic integer constant."
      77                 :   74468900 :   (and (match_test "CONST_SCALAR_INT_P (op)")
      78                 :   49145100 :        (match_test "!flag_pic || LEGITIMATE_PIC_OPERAND_P (op)")))
      79                 :            : 
      80                 :            : (define_constraint "E"
      81                 :          0 :   "Matches a floating-point constant."
      82                 :          0 :   (ior (match_test "CONST_DOUBLE_AS_FLOAT_P (op)")
      83                 :          0 :        (match_test "GET_CODE (op) == CONST_VECTOR
      84                 :          0 :                     && GET_MODE_CLASS (GET_MODE (op)) == MODE_VECTOR_FLOAT")))
      85                 :            : 
      86                 :            : ;; There is no longer a distinction between "E" and "F".
      87                 :   54403000 : (define_constraint "F"
      88                 :            :   "Matches a floating-point constant."
      89                 :   54403000 :   (ior (match_test "CONST_DOUBLE_AS_FLOAT_P (op)")
      90                 :            :        (match_test "GET_CODE (op) == CONST_VECTOR
      91                 :          0 :                     && GET_MODE_CLASS (GET_MODE (op)) == MODE_VECTOR_FLOAT")))
      92                 :            : 
      93                 :            : (define_constraint "X"
      94                 :     857059 :   "Matches anything."
      95                 :     857059 :   (match_test "true"))

Generated by: LCOV version 1.0

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 --enable-host-shared. GCC test suite is run with the built compiler.