diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2007-02-21 14:08:26 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2007-02-21 14:08:26 +0000 |
commit | 0bb4152b761196e4e1ab4df5bd104a70c7a2dfe5 (patch) | |
tree | 446f3664f873e90d0513341a1e6e4fa0ba21ad99 /libgloss/cris/crt0.S | |
parent | 547c5c61044e4751d961ad4e9ae66b5a96a30afa (diff) | |
download | cygnal-0bb4152b761196e4e1ab4df5bd104a70c7a2dfe5.tar.gz cygnal-0bb4152b761196e4e1ab4df5bd104a70c7a2dfe5.tar.bz2 cygnal-0bb4152b761196e4e1ab4df5bd104a70c7a2dfe5.zip |
* cris/crt0.S: Use jump, not ba, to skip the interrupt table. Use
"setf", not "nop", for common_v10_v32 compatibility.
Move out interrupt table to irqtable.S. Include here for non-ELF.
* cris/irqtable.S: Extracted from cris/crt0.S. Provide per-entry
weak default stub definitions.
* cris/crtn.c: Use "setf", not "nop", for common_v10_v32
compatibility.
* cris/setup.S [__arch_common_v10_v32]: Return.
* cris/Makefile.in (BSP_OBJS): Add irqtable.o.
Diffstat (limited to 'libgloss/cris/crt0.S')
-rw-r--r-- | libgloss/cris/crt0.S | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/libgloss/cris/crt0.S b/libgloss/cris/crt0.S index a48efceb2..74c159415 100644 --- a/libgloss/cris/crt0.S +++ b/libgloss/cris/crt0.S @@ -1,5 +1,5 @@ /* Generic simplistic start-up-stub for CRIS/CRISv32. - Copyright (C) 1993-2005 Axis Communications. + Copyright (C) 1993-2005, 2007 Axis Communications. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42,25 +42,27 @@ .global __start nop __start: - ba 0f - nop + move.d 0f,$r9 + jump $r9 + setf + +#ifndef __ELF__ - .rept 256 - 2 - .dword _.int - .endr +; For a.out, everything read-only and code-wise goes into a +; single section, so we can't separate the interrupt table from +; the startup code if we want to have files in-between. +#define IN_CRT0 +#include "irqtable.S" -_.int: -#ifdef __arch_common_v10_v32 - ; This is just to allow the multilib to compile without - ; hackery: the "common" subset doesn't recognize - ; interrupt-return insns. -#elif __CRIS_arch_version >= 32 - rete - rfe #else - reti - nop -#endif + +; The interrupt table (at offset 12, irq #3) is expected here. +; The simplest way to make sure we link it in, is to sacrifice +; some memory and refer to it with a relocation. + .text + .dword __irqtable_at_irq3 + +#endif /* __ELF__ */ 0: move.d __setup,$r9 |