summaryrefslogtreecommitdiffstats
path: root/libgloss/m32c/crt0.S
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2008-09-24 23:29:38 +0000
committerDJ Delorie <dj@redhat.com>2008-09-24 23:29:38 +0000
commit5025fc547da08c83d330feb12c4795d5cacd12c6 (patch)
tree2e24c11d1f716fdd0be5c0fdc974a09410028d22 /libgloss/m32c/crt0.S
parenta890f63b3325e22d3eda75f730ab59c13262e5ec (diff)
downloadcygnal-5025fc547da08c83d330feb12c4795d5cacd12c6.tar.gz
cygnal-5025fc547da08c83d330feb12c4795d5cacd12c6.tar.bz2
cygnal-5025fc547da08c83d330feb12c4795d5cacd12c6.zip
* m32c/varvects.S: New.
* m32c/varvects.h: New. * m32c/sample.c: New. * m32c/Makefile.in: Add m32cgloss library support. * m32c/crt0.S: Tweaks to support interrupts by default. * m32c/m32c.tmpl: Likewise.
Diffstat (limited to 'libgloss/m32c/crt0.S')
-rw-r--r--libgloss/m32c/crt0.S15
1 files changed, 13 insertions, 2 deletions
diff --git a/libgloss/m32c/crt0.S b/libgloss/m32c/crt0.S
index f804d8f86..9bbffdd32 100644
--- a/libgloss/m32c/crt0.S
+++ b/libgloss/m32c/crt0.S
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2005 Red Hat Incorporated.
+Copyright (c) 2005,2008 Red Hat Incorporated.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -42,12 +42,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ALIGN 2
#endif
+ .section ".resetvec","ax",@progbits
+ .long _start
+
.text
.global _start
_start:
.LFB2:
- fset U /* User stack */
+ fclr U /* One stack for user and interrupts */
ldc #__stack,sp
#ifdef A16
@@ -72,6 +75,14 @@ _start:
mov.w #0,r0
sstr.w
+#ifdef A16
+ ldc #%lo16(__var_vects),intbl
+ ldc #%hi16(__var_vects),intbh
+#else
+ ldc #__var_vects,intb
+#endif
+
+ fset I
jsr.a __m32c_init
jsr.a _main