X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firmode.h;h=7f55e3ce711c4325d5c357b9d4d38ab8ab5c1ded;hb=fa9c992b5f23e7a059ac91fdd04b409b951ebcc4;hp=d1b4e88c66db42f690c9fc2c690f182c98d621dd;hpb=1e7ccff032250868e233a0e9c843ba0be9c763fa;p=libfirm diff --git a/include/libfirm/irmode.h b/include/libfirm/irmode.h index d1b4e88c6..7f55e3ce7 100644 --- a/include/libfirm/irmode.h +++ b/include/libfirm/irmode.h @@ -407,10 +407,26 @@ int mode_is_float_vector (const ir_mode *mode); int mode_is_int_vector (const ir_mode *mode); /*@}*/ -/** Returns true if sm can be converted to lm without loss - according to firm definition */ +/** + * Returns true if sm can be converted to lm without loss + * according to firm definition. + * + * Note that mode_Iu is NOT smaller than mode_Is here. + * + * @see values_in_mode() + */ int smaller_mode(const ir_mode *sm, const ir_mode *lm); +/** + * Returns true if a value of mode sm can be converted into mode lm + * and backwards without loss. + * + * Note that mode_Iu values CAN be converted in mode_Is and back. + * + * @see smaller_mode() + */ +int values_in_mode(const ir_mode *sm, const ir_mode *lm); + /** * Returns a matching unsigned mode for a given integer signed mode. * Returns NULL if no matching mode exists.