This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Dummy questions on GCC internals - 2
- From: "Alexander Aganichev" <aaganichev at yandex dot ru>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 22 May 2003 18:31:52 +0400 (MSD)
- Subject: Dummy questions on GCC internals - 2
- Reply-to: aaganichev at yandex dot ru
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