Dummy questions on GCC internals - 2
Alexander Aganichev
aaganichev@yandex.ru
Thu May 22 14:38:00 GMT 2003
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
More information about the Gcc
mailing list