"Marcus" == Marcus Spangenberg <[EMAIL PROTECTED]> writes: Marcus> Can anybody help? What is the best way of calling a single Marcus> assembly instruction in an arch independant file? Why is the Marcus> function call not working, is it not allowed to call external Marcus> functions from here?
Marcus> The .s file I have created looks like this: Marcus> #include <sys/asm_linkage.h Marcus> ENTRY(magic_1) Marcus> sethi (1), %g0 Marcus> SET_SIZE(magic_1) Marcus> ENTRY(magic_2) Marcus> sethi (2), %g0 Marcus> SET_SIZE(magic_2) As others have pointed out, you need a ret instruction here. But given all this, you probably should look into the inline assembly files used in the kernel. They're files ending in .il, e.g. usr/src/common/crypto/md5/sparc/sun4u/byteswap.il, and usr/src/uts/sparc/ml/sparc.il (and a few more). There's an article http://developers.sun.com/prodtech/cc/articles/inlining.html about these .il files and how to use them. -- Dave Marquardt Sun Microsystems, Inc. Austin, TX +1 512 401-1077 (SUN internal: x64077) _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
