[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BUG()
On Fri, 2 Jul 2004 11:44:25 +0200, Borislav Petkov
<borislav.petkov@xxxxxxxxxxx> wrote:
> <from include/asm-i386/bug.h:12>
> 12 #if 1 /* Set to zero for a slightly smaller kernel */
> 13 #define BUG() \
> 14 __asm__ __volatile__( "ud2\n" \
> 15 "\t.word %c0\n" \
> 16 "\t.long %c1\n" \
> 17 : : "i" (__LINE__), "i" (__FILE__))
[...]
> 1. what does the c mean in the constraint %c0, %c1 resp.?
I think this is not a contraint. It's a 'code'. In this case it means
that the parameters 0 and 1 should not be treated as operands, but as
(constant) data. At least that's what I understand from reading
``gcc/config/i386/i386.c'' (comment and code near the print_operand
function) from the gcc sources.
Try playing with `gcc -S` and `objdump -D` on a test file, that cleared
things up a bit for me.
More documentation on these 'codes' than the above-mentioned comment
would be interesting though.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/