annotate packages/hal/m68k/mcf52xx/var/current/src/mcf52xx_asm.S @ 2729:74dbf4c3f2e1 after-copyright-change-20090129

Update all copyright banners to reflect FSF ownership; fix and improve licence text.
author jlarmour
date Thu, 29 Jan 2009 17:47:46 +0000
parents 2bff610f66e7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2650
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
1 // #========================================================================
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
2 // #
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
3 // # mcfxxxx_asm.S
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
4 // #
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
5 // # Miscellaneous assembler support functions for an mcfxxxx
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
6 // #
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
7 // #========================================================================
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
8 //=============================================================================
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
9 // ####ECOSGPLCOPYRIGHTBEGIN####
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
10 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
11 // This file is part of eCos, the Embedded Configurable Operating System.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
12 // Copyright (C) 2008 Free Software Foundation, Inc.
2650
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
13 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
14 // eCos is free software; you can redistribute it and/or modify it under
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
15 // the terms of the GNU General Public License as published by the Free
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
16 // Software Foundation; either version 2 or (at your option) any later
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
17 // version.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
18 //
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
19 // eCos is distributed in the hope that it will be useful, but WITHOUT
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
20 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
21 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
22 // for more details.
2650
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
23 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
24 // You should have received a copy of the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
25 // along with eCos; if not, write to the Free Software Foundation, Inc.,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
26 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2650
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
27 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
28 // As a special exception, if other files instantiate templates or use
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
29 // macros or inline functions from this file, or you compile this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
30 // and link it with other works to produce a work based on this file,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
31 // this file does not by itself cause the resulting work to be covered by
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
32 // the GNU General Public License. However the source code for this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
33 // must still be made available in accordance with section (3) of the GNU
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
34 // General Public License v2.
2650
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
35 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
36 // This exception does not invalidate any other reasons why a work based
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
37 // on this file might be covered by the GNU General Public License.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
38 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2650
diff changeset
39 // ####ECOSGPLCOPYRIGHTEND####
2650
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
40 //============================================================================
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
41 //###DESCRIPTIONBEGIN####
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
42 //
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
43 // Author(s): bartv
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
44 // Date: 2008-01-14
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
45 //
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
46 //###DESCRIPTIONEND####
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
47 //========================================================================
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
48
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
49 #include <pkgconf/hal_m68k_mcfxxxx.h>
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
50 #include <cyg/hal/arch.inc>
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
51 #include <cyg/hal/var_io.h>
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
52
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
53 .file "mcfxxxx_asm.S"
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
54
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
55 #ifdef CYGINT_HAL_M68K_MCFxxxx_SOFTWARE_PROFILE_TIMER
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
56 // See also hal_enable_profile_timer() in mcfxxxx.c
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
57
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
58 // This VSR should call __profile_hit() with a single argument,
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
59 // the interrupted PC. The VSR has been installed as a
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
60 // high-priority interrupt source, so there is no need to worry
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
61 // about nested interrupts or an interrupt stack.
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
62 .extern __profile_hit
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
63
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
64 FUNC_START(hal_mcfxxxx_profile_vsr)
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
65 // On entry sp[0] holds sr and sp[1] holds the pc.
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
66 // Save the caller-save integer registers. There are no floating
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
67 // point registers to worry about. Make space for the argument
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
68 // to __profile_hit() while we are at it.
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
69 sub.l #20, %sp
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
70 movem.l %d0-%d1/%a0-%a1, 4(%sp)
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
71
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
72 // Now pick up the interrupted PC from its new offset and push it
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
73 // on the stack for __profile_hit().
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
74 move.l 24(%sp),(%sp)
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
75 jbsr __profile_hit
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
76
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
77 // The timer runs in restart mode, but the interrupt bit has to be reset.
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
78 move.l # (HAL_MCFxxxx_PITx_PCSR_PRE_64 + HAL_MCFxxxx_PITx_PCSR_OVW + \
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
79 HAL_MCFxxxx_PITx_PCSR_PIE + HAL_MCFxxxx_PITx_PCSR_PIF + \
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
80 HAL_MCFxxxx_PITx_PCSR_RLD + HAL_MCFxxxx_PITx_PCSR_EN), %d0
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
81 move.w %d0, HAL_MCFxxxx_PROFILE_TIMER_BASE + HAL_MCFxxxx_PITx_PCSR
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
82
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
83 movem.l 4(%sp), %d0-%d1/%a0-%a1
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
84 add.l #20, %sp
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
85 rte
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
86 #endif
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
87
2bff610f66e7 Contribute eCosCentric's MCFxxxx variant HAL, replacing the old
bartv
parents:
diff changeset
88 .end