Initial version

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@790 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2010-03-13 14:13:53 +00:00
parent ab41a4f80f
commit 191af92d47
63 changed files with 17582 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
#include "libsys.h"
int non_aligned_load(UINT32* pMem)
{
UINT32 result;
__asm__
(
"li $t0, 0x01234567\n"
"li $t1, 0x89ABCDEF\n"
"sw $t0, 0(%[pMem])\n"
"sw $t1, 64(%[pMem])\n"
"lw %[val], 0(%[pMem])\n"
"lw %[val], 64(%[pMem])\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"li %[val], 0x55555555\n"
"lw %[val], 0(%[pMem])\n"
"lwl %[val], 65(%[pMem])\n"
: [val] "=r" (result)
: [pMem] "r" (pMem)
);
return result;
}
int main()
{
int buf[256], res, i;
res = non_aligned_load(buf);
return res;
}