source: rtems/c/src/lib/libcpu/a29k/clock/clock.S @ 948a069

Last change on this file since 948a069 was 443f26d2, checked in by Joel Sherrill <joel.sherrill@…>, on 09/22/00 at 20:36:01

2000-09-22 Joel Sherrill <joel@…>

  • clock/clock.S: Commented out non-GNU assembly.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1;
2#if 0
3;       .include "register.ah"
4        .include "amd.ah"
5        .include "pswmacro.ah"
6
7        .text
8;       .equ    IN,0x2000000
9        .reg    CLOCK,gr78
10        .reg    SECS,gr79
11        .equ    CPUCLK,16
12        .equ    RATE,100
13        .reg    it0,gr64
14        .reg    it1,gr65
15        .reg    v0,gr96
16timer_clear_sup:
17        const   it0,IN
18        consth  it0,IN
19        mfsr    it1,tmr
20        andn    it1,it1,it0
21        mtsr    tmr,it1
22        const   it0,RATE
23        cplt    it0,CLOCK,it0
24        jmpf    it0,carry
25        add     CLOCK,CLOCK,1
26        iret
27carry:
28        const   CLOCK,0
29        add     SECS,SECS,1
30        iret
31
32        .equ    TICKS,(CPUCLK*1000000/RATE)
33;       .equ    IE,0x1000000
34timer_init_sup:
35        const   it0,TICKS
36        consth  it0,TICKS
37        mtsr    tmc,it0
38        const   it0,(IE|TICKS)
39        consth  it0,(IE|TICKS)
40        mtsr    tmr,it0
41        const   SECS,0
42        const   CLOCK,0
43        iret
44
45timer_get_sup:
46        add     gr96,SECS,0
47        iret
48
49timer_disable_sup:
50        mfsr    it0,ops
51        const   it1,TD
52        consth  it1,TD
53        andn    it0,it1,it0
54        mtsr    ops,it0
55        iret
56#endif
57
58        .global _a29k_init_timer
59_a29k_init_timer:
60#if 0
61        push    msp,lr0
62        const   lr2,INIT_TIMER
63        consth  lr2,INIT_TIMER
64        const   lr3,timer_init_sup
65        consth  lr3,timer_init_sup
66        const   v0,__settrap
67        consth  v0,__settrap
68        calli   lr0,v0
69        nop
70       
71        const   lr2,CLEAR_TIMER
72        consth  lr2,CLEAR_TIMER
73        const   lr3,timer_clear_sup
74        consth  lr3,timer_clear_sup
75        const   v0,__settrap
76        consth  v0,__settrap
77        calli   lr0,v0
78        nop
79       
80        const   lr2,DISABLE_TIMER
81        consth  lr2,DISABLE_TIMER
82        const   lr3,timer_disable_sup
83        consth  lr3,timer_disable_sup
84        const   v0,__settrap
85        consth  v0,__settrap
86        calli   lr0,v0
87        nop
88       
89        const   lr2,GET_TIMER
90        consth  lr2,GET_TIMER
91        const   lr3,timer_get_sup
92        consth  lr3,timer_get_sup
93        const   v0,__settrap
94        consth  v0,__settrap
95        calli   lr0,v0
96        nop
97       
98        asneq   INIT_TIMER,gr1,gr1
99        pop     lr0,msp
100        jmpi    lr0
101        nop
102#endif
103
104        .global _a29k_clear_timer
105_a29k_clear_timer:
106#if 0
107;       asneq   CLEAR_TIMER,gr1,gr1
108        jmpi lr0
109        nop
110#endif
111
112        .global _a29k_disable_timer
113_a29k_disable_timer:
114#if 0
115        asneq   DISABLE_TIMER,gr1,gr1
116        jmpi lr0
117        nop
118#endif
119
120        .global _a29k_get_timer
121_a29k_get_timer:
122#if 0
123        asneq   GET_TIMER,gr1,gr1
124        jmpi lr0
125        nop
126#endif
Note: See TracBrowser for help on using the repository browser.