This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: internal compiler error in elim_reg_cond


Am 10.06.2010 um 15:27 schrieb Ian Lance Taylor:

> Boris Boesler <baembel@gmx.de> writes:
> 
>> I get an internal compiler error with gcc-4.2.1 and my own back-end
>> when I support conditional execution:
>> 
>> ../build/gcc/cc1 -Wall -O1 -o bug.O1.s bug.c
>> 
>> bug.c: In function ‘cond_assign_les0’:
>> bug.c:13: internal compiler error: in elim_reg_cond, at flow.c:3486
> 
> What is 'x' when that error occurs?  From a quick glance at the code
> that can only happen if your backend has somehow built a conditional
> with a component which is not a conditional.

 I don't really know what 'x' is (but its code is 0/UnKnown); it's generated
by GCC from my conditional execution specification, which I derived from the
manual and the ARM backend:

;;
(define_attr "predicable" "no,yes" (const_string "no"))

;; True if this operator is valid for predication.
(define_special_predicate "predicate_operator"
  ;; fails in tests (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu")
  (match_code "eq,ne") ;; works
  ;; fails in tests (match_code "le")
)

(define_cond_exec
  [(match_operator 0 "predicate_operator"
		   [(match_operand 1 "cc_register" "")
		   (const_int 0)])]
  " ! TARGET_DONT_USE_CONDITIONAL_EXECUTION "
;; this sets a C string, that will be emitted in instructions by %?
  "%J0"
)

(define_insn "addsi3_mem"
  [(set (match_operand:SI 0          "memory_operand"    "=m")
	(plus:SI (match_operand:SI 1 "memory_operand"    "%m")
		 (match_operand:SI 2 "immediate_operand" " i")))
   ]
  ""
  "ADDI%?\t%0, %1, %2"
  [(set_attr "length"      "4")
   (set_attr "predicable"  "yes")
   ]
)

 This works for the predicate operators "eq,ne". Is there anything
wrong with it? Maybe the ARM backend does something that I haven't seen.


> Note that all this code is gone in current gcc.  It was removed in gcc
> 4.3, replaced by the data flow framework.

 Ok, then I will try to move to gcc 4.3

Boris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]