Mail Archives: djgpp/2002/11/20/22:17:38
Charles Sandmann <sandmann AT clio DOT rice DOT edu> wrote in message news:<3dd9a65b DOT sandmann AT clio DOT rice DOT edu>...
> > 1. I am using _go32_dpmi_allocate_iret_wrapper and family to install
> > the handler (see code below). Does my handler need the commonly-used
> > cli/pusha preamble (and accompanying popa/sti), or does the wrapper
> > code do this for me? I have been unable to decipher the djgpp source,
> > and there seems to be conflicting advice out there.
>
> Do not use cli/sti with the wrappers. If there is any advice which
> says they should be used, let us know so we can fix it. pusha/popa
> are not needed; they are done in the wrapper.
Thank you much for the reply. Here are the first three pages I found
which have the asm("cli;pusha") "idiom" (although all appear to be
independent sites, so it's not djgpp's docs that are the problem. But
with the proliferation of these examples, I was not able to infer from
the docs that it _wasn't_ necessary):
http://www.geocities.com/SiliconValley/Park/8933/interrupts.html
http://www-scf.usc.edu/~akotaobi/opkey.html
http://www.whisqu.se/per/docs/general25.htm
Any takers on the second question (i.e., is the following the correct
call to rdtsc)?
unsigned long long tsc;
asm volatile ("cpuid\n\t"
"rdtsc"
: "=A" (tsc)
:
: "bx", "cx");
Thanks again,
Eric Farmer
- Raw text -