This source file includes following definitions.
- check_regs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 #include <machine/asm.h>
31 #include <machine/psl.h>
32 #define _LOCORE
33 #include <machine/segments.h>
34 #include <machine/trap.h>
35 #include <debug_md.h>
36 #undef _LOCORE
37
38
39
40
41 #define pushsr(sr) movl sr, %eax; pushl %eax
42
43 .text
44 .globl alltraps
45
46 alltraps:
47 pushal
48 pushsr(%ds)
49 pushsr(%es)
50 pushsr(%fs)
51 pushsr(%gs)
52
53 movl 0xf*4(%esp), %eax
54 movzwl %ax, %eax
55 movl %eax, 0xf*4(%esp)
56 #ifdef DEBUG_DEBUG
57 movl $0xb8280, %edi
58 movl 0x0c*4(%esp), %eax
59 addb $'0', %al
60 movb $0x17, %ah
61 shll $16, %eax
62 movb 0x0d*4(%esp), %al
63 addb $'0', %al
64 movb $0x17, %ah
65 movl %eax, (%edi)
66 #endif
67 call _C_LABEL(check_regs)
68 #ifdef DEBUG_DEBUG
69 movl $0xb8290, %edi
70 movl $0x47394738, (%edi)
71 #endif
72 popl %gs
73 popl %fs
74 popl %es
75 popl %ds
76 popal
77 addl $0x8, %esp
78 hlt
79 iret
80
81 ENTRY(check_regs)
82 #ifdef DEBUG_DEBUG
83 movl $0xb8284, %edi
84 movl $0x47334732, (%edi)
85 #endif
86 movl $0x10, %eax
87 mov %ax, %ds
88 mov %ax, %es
89 movl $reg, %edi
90 cld
91 movl 0x0c*4(%esp), %eax; stosl
92 movl 0x0b*4(%esp), %eax; stosl
93 movl 0x0a*4(%esp), %eax; stosl
94 movl 0x09*4(%esp), %eax; stosl
95 movl 0x08*4(%esp), %eax; stosl
96 movl 0x07*4(%esp), %eax; stosl
97 movl 0x06*4(%esp), %eax; stosl
98 movl 0x05*4(%esp), %eax; stosl
99 movl 0x0f*4(%esp), %eax; stosl
100 movl 0x11*4(%esp), %eax; stosl
101 movl 0x10*4(%esp), %eax; stosl
102 mov %ss, %ax ; stosl
103 movl 0x04*4(%esp), %eax; stosl
104 movl 0x03*4(%esp), %eax; stosl
105 movl 0x02*4(%esp), %eax; stosl
106 movl 0x01*4(%esp), %eax; stosl
107
108 #ifdef DEBUG_DEBUG
109 movl $0xb8288, %edi
110 movl $0x47354734, (%edi)
111 #endif
112 movl 0x0e*4(%esp), %ecx
113 movl 0x0d*4(%esp), %eax
114 pushl %ecx
115 pushl %eax
116 call _C_LABEL(dump_regs)
117 popl %eax
118 popl %eax
119
120 #ifdef DEBUG_DEBUG
121 movl $0xb828c, %edi
122 movl $0x47374736, (%edi)
123 #endif
124 ret