diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-03-04 00:35:03 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-03-04 00:35:03 +0000 |
commit | 13a47bd66a97e146afef8b6f92bbbefbbf956a1b (patch) | |
tree | f429a981b00040535be11e6c913c11d770b1c918 /libgloss/m68hc11/sci-inout.S | |
parent | e299c7addc3ec7f20162a54740dc06cae2a71389 (diff) | |
download | cygnal-13a47bd66a97e146afef8b6f92bbbefbbf956a1b.tar.gz cygnal-13a47bd66a97e146afef8b6f92bbbefbbf956a1b.tar.bz2 cygnal-13a47bd66a97e146afef8b6f92bbbefbbf956a1b.zip |
2004-03-03 Stephane Carrez <stcarrez@nerim.fr>
* m68hc11/sci-inout.S: Supports -mlong-calls.
* m68hc11/sim-valid-m68hc11.ld (.tramp): New section for trampolines.
(.text): Mark the .installN and .finiN section with KEEP.
(.vectors): Likewise for .vectors.
(.gcc_except_table): New section.
* m68hc11/sim-valid-m68hc12.ld (.tramp): New section for trampolines.
(.text): Mark the .installN and .finiN section with KEEP.
(.vectors): Likewise for .vectors.
(.gcc_except_table): New section.
Diffstat (limited to 'libgloss/m68hc11/sci-inout.S')
-rw-r--r-- | libgloss/m68hc11/sci-inout.S | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/libgloss/m68hc11/sci-inout.S b/libgloss/m68hc11/sci-inout.S index 070fd7da2..a8675d270 100644 --- a/libgloss/m68hc11/sci-inout.S +++ b/libgloss/m68hc11/sci-inout.S @@ -1,5 +1,5 @@ /* M68HC11/M68HC12 serial line operations - * Copyright (C) 1999, 2001 Stephane Carrez (stcarrez@nerim.fr) + * Copyright (C) 1999, 2001, 2003, 2004 Stephane Carrez (stcarrez@nerim.fr) * * The authors hereby grant permission to use, copy, modify, distribute, * and license this software and its documentation for any purpose, provided @@ -12,6 +12,25 @@ * they apply. */ +#ifdef __HAVE_SHORT_INT__ + .mode mshort +#else + .mode mlong +#endif + +#if defined(__USE_RTC__) + .macro ret +#if defined(mc68hc12) + rtc +#else + jmp __return_32 +#endif + .endm +#else + .macro ret + rts + .endm +#endif #ifdef mc68hc12 SC0CR1 = 0xC2 SC0CR2 = 0xC3 @@ -39,7 +58,7 @@ L1: ldab SC0CR2,x orab #0x8 stab SC0CR2,x - rts + ret .sect .text .globl inbyte @@ -52,7 +71,7 @@ inbyte: bita #0x20 beq inbyte ldab SC0CR2,x - rts + ret .globl _sci_init .sect .text @@ -99,7 +118,7 @@ L1: ldab SCCR2,x orab #0x8 stab SCCR2,x - rts + ret .sect .text .globl inbyte @@ -112,7 +131,7 @@ inbyte: bita #0x20 beq inbyte ldab SCDR,x - rts + ret .globl _sci_init .sect .text |