|
Message
From: Balaji V. Iyer<bviyer@n...>
Date: Mon Apr 25 02:08:05 CEST 2005
Subject: [openrisc] Syscall Argument Passing
Hello Everyone, I have a question about how syscalls are handled in OpenRISC 1200. Ok let's say we have to use the _read function, and "read" generally has 3 arguements taken in, they are:
int read (int fd, char *buffer, int nbyte)
How are the values for fd, *buffer and nbyte passed into the function? Are they passed through the parameter registers (r3, r4, r5 respectively,) and the sys function will automatically know these registers to sample? Or are they pushed into the stack with the stack base address stored at a certain place (like the stack pointer, r1)?
Any help is appreciated.
Thanking You,
Yours Sincerely,
Balaji V. Iyer.
|
 |