|
From: Julian S. <js...@ac...> - 2014-07-22 16:21:38
|
> const IROp ops[] // let the compiler figure out # elements
> = { Iop_INVALID, Iop_QDMulHi16Sx8, Iop_QDMulHi32Sx4, Iop_INVALID };
> vassert(size < sizeof ops);
That's neater. Although .. shouldn't that be:
size < sizeof(ops)/sizeof(ops[0]) ?
> I also noticed that at the call site a return value of Iop_INVALID would
> cause an IRExpr of that kind to be created which would cause some
> indigestion downstream. Perhaps that value should not be returned here ?
The IR sanity checker would eventually jump on it. But in fact that
wouldn't happen because the call sites are very careful to only call
with valid size values, in this case 1 or 2. So there are two levels
of protection.
J
|