Mail Archives: djgpp/1999/06/18/15:01:48
From: | clc5q AT cobra DOT cs DOT Virginia DOT EDU (Clark L. Coleman)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Inline asm producing compile error
|
Date: | 18 Jun 1999 18:24:34 GMT
|
Organization: | University of Virginia Computer Science Department
|
Lines: | 23
|
Message-ID: | <7ke2t2$j3d$1@murdoch.acc.Virginia.EDU>
|
NNTP-Posting-Host: | cobra.cs.virginia.edu
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I am getting "invalid asm: bad operand number", or something very
similar, out of the compiler (not assembler) for the following code:
bool FlushTLB(long address) {
asm volatile("invlpg %1"
: /* no outputs */
: "m" (address));
return TRUE;
}
Here is the idea:
INVLPG m
is documented as the x86 instruction to invalidate the TLB entry for
the memory page that contains address "m". My function accepts a
memory address as its parameter, and (unsuccessfully) attempts to use
inline assembler to produce an INVLPG instruction with that address.
Any help is appreciated.
- Raw text -