public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Dummy questions on GCC internals - 2
@ 2003-05-22 14:38 Alexander Aganichev
  0 siblings, 0 replies; only message in thread
From: Alexander Aganichev @ 2003-05-22 14:38 UTC (permalink / raw)
  To: gcc

I have more questions now :-)

Is there a chance to determine if compare arguments are treated
as signed or unsigned? Z80 have very weak support for the signed
arithmetic, so I'd like to omit extra tests when unsigned
arithmetic is in use.

One of the ideas I'm cosidering is to use the method suggested
as the project for beginners on GCC homepage, where:

(insn ### {cmpsi} (set (cc0) (compare (reg:SI A) (reg:SI B))))
(insn ### {bgt} (set (pc) (if_then_else
                        (gt (cc0) (const_int 0))
                        (label_ref 23)
                        (pc)))

becomes

(insn ### {bsicc} (set (pc) (if_then_else
                        (gt:SI (reg:SI A) (reg:SI B))
                        (label_ref 23)
                        (bc)))

But how can I find out how many such instructions need to be created?
I also think that this should be extended somehow on all instructions
that affect condition code in predictable manner. But in that case
will I need the regular branch, compare and test instructions to be
defined (I'd say no)?

--
Alexander Aganichev

url: http://aaganichev.narod.ru
e-mail: aaganichev@yandex.ru
gsm: +7-095-786-1339

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-22 14:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-22 14:38 Dummy questions on GCC internals - 2 Alexander Aganichev

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).