Mail Archives: djgpp/1998/02/11/23:19:34
From: | Bill Currie <bcurrie AT tssc DOT co DOT nz>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: special registers in ASM
|
Date: | Thu, 12 Feb 1998 10:30:21 +1300
|
Organization: | Telecommunication Systems Support Centre
|
Lines: | 21
|
Message-ID: | <34E2186D.915@tssc.co.nz>
|
References: | <01bd371c$3b3ff0a0$b1fcffc2 AT fsl22 DOT novo DOT dk>
|
NNTP-Posting-Host: | node106.tssc.co.nz
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Flemming Stig Larsen wrote:
>
> I'm going to translate a loop written in C to ASM, but I need more than 8
> individual 32-bit registers to do it properly. I'm only familar with
> the 6 standarts(EAX-EDX,ESI,EDI), and I dont want to push pop all the
> time. Then I read about some special registers in the 386+ ex. DR2, TR5,
> CR3. My questions are, can I use them right away?, are they 32bit?,
> what are the syntax to use them in DJGPP's AT&T inline-assembler?
You can't use them as temporary registers as they either have very
specific uses, are inaccessable to user programs, or just plain don't
exist (ie their reserved).
However, with care you CAN use EBP as a seventh register. Also, with
care for PPro register de-optimisations, you can get clever with
subregisters (in general, PPro (PII?) doesn't like movb $5,%al; shll
$4,%eax).
Bill
--
Leave others their otherness
- Raw text -