iq2000 port.

This commit is contained in:
Anthony Green
2003-06-06 16:07:57 +00:00
parent 75d7d17700
commit 045e4d2e08
36 changed files with 2302 additions and 0 deletions

13
libgloss/iq2000/trap.c Normal file
View File

@ -0,0 +1,13 @@
// Perform a system call.
// Unused parameters should be set to 0.
int __trap0(unsigned long func, unsigned long p1, unsigned long p2, unsigned long p3)
{
int ret = 0;
asm volatile ("nop\n\tor %%4,%%0,%0" : : "r"(func));
asm volatile ("nop\n\tor %%5,%%0,%0" : : "r"(p1));
asm volatile ("nop\n\tor %%6,%%0,%0" : : "r"(p2));
asm volatile ("nop\n\tor %%7,%%0,%0" : : "r"(p3));
asm volatile ("nop\n\tor %%11,%%0,%0" : : "r"(func));
asm volatile ("syscall\n\tnop\n\tor %0,%%0,%%2" : "=r"(ret));
return ret;
}