kaffe JVM

Tony Kimball alk at pobox.com
Sun Apr 26 19:31:06 PDT 1998

Quoth chenghu on Mon, 27 April:
: Hollow sir/madam


:  asm volatile ("       \n\
:   subl %0,%%esp      \n\
:  " : : "r" ((CALL)->argsize * sizeof(jint)) : "cc")
: I have found several books about asm language, but I don't find the
: expressions
: like that. Could you interpret this code line by line.

You need to refer to the GCC reference manual, included in the gcc
source code distribution found at any GNU mirror.  Such expressions
are a means of inserting explicitly constructed machine operations
into the generated code stream produced by the gcc compiler.  IIRC,
the "volatile" modifier signifies that the instruction should act as a
barrier to code motion, the first string argument represents the
template for the instruction, with the %0 format escape referring to
the register ("r") which holds the first operand (in this case, the C
expression ((CALL)->argsize * sizeof(jint))).  I don't know x86 asm
(nor do I have a book) but it appears to be growing the stack
(downward) by the size of an argument.

More information about the kaffe mailing list