[M3devel] hand.c : m3_div

Tony Hosking hosking at cs.purdue.edu
Wed Feb 17 15:52:17 CET 2010


Yes, I've wondered that for some time, but never been certain what code they produce....

There's no way to generate the ones we would want from C.

Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484




On 17 Feb 2010, at 06:07, Jay K wrote:

> Tony, presumably one of these will do:
>  
>  
> C:\dev2\cm3.2\m3-sys\m3cc\gcc\gcc\tree.def
>  
> /* Division for integer result that rounds the quotient toward zero.  */
> DEFTREECODE (TRUNC_DIV_EXPR, "trunc_div_expr", tcc_binary, 2)
>  
> /* Division for integer result that rounds the quotient toward infinity.  */
> DEFTREECODE (CEIL_DIV_EXPR, "ceil_div_expr", tcc_binary, 2)
>  
> /* Division for integer result that rounds toward minus infinity.  */
> DEFTREECODE (FLOOR_DIV_EXPR, "floor_div_expr", tcc_binary, 2)
>  
> /* Division for integer result that rounds toward nearest integer.  */
> DEFTREECODE (ROUND_DIV_EXPR, "round_div_expr", tcc_binary, 2)
>  
> /* Four kinds of remainder that go with the four kinds of division.  */
> 
> DEFTREECODE (TRUNC_MOD_EXPR, "trunc_mod_expr", tcc_binary, 2)
> DEFTREECODE (CEIL_MOD_EXPR, "ceil_mod_expr", tcc_binary, 2)
> DEFTREECODE (FLOOR_MOD_EXPR, "floor_mod_expr", tcc_binary, 2)
> DEFTREECODE (ROUND_MOD_EXPR, "round_mod_expr", tcc_binary, 2)
> 
> 
> I can look into it.
> 
>  - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100217/cadb85ef/attachment-0002.html>


More information about the M3devel mailing list