From 5025fc547da08c83d330feb12c4795d5cacd12c6 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 24 Sep 2008 23:29:38 +0000 Subject: * 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. --- libgloss/m32c/crt0.S | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'libgloss/m32c/crt0.S') 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 -- cgit v1.2.3