[parisc-linux] Inline Assembly Help request
jsoe0708@tiscali.be
jsoe0708@tiscali.be
Mon, 9 Sep 2002 18:27:22 +0200
Hi all,
Continuing to figure out how to translate this C in assembly:
static inline int __put_user_u64(unsigned long long val, unsigned long long
* ptr)
{
int err;
err = (int) put_user((unsigned int)(val>>32) ,(unsigned int *)ptr);
err |= (int) put_user((unsigned int)val,(unsigned int *)ptr+1);
return err;
}
(needed for > evms-1.1.0)
With many luck, I found interresting references about online assembly in
gcc.
But I do not yet find explanation about details of the following asm code:
#define __put_user_asm(stx,x,ptr) \
__asm__ __volatile__ ( \
"\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \
"2:\n" \
"\t.section __ex_table,\"a\"\n" \
"\t.word\t1b\n" \
"\t.word\t(2b-1b)+1\n" \
"\t.previous" \
: "=r"(__pu_err) \
: "r"(ptr), "r"(x), "0"(__pu_err))
which is more clear with gcc -S:
1: stw %r21,0(%sr3,%r19)
2:
.section __ex_table,"a"
.word 1b
.word (2b-1b)+1
.previous
My questions are:
what are the actual means "1:", "2:" (seems like label?)
and what means the rest
".section __ex_table,...
...
.previous"
I do not yet found reference on this part (even in Assembly-HOWTO).
Where could I found doc on this details?
Thanks in advance for attention,
Joel
Big Brother Anders - With Tiscali you will see it all ! Check it up on
www.tiscali.be/bigbrother