[kaffe] mipsel and jit3

Mikolaj Habryn dichro at rcpt.to
Fri Oct 15 01:38:08 PDT 2004


On Thu, 2004-10-14 at 23:16, Stuart Ballard wrote:
> I'm far from a C expert, but could the count parameter be removed and 
> replaced with sizeof(var) to simplify things a little?

You're absolutely right, but typeof(var) is being derived from count in
the first place, and it makes me a little nervous to then re-derive it
the other way. *shrug* No particular reason for it.

You could probably keep count all the way through and do something like:

#define _mjh_OUT(v, count) { u_int ## count ## _t _dummy = (v); \
memcpy(..., count / 8);

if you pass it in as bits. TMTOWTDI. Not sure if it makes a great deal
of difference in practical terms, to be honest. The macro is only called
from the lines directly below it.

> Also, would it make sense to call the parameter "type" instead of "var"? 
> It took me a little while to figure out that that's what it was, but 
> maybe it's clear to someone who spends more time in C code than I do.

It probably would, yes.

m.




More information about the kaffe mailing list