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.
This commit is contained in:
Jeff Johnston
2004-03-04 00:35:03 +00:00
parent e299c7addc
commit 13a47bd66a
4 changed files with 82 additions and 55 deletions

View File

@@ -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