Re: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-07 Thread Paolo Bonzini
The only thing that would avoid this is to either tell the compiler to never put esi/edi in memory (which I think is not possibly across different versions of gcc) or to always generate a single asm section for all the different cases. Use __asm__ ("%esi") and __asm__ ("%edi"). It is not

Re: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-07 Thread Paolo Bonzini
The only thing that would avoid this is to either tell the compiler to never put esi/edi in memory (which I think is not possibly across different versions of gcc) or to always generate a single asm section for all the different cases. Use __asm__ (%esi) and __asm__ (%edi). It is not guaranteed

Re: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Denis Vlasenko
On Tuesday 05 April 2005 19:34, Christophe Saout wrote: > the new i386 memcpy macro is a ticking timebomb. > > I've been debugging a new mISDN crash, just to find out that a memcpy > was not inlined correctly. > > Andrew, you should drop the fix-i386-memcpy.patch (or have it fixed). Updated

Re: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Denis Vlasenko
On Wednesday 06 April 2005 16:18, Richard B. Johnson wrote: > > Attached is inline ix86 memcpy() plus test code that tests its > corner-cases. The in-line code makes no jumps, but uses longword > copies, word copies and any spare byte copy. It works at all > offsets, doesn't require alignment but

RE: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Richard B. Johnson
Attached is inline ix86 memcpy() plus test code that tests its corner-cases. The in-line code makes no jumps, but uses longword copies, word copies and any spare byte copy. It works at all offsets, doesn't require alignment but would work fastest if both source and destination were longword

Re: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Andrew Haley
I'm having a little difficulty understanding what this is for. Is it that gcc's builtin memcpy expander generates bad code, or that older versions of gcc generate bad code, or what? gcc generates too much code? Andrew. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

RE: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Dave Korn
Original Message >From: Dave Korn >Sent: 06 April 2005 12:53 > Original Message >> From: Dave Korn >> Sent: 06 April 2005 12:13 > >> Original Message >>> From: Dave Korn >>> Sent: 06 April 2005 12:06 >> >> >> Me and my big mouth. >> >> OK, that one does work. >>

Re: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Christophe Saout
Am Mittwoch, den 06.04.2005, 13:14 +0300 schrieb Denis Vlasenko: > Oh shit. I was trying to be too clever. I still run with this patch, > so it must be happening very rarely. Yes, that's right, it happened with code that's not in the mainline tree but could have happened anywhere. > Does this

RE: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Dave Korn
Original Message >From: Dave Korn >Sent: 06 April 2005 12:13 > Original Message >> From: Dave Korn >> Sent: 06 April 2005 12:06 > > > Me and my big mouth. > > OK, that one does work. > > Sorry for the outburst. > well, actually, maybe it doesn't after all.

RE: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Dave Korn
Original Message >From: Dave Korn >Sent: 06 April 2005 12:06 Me and my big mouth. OK, that one does work. Sorry for the outburst. cheers, DaveK -- Can't think of a witty .sigline today - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

RE: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Dave Korn
Original Message >From: Denis Vlasenko >Sent: 06 April 2005 11:14 Is this someone's idea of an April Fool's joke? Because if it is, I've suffered a serious sense-of-humour failure. > Oh shit. I was trying to be too clever. I still run with this patch, > so it must be happening very

Re: [BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-06 Thread Denis Vlasenko
On Tuesday 05 April 2005 19:34, Christophe Saout wrote: > Hi Denis, > > the new i386 memcpy macro is a ticking timebomb. > > I've been debugging a new mISDN crash, just to find out that a memcpy > was not inlined correctly. > > Andrew, you should drop the fix-i386-memcpy.patch (or have it

Re: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Denis Vlasenko
On Tuesday 05 April 2005 19:34, Christophe Saout wrote: Hi Denis, the new i386 memcpy macro is a ticking timebomb. I've been debugging a new mISDN crash, just to find out that a memcpy was not inlined correctly. Andrew, you should drop the fix-i386-memcpy.patch (or have it fixed).

RE: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Dave Korn
Original Message From: Denis Vlasenko Sent: 06 April 2005 11:14 Is this someone's idea of an April Fool's joke? Because if it is, I've suffered a serious sense-of-humour failure. Oh shit. I was trying to be too clever. I still run with this patch, so it must be happening very

RE: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Dave Korn
Original Message From: Dave Korn Sent: 06 April 2005 12:06 Me and my big mouth. OK, that one does work. Sorry for the outburst. cheers, DaveK -- Can't think of a witty .sigline today - To unsubscribe from this list: send the line unsubscribe linux-kernel in the

RE: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Dave Korn
Original Message From: Dave Korn Sent: 06 April 2005 12:13 Original Message From: Dave Korn Sent: 06 April 2005 12:06 Me and my big mouth. OK, that one does work. Sorry for the outburst. well, actually, maybe it doesn't after all. What's that

RE: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Dave Korn
Original Message From: Dave Korn Sent: 06 April 2005 12:53 Original Message From: Dave Korn Sent: 06 April 2005 12:13 Original Message From: Dave Korn Sent: 06 April 2005 12:06 Me and my big mouth. OK, that one does work. Sorry for the outburst.

Re: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Christophe Saout
Am Mittwoch, den 06.04.2005, 13:14 +0300 schrieb Denis Vlasenko: Oh shit. I was trying to be too clever. I still run with this patch, so it must be happening very rarely. Yes, that's right, it happened with code that's not in the mainline tree but could have happened anywhere. Does this one

Re: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Andrew Haley
I'm having a little difficulty understanding what this is for. Is it that gcc's builtin memcpy expander generates bad code, or that older versions of gcc generate bad code, or what? gcc generates too much code? Andrew. - To unsubscribe from this list: send the line unsubscribe linux-kernel in

RE: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Richard B. Johnson
Attached is inline ix86 memcpy() plus test code that tests its corner-cases. The in-line code makes no jumps, but uses longword copies, word copies and any spare byte copy. It works at all offsets, doesn't require alignment but would work fastest if both source and destination were longword

Re: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Denis Vlasenko
On Wednesday 06 April 2005 16:18, Richard B. Johnson wrote: Attached is inline ix86 memcpy() plus test code that tests its corner-cases. The in-line code makes no jumps, but uses longword copies, word copies and any spare byte copy. It works at all offsets, doesn't require alignment but

Re: [BUG mm] fixed i386 memcpy inlining buggy

2005-04-06 Thread Denis Vlasenko
On Tuesday 05 April 2005 19:34, Christophe Saout wrote: the new i386 memcpy macro is a ticking timebomb. I've been debugging a new mISDN crash, just to find out that a memcpy was not inlined correctly. Andrew, you should drop the fix-i386-memcpy.patch (or have it fixed). Updated patch

[BUG mm] "fixed" i386 memcpy inlining buggy

2005-04-05 Thread Christophe Saout
Hi Denis, the new i386 memcpy macro is a ticking timebomb. I've been debugging a new mISDN crash, just to find out that a memcpy was not inlined correctly. Andrew, you should drop the fix-i386-memcpy.patch (or have it fixed). This source code: mISDN_pid_t pid; [...]

[BUG mm] fixed i386 memcpy inlining buggy

2005-04-05 Thread Christophe Saout
Hi Denis, the new i386 memcpy macro is a ticking timebomb. I've been debugging a new mISDN crash, just to find out that a memcpy was not inlined correctly. Andrew, you should drop the fix-i386-memcpy.patch (or have it fixed). This source code: mISDN_pid_t pid; [...]