提交 3553493d 编写于 作者: S Stefan Kristiansson 提交者: Wolfgang Denk

openrisc: Add support for standalone programs

Signed-off-by: NStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
上级 2be9fdbf
......@@ -181,6 +181,20 @@ gd_t *global_data;
" lwi $r16, [$r16 + (%1)]\n" \
" jr $r16\n" \
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "$r16");
#elif defined(CONFIG_OPENRISC)
/*
* r10 holds the pointer to the global_data, r13 is a call-clobbered
* register
*/
#define EXPORT_FUNC(x) \
asm volatile ( \
" .globl " #x "\n" \
#x ":\n" \
" l.lwz r13, %0(r10)\n" \
" l.lwz r13, %1(r13)\n" \
" l.jr r13\n" \
" l.nop\n" \
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r13");
#else
/*" addi $sp, $sp, -24\n" \
" br $r16\n" \*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册