public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC porting questions
@ 2010-06-10 17:21 Radu Hobincu
  2010-06-10 18:06 ` Ian Lance Taylor
  0 siblings, 1 reply; 11+ messages in thread
From: Radu Hobincu @ 2010-06-10 17:21 UTC (permalink / raw)
  To: gcc; +Cc: Petronela Agache

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-06-19 12:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-10 17:21 GCC porting questions Radu Hobincu
2010-06-10 18:06 ` Ian Lance Taylor
2010-06-11 14:59   ` Radu Hobincu
2010-06-11 16:37     ` Ian Lance Taylor
2010-06-17 22:56       ` Radu Hobincu
2010-06-18  6:38         ` Ian Lance Taylor
2010-06-18  9:42           ` Radu Hobincu
2010-06-18 15:36             ` Manuel López-Ibáñez
2010-06-18 22:31               ` GCC plugin support when using Ada PeteGarbett
2010-06-19 22:44                 ` Richard Guenther
2010-06-20  6:18                 ` Duncan Sands

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).