summaryrefslogtreecommitdiff
path: root/arch/or1k/crt_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/or1k/crt_arch.h')
-rw-r--r--arch/or1k/crt_arch.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/or1k/crt_arch.h b/arch/or1k/crt_arch.h
new file mode 100644
index 00000000..0f381d2d
--- /dev/null
+++ b/arch/or1k/crt_arch.h
@@ -0,0 +1,11 @@
+__asm__("\
+.global _start \n\
+.align 4 \n\
+_start: \n\
+ l.ori r3, r1, 0 \n\
+ l.addi r2, r0, -8 \n\
+ l.and r1, r1, r2 \n\
+ l.addi r1, r1, -8 \n\
+ l.jal __cstart \n\
+ l.ori r2, r0, 0 \n\
+");