IPv4 checksum oddness (gcc compiler bug?)

Mike Bristow mike at urgle.com
Wed Aug 25 04:12:24 PDT 2004


On Wed, 2004-08-25 at 00:57, Li, Qing wrote:
> 	I ran into a checksum problem and filed the following bug
> report.
> 	See if it's related.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=69257

To quote from Apple's GCC 3.3 docs:

 You can't expect a sequence of volatile asm instructions to remain
 perfectly consecutive. If you want consecutive output, use a single
 asm.  Also, GCC will perform some optimizations across a volatile asm
 instruction; GCC does not "forget everything" when it encounters a
 volatile asm instruction the way some other compilers do.

I've added a patch to the PR above which uses a single asm statement;
I'll make some noise about it post 5.3.

-- 
Mike Bristow - http://www.urgle.com/~mike/ - mike at urgle.com
Why did the farmer call his horse Blacksmith?
Mrs Sippi


More information about the freebsd-current mailing list