<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I think hand.c is worth shrinking.<BR>
  And converting where easy to Modula-3.<BR>
Agreed?<BR>
It is "exercise" at least -- learn and get comfortable making changes, as long as they don't make anything worse.<BR>
 <BR>
 <BR>
With that in mind, any hints on this:<BR>
 <BR>
 <BR>
void set_singleton(size_t a, size_t* s)<BR>{<BR>  size_t a_word = a / SET_GRAIN;<BR>  size_t a_bit  = a % SET_GRAIN;<BR>  s[a_word] |= (1UL << a_bit);<BR>}<BR><BR>
 <BR>
Leave it alone? It works, not worth changing?<BR>
Deal with it in m3front?<BR>
In parse.c?<BR>
 <BR>
 <BR>
I changed m3back to generate a bts instruction, which achieves "all four" operations in one instruction -- div (shift), mod (and), shift, or. The semantic mapping seems to be 100%. If set_singleton were a common operation, which I doubt, it seems like a major gain.<BR>
 <BR>
 <BR>
 - Jay<BR>                                     </body>
</html>