Patch to create builtin bzero
Richard Henderson
rth@cygnus.com
Wed Mar 22 15:48:00 GMT 2000
On Wed, Mar 22, 2000 at 11:36:10AM -0500, Kaveh R. Ghazi wrote:
> + /* Insert a zero parameter to convert bzero(x,y) -> memset(x,0,y). */
> + TREE_CHAIN (val) = TREE_CHAIN (arglist);
> + TREE_CHAIN (arglist) = val;
> + result = expand_builtin_memset(exp);
> +
> + /* If the above call fails, delete the zero parameter. */
> + if (result == 0)
> + TREE_CHAIN (arglist) = TREE_CHAIN (TREE_CHAIN (arglist));
> + return result;
I'm pretty sure the C++ front end would be mighty unhappy
with you modifying their trees. Just build a new chain with
the same TREE_VALUE contents. Then you don't have to worry
about undoing it either.
r~
More information about the Gcc-patches
mailing list