summaryrefslogtreecommitdiff
path: root/ldso/ldso/cris/dl-startup.h
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2006-02-23 17:21:39 +0000
committerPeter Kjellerstedt <peter.kjellerstedt@axis.com>2006-02-23 17:21:39 +0000
commit1583fb7f92973cdbba391bd32a1b42cbdb5839b8 (patch)
tree1d0cdadd951d29a0cdec8a0116bc6576ff8590cc /ldso/ldso/cris/dl-startup.h
parentd340072c9a51379eb7e754b50173269974c9bc5c (diff)
Added support for the new CRISv32 architecture.
Diffstat (limited to 'ldso/ldso/cris/dl-startup.h')
-rw-r--r--ldso/ldso/cris/dl-startup.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/ldso/ldso/cris/dl-startup.h b/ldso/ldso/cris/dl-startup.h
index 3274b41a5..417cb5096 100644
--- a/ldso/ldso/cris/dl-startup.h
+++ b/ldso/ldso/cris/dl-startup.h
@@ -4,22 +4,43 @@
/* This code fixes the stack pointer so that the dynamic linker
* can find argc, argv and auxvt (Auxillary Vector Table). */
+#ifdef __arch_v32
+
+asm("" \
+" .text\n" \
+" .globl _start\n" \
+" .type _start,@function\n" \
+"_start:\n" \
+" move.d $sp,$r10\n" \
+" lapc _dl_start,$r9\n" \
+" jsr $r9\n" \
+" nop\n" \
+" moveq 0,$r8\n" \
+" jump $r10\n" \
+" move $r8,$srp\n" \
+" .size _start,.-_start\n" \
+" .previous\n" \
+);
+
+#else
+
asm("" \
" .text\n" \
" .globl _start\n" \
" .type _start,@function\n" \
"_start:\n" \
-" move.d $sp,$r10\n" \
-" move.d $pc,$r9\n" \
-" add.d _dl_start - ., $r9\n" \
-" jsr $r9\n" \
-" moveq 0,$r8\n" \
-" move $r8,$srp\n" \
-" jump $r10\n" \
+" move.d $sp,$r10\n" \
+" move.d $pc,$r9\n" \
+" add.d _dl_start - ., $r9\n" \
+" jsr $r9\n" \
+" moveq 0,$r8\n" \
+" move $r8,$srp\n" \
+" jump $r10\n" \
" .size _start,.-_start\n" \
" .previous\n" \
);
+#endif /* __arch_v32 */
/* Get a pointer to the argv array. On many platforms this can be just
* the address if the first argument, on other platforms we need to