Hello again, I have written here a few weeks ago regarding some tutorials on GCC porting and got some very interesting replies. However, I seem to have gotten stuck with a couple of issues in spite of my massive Googling, and I was wondering if anyone could spare a couple of minutes for some clarifications.
I am having troubles with the condition codes (cc_status). I have looked over a couple of architectures and I do not seem to understand how they work. The machine I am porting GCC for has 1 4bit status register for carry, zero, less than and equal. I do not have explicit comparison instructions, all of the ALU instructions modify one or more flags. What I figured out so far looking over AVR and Cris machine descriptions is that each instruction that modifies the flags contain an attr declaration which specify what flags it is changing. Also, there is a macro called NOTICE_UPDATE_CC which sets up the cc_status accordingly by reading this attr. This is the part of the code I do not understand. There are certain functions for which I could not find any descriptions, like "single_set" and macros like "SET_DEST" and "SET_SRC". Also, looking over conditions.h, I see that the CC_STATUS structure contains 2 rtx fields: "value1" and "value2", and also an int called "flags". What do they represent? Is "flags" the contents of the machine's flag register? Thanks in advance, Radu