On Wed, Apr 14, 2004 at 11:34:13PM +1000, Andrew MacIntyre wrote: > Ummm... are you showing what you think you're showing here? As I recall, > i386 gcc uses -mcpu and -march differently to most other architectures: > - -mcpu just sets scheduling parameters, but not instruction set; > - -march sets the instruction set. I'm pretty sure I am. (I'm not sure why I used -march on the long-at-a-time version, though) imul is on all x86 architectures, but whether to use it or not depends on the characteristics of the target CPU. With -mcpu=i386, imul is considered quite slow and a shift sequence is (almost?) always preferred when one operand is constant. With -mcpu=i686 and newer, imul seems to be preferred. I did actually inspect the generated assembly with -mcpu=i386 and -mcpu=i686, though I didn't look at it for all the combinations I posted. Jeff
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4