Re: Tell gcc I have a i686

2002-01-07 Thread John Baldwin
On 06-Jan-02 Stephen Montgomery-Smith wrote: Matthew D. Fuller wrote: On Fri, Jan 04, 2002 at 12:02:03PM -0600 I heard the voice of Stephen Montgomery-Smith, and lo! it spake thus: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code.

Re: Tell gcc I have a i686

2002-01-07 Thread Stephen Montgomery-Smith
John Baldwin wrote: You know, I have no idea. It is someone elses code. These are the instructions. Can anyone tell me? movl 32(%0),%1\n adcl %1,32(%0)\n Also, from this discussion, what I have decided to do is provide it as an option for the

Re: Tell gcc I have a i686

2002-01-07 Thread John Baldwin
On 07-Jan-02 Stephen Montgomery-Smith wrote: John Baldwin wrote: You know, I have no idea. It is someone elses code. These are the instructions. Can anyone tell me? movl 32(%0),%1\n adcl %1,32(%0)\n Also, from this discussion, what I have

Re: Tell gcc I have a i686

2002-01-07 Thread Stephen Montgomery-Smith
John Baldwin wrote: On 07-Jan-02 Stephen Montgomery-Smith wrote: John Baldwin wrote: You know, I have no idea. It is someone elses code. These are the instructions. Can anyone tell me? movl 32(%0),%1\n adcl %1,32(%0)\n Also, from this

Re: Tell gcc I have a i686

2002-01-07 Thread John Baldwin
On 07-Jan-02 Stephen Montgomery-Smith wrote: John Baldwin wrote: On 07-Jan-02 Stephen Montgomery-Smith wrote: John Baldwin wrote: You know, I have no idea. It is someone elses code. These are the instructions. Can anyone tell me? movl 32(%0),%1\n

Re: Tell gcc I have a i686

2002-01-07 Thread John Baldwin
On 07-Jan-02 John Baldwin wrote: Ok. This isn't 686 specific at all. However, one optimization might be to get rid of the xorl, and use 'addl' for the first instruction instead of adcl. Anyways, If I were you, I would do it via a series of rcl (rotate through carry left, it shits in the

Re: Tell gcc I have a i686

2002-01-07 Thread Ian
On Fri, Jan 04, 2002 at 12:02:03PM -0600 I heard the voice of Stephen Montgomery-Smith, and lo! it spake thus: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are compiling on a i686? [lots of

Re: Tell gcc I have a i686

2002-01-05 Thread Matthew D. Fuller
On Fri, Jan 04, 2002 at 12:02:03PM -0600 I heard the voice of Stephen Montgomery-Smith, and lo! it spake thus: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are compiling on a i686? Dunno, how

Re: Tell gcc I have a i686

2002-01-05 Thread Stephen Montgomery-Smith
Matthew D. Fuller wrote: On Fri, Jan 04, 2002 at 12:02:03PM -0600 I heard the voice of Stephen Montgomery-Smith, and lo! it spake thus: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are

Tell gcc I have a i686

2002-01-04 Thread Stephen Montgomery-Smith
I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are compiling on a i686? For Linux, I can do something like this (for gnu-make) Arch = $(shell arch) cc .. -DArch . and inside the program

Re: Tell gcc I have a i686

2002-01-04 Thread Alfred Perlstein
* Stephen Montgomery-Smith [EMAIL PROTECTED] [020104 12:02] wrote: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are compiling on a i686? For Linux, I can do something like this (for gnu-make)

Re: Tell gcc I have a i686

2002-01-04 Thread Stephen Montgomery-Smith
Alfred Perlstein wrote: * Stephen Montgomery-Smith [EMAIL PROTECTED] [020104 12:02] wrote: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are compiling on a i686? For Linux, I can do

Re: Tell gcc I have a i686

2002-01-04 Thread Oliver Fromme
Stephen Montgomery-Smith [EMAIL PROTECTED] wrote: What I want is a makefile that automatically detects whether it is on an i686 or not (not for me to tell it so). In general, that's not a good idea, IMO. It should be up to the user to decide which optimizations he wants and which not, and

Re: Tell gcc I have a i686

2002-01-04 Thread John Baldwin
On 04-Jan-02 Stephen Montgomery-Smith wrote: Alfred Perlstein wrote: * Stephen Montgomery-Smith [EMAIL PROTECTED] [020104 12:02] wrote: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are

Re: Tell gcc I have a i686

2002-01-04 Thread Ralph N. Smith
On Fri, Jan 04, 2002 at 11:20:55AM -0800, John Baldwin wrote: On 04-Jan-02 Stephen Montgomery-Smith wrote: Alfred Perlstein wrote: * Stephen Montgomery-Smith [EMAIL PROTECTED] [020104 12:02] wrote: ... But arch doesn't exist on FreeBSD. Isn't this somewhat trivial?

Re: Tell gcc I have a i686

2002-01-04 Thread PSI, Mike Smith
If you do this, then I beg of you, for the sake of your successor's sanity... Comment your makefile ad nauseum and even put in a few echoes to inform builder what nastiness you enforced. I spend a lot of my time finding such optimizations in legacy code, well they were optimizations 5 years