Mail Archives: djgpp/1997/05/21/20:48:56
From: | oml1 AT Ra DOT MsState DOT Edu (Owen LaGarde)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | AT&T syntax reference for i386 asm -- recommend?
|
Date: | 20 May 1997 16:27:19 GMT
|
Organization: | Mississippi State University
|
Lines: | 21
|
Distribution: | usa
|
Message-ID: | <5lsjd7$ri5$1@NNTP.MsState.Edu>
|
NNTP-Posting-Host: | ra.msstate.edu
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I'm new to DJGPP, so it wasn't until I started moving some old register
service stubs -- rot's, mul's, etc -- that I realised I was way deficient
in the AT&T syntax and gcc inline use. Can anyone recommend a good opcode
ref/gcc inline guide/examples source better than the gcc.inf node on C
extentions? For starters, I'd like to find the recommended way to do simple
one-steppers like the following -- both in syntax and, since there's so many
notes about the ability to optimize over inline asm, whether or not it's
better to inline things like this in C func's or put them in asm func to be
called from C, etc.
mov ax, lval ;lval in C
mov cx, cout ;ditto
rotl ax, cx ;b-rot ax by cx, ret in ax
Is there any one approach to this level of asm that's widely accepted as
best/fastest?
--
Owen LaGarde | Performance prediction through
Forest Products Research Laboratory | AI-driven process simulation
Mississippi State University |
oml1 AT ra DOT msstate DOT edu (130.18.80.10) | "... Oh, what a Tangled Web ..."
- Raw text -