Conflicting info
Posted: Thu Sep 08, 2005 8:54 am
I was looking through some code on setting up a idt in C and noticed something odd. When they set the idt function in at&t assembly, they show this:
So I looked on the osfaq under "inline assembly" but there was no mention of "p". So I was searching on google and came across a page on clobbered registers. This is what they show:
Thanks in advance.
Code: Select all
__asm__ __volatile__("lidt (%0)" : : "p" (&idtp));
But no "p". Is the article wrong or is it supposed to be "q"?g - general effective address
m - memory effective address
r - register
i - immediate value, 0..0xffffffff
n - immediate value known at compile time.
("i" would allow an address known only at link time)
But there are some i386-specific ones described in the processor-specific
part of the manual and in more detail in GCC's i386.h:
q - byte-addressable register (eax, ebx, ecx, edx)
A - eax or edx
a, b, c, d, S, D - eax, ebx, ecx, edx, esi, edi respectively
I - immediate 0..31
J - immediate 0..63
K - immediate 255
L - immediate 65535
M - immediate 0..3 (shifts that can be done with lea)
N - immediate 0..255 (one-byte immediate value)
O - immediate 0..32
Thanks in advance.