> From: Ian Lance Taylor <ian@airs.com> >> Paul Schlie <[EMAIL PROTECTED]> writes: >> Does GCC truley need to identify/treat condition state registers uniquely >> from any other value produced as a result of a calculation? > > No, it doesn't. The change I am proposing removes the unique handling > of condition state registers, and treats them like other registers. > The unique handling of condition state registers is historical, and > arose because of the characteristics of the initial gcc targets (e.g., > vax, m68k). > > The idea to do this is not mine; for more background see the > discussion of cc0 here: > http://gcc.gnu.org/wiki/general%20backend%20cleanup
Thank you. After reviewing that reference, a question comes to mind: Is there any convenient way to reference the newly set register by an instruction, as opposed to otherwise needing to redundantly re-specify the operation producing it's value again? Thereby enabling something like: (insn xxx [(set (reg: A) (xxx: (reg: B) (reg: C))) (set (reg: CC) (newly-set-reg: A)) ....) (insn branch-equal (set (pc) (if_then_else (ge: CC 0) (label_ref 23) (pc))) ...) Thereby enabling an xxx instruction to specify the CC register value being virtually assigned the result of the instruction's operation (i.e. no code will actually be generated for assignments to the CC register), upon which an independently specified conditional branch may be defined to be dependant upon it (the virtual CC register). Which would seem to be a simple way to closely approximate the semantics of a global cc-state register?