GCC option: -msse and -msse2

Ask a Question related to UNIX Programming, Design and Development.

  1. #1

    Default GCC option: -msse and -msse2

    Hi.

    I would like to perform code optimization on the program I build using GCC
    2.96. I currently only use "-O2 -march=i686," which will probably only
    optimize the code for the general Pentium Pro architecture. I'd like to
    optimize it specifically for Pentium III. Now, I've read somewhere that
    using the "-msse" or "-msse2" switch will achive that goal. However, GCC
    2.96 doesn't recognize "-msse2," so I guess I can only use "-msse." What
    I'd like to know is, what are those switches for, and what are the
    differences between the two? Or is there any other way to optimize for
    Pentium III?

    Thanks in advance!
    Dai


    Daihard Guest

  2. Similar Questions and Discussions

    1. env Config option and LockDetect option not working with Berkeley DB RPC
      I am currently using Berkeley DB 4.4.20 with Berkeley DB perl module 0.28. I am running the client/server version of Berkeley DB. Here is what my...
    2. tga export option
      Hi, I am using visual basic script and can someone please tell me how can I export tga by scripting Illustrator. I saw that it has only gif, jpeg,...
    3. Help with HELP option
      I am running a G5 on OS. 10.3.3 and am trying to learn to use PhotoShop 7. When I open the Help section, the application launches Internet Explorer...
    4. no PNG option?
      hello, i've got an image set to RGB and when i try to save as... PNG is not in the list. what might i be doing wrong? i'm using 2.0. also, why is...
    5. RUN AS doesn't appear as an option...
      When I shift + right-click on an EXE, I don't get a RUN AS option. Secondary logon is enabled and started. The RUN AS option is there when I'm...
  3. #2

    Default Re: GCC option: -msse and -msse2

    Daihard wrote:
    > Hi.
    >
    > I would like to perform code optimization on the program I build using GCC
    > 2.96. I currently only use "-O2 -march=i686," which will probably only
    > optimize the code for the general Pentium Pro architecture. I'd like to
    > optimize it specifically for Pentium III. Now, I've read somewhere that
    > using the "-msse" or "-msse2" switch will achive that goal. However, GCC
    > 2.96 doesn't recognize "-msse2," so I guess I can only use "-msse." What
    > I'd like to know is, what are those switches for, and what are the
    > differences between the two? Or is there any other way to optimize for
    > Pentium III?
    -msse let's the compiler use the sse instructions of the cpu. These can use
    the mmx registers to do floating point arithmetic (single precision). So
    you have 8 more floating point registers and each can hold 2 floats.
    Operations on these two floats can be done in parallel. -msse2 uses
    registers in newer pentiums (or opteron) to do the same with doubles. I
    couldn't see a measurable speedup in my benchmarks (but an illegal
    instruction on athlonXP).
    Tobias.

    --
    unix [url]http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.programmer.html[/url]
    clc [url]http://www.eskimo.com/~scs/C-faq/top.html[/url]
    fclc (french): [url]http://www.isty-info.uvsq.fr/~rumeau/fclc/[/url]
    Tobias Oed Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139