Re: Build 32 bit binaries on amd64

2012-08-22 Thread Dan McGregor
I can't speak for Tijl, but being able to build anything simply by passing -m32 to the compiler is my goal. Did your Intel EFI work involve #defining _KERNEL anywhere? On 22 August 2012 16:04, Eric McCorkle wrote: > I ran into some bugs compiling things with -m32 in the intel EFI work. As > th

Re: Build 32 bit binaries on amd64

2012-08-22 Thread Dan McGregor
On 22 August 2012 14:09, Tijl Coosemans wrote: > On 21-08-2012 17:04, Dan McGregor wrote: >> My solution is certainly fairly hacky, I just took inspiration from >> NetBSD. I wanted to see if it could be done. While I was there I did >> identify several files that should be common between i386 and

Re: Replace bcopy() to update ether_addr

2012-08-22 Thread Luigi Rizzo
On Wed, Aug 22, 2012 at 03:21:06PM -0400, John Baldwin wrote: > On Wednesday, August 22, 2012 2:54:07 pm Adrian Chadd wrote: > > On 22 August 2012 05:02, John Baldwin wrote: > > > On Tuesday, August 21, 2012 12:34:42 pm Adrian Chadd wrote: > > >> Hi, > > >> > > >> What about just creating an ETHER

Re: Replace bcopy() to update ether_addr

2012-08-22 Thread Wojciech Puchar
but wonder whether the same does hold for MIPS/ARM. Getting it wrong there will lead to some very very poor performing code. 1) do - as already pointed out - standard copy of structure in C. 2) if compiler is found to generate bad code on some archs put assembly. 1 even if compiler is not smart

Re: Build 32 bit binaries on amd64

2012-08-22 Thread Tijl Coosemans
On 21-08-2012 17:04, Dan McGregor wrote: > My solution is certainly fairly hacky, I just took inspiration from > NetBSD. I wanted to see if it could be done. While I was there I did > identify several files that should be common between i386 and amd64, > such as exec.h. > > Since reading your em

Re: Replace bcopy() to update ether_addr

2012-08-22 Thread John Baldwin
On Wednesday, August 22, 2012 2:54:07 pm Adrian Chadd wrote: > On 22 August 2012 05:02, John Baldwin wrote: > > On Tuesday, August 21, 2012 12:34:42 pm Adrian Chadd wrote: > >> Hi, > >> > >> What about just creating an ETHER_ADDR_COPY(dst, src) and putting that > >> in a relevant include file, the

Re: Replace bcopy() to update ether_addr

2012-08-22 Thread Warner Losh
On Aug 22, 2012, at 12:54 PM, Adrian Chadd wrote: > On 22 August 2012 05:02, John Baldwin wrote: >> On Tuesday, August 21, 2012 12:34:42 pm Adrian Chadd wrote: >>> Hi, >>> >>> What about just creating an ETHER_ADDR_COPY(dst, src) and putting that >>> in a relevant include file, then hide the ug

Re: Replace bcopy() to update ether_addr

2012-08-22 Thread Adrian Chadd
On 22 August 2012 05:02, John Baldwin wrote: > On Tuesday, August 21, 2012 12:34:42 pm Adrian Chadd wrote: >> Hi, >> >> What about just creating an ETHER_ADDR_COPY(dst, src) and putting that >> in a relevant include file, then hide the ugliness there? >> >> The same benefits will likely appear whe

Re: Build 32 bit binaries on amd64

2012-08-22 Thread Warner Losh
On Aug 21, 2012, at 10:34 AM, Nathan Whitehorn wrote: > On 08/21/12 08:44, John Baldwin wrote: >> On Tuesday, August 21, 2012 4:49:30 am Konstantin Belousov wrote: >>> On Mon, Aug 20, 2012 at 08:32:41PM -0600, Dan McGregor wrote: Hi. I've been working on porting compiler-rt/clang'

Re: speed tests (Re: Replace bcopy() to update ether_addr)

2012-08-22 Thread Mitya
22.08.2012 17:36, Luigi Rizzo написал: On Wed, Aug 22, 2012 at 02:32:21AM +, Bruce Evans wrote: luigi wrote: even more orthogonal: I found that copying 8n + (5, 6 or 7) bytes was much much slower than copying a multiple of 8 bytes. For n=0, 1,2,4,8 bytes are efficient, other cases are slo

Re: speed tests (Re: Replace bcopy() to update ether_addr)

2012-08-22 Thread Luigi Rizzo
On Wed, Aug 22, 2012 at 05:26:47PM +0300, Mitya wrote: > 22.08.2012 17:36, Luigi Rizzo ??: > >On Wed, Aug 22, 2012 at 02:32:21AM +, Bruce Evans wrote: > >>luigi wrote: > >> > >>>even more orthogonal: > >>> > >>>I found that copying 8n + (5, 6 or 7) bytes was much much slower than >

speed tests (Re: Replace bcopy() to update ether_addr)

2012-08-22 Thread Luigi Rizzo
On Wed, Aug 22, 2012 at 02:32:21AM +, Bruce Evans wrote: > luigi wrote: > > > even more orthogonal: > > > > I found that copying 8n + (5, 6 or 7) bytes was much much slower than > > copying a multiple of 8 bytes. For n=0, 1,2,4,8 bytes are efficient, > > other cases are slow (turned into 2 or

Re: Replace bcopy() to update ether_addr

2012-08-22 Thread Warner Losh
On Aug 22, 2012, at 6:02 AM, John Baldwin wrote: > On Tuesday, August 21, 2012 12:34:42 pm Adrian Chadd wrote: >> Hi, >> >> What about just creating an ETHER_ADDR_COPY(dst, src) and putting that >> in a relevant include file, then hide the ugliness there? >> >> The same benefits will likely app

Re: Replace bcopy() to update ether_addr

2012-08-22 Thread John Baldwin
On Tuesday, August 21, 2012 12:34:42 pm Adrian Chadd wrote: > Hi, > > What about just creating an ETHER_ADDR_COPY(dst, src) and putting that > in a relevant include file, then hide the ugliness there? > > The same benefits will likely appear when copying wifi MAC addresses > to/from headers. > >

Re: projects/armv6 merged to HEAD

2012-08-22 Thread Bob Bishop
On 22 Aug 2012, at 04:17, George Neville-Neil wrote: > > On Aug 17, 2012, at 05:24 , Robert Watson wrote: > >> >> On Thu, 16 Aug 2012, Oleksandr Tymoshenko wrote: >> >>> projects/armv6 branch was merged to HEAD and should be considered dead now. >>> This patch is a result of a joint effort b

Re: Replace bcopy() to update ether_addr

2012-08-22 Thread Bruce Evans
mitya wrote: > 22.08.2012 05:07, Bruce Evans íàïèñàë: > >> On Mon, Aug 20, 2012 at 05:46:12PM +0300, Mitya wrote: > >>> Hi. > >>> I found some overhead code in /src/sys/net/if_ethersubr.c and > >>> /src/sys/netgraph/ng_ether.c > >>> > >>> It contains strings, like bcopy(src, dst, ETHER_ADDR_LEN);