Ambiguity in "and" expression in Machine Descriptions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

We were going through the ARM machine descriptions and came across a pattern
where the "and" has 3 children while the x86 machine descriptions contain
patterns in which "and" has 2 children. Even the GCC Internals
document specifies
that "and" has 2 children.

Can anyone help us with respect to whether "and" having 3 children is correct ?

This example from arm.md contains and have 2 as well as 3 children.
Show in bold.
(define_attr "arch_enabled" "no,yes"
  (cond [(eq_attr "arch" "any")
     (const_string "yes")

     (and (eq_attr "arch" "a")
          (match_test "TARGET_ARM"))
     (const_string "yes")

     (and (eq_attr "arch" "t")
          (match_test "TARGET_THUMB"))
     (const_string "yes")

     (and (eq_attr "arch" "t1")
          (match_test "TARGET_THUMB1"))
     (const_string "yes")

     (and (eq_attr "arch" "t2")
          (match_test "TARGET_THUMB2"))
     (const_string "yes")

     (and (eq_attr "arch" "32")
          (match_test "TARGET_32BIT"))
     (const_string "yes")

     (and (eq_attr "arch" "v6")
          (match_test "TARGET_32BIT && arm_arch6"))
     (const_string "yes")

     (and (eq_attr "arch" "nov6")
          (match_test "TARGET_32BIT && !arm_arch6"))
     (const_string "yes")

     (and (eq_attr "arch" "onlya8")
          (eq_attr "tune" "cortexa8"))
     (const_string "yes")

     (and (eq_attr "arch" "neon_onlya8")
          (eq_attr "tune" "cortexa8")
          (match_test "TARGET_NEON"))
     (const_string "yes")

     (and (eq_attr "arch" "nota8")
          (not (eq_attr "tune" "cortexa8")))
     (const_string "yes")

     (and (eq_attr "arch" "neon_nota8")
          (not (eq_attr "tune" "cortexa8"))
          (match_test "TARGET_NEON"))
     (const_string "yes")

     (and (eq_attr "arch" "iwmmxt2")
          (match_test "TARGET_REALLY_IWMMXT2"))
     (const_string "yes")]

    (const_string "no")))

------------
Thank You,
Aniket Deole




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux