summaryrefslogtreecommitdiffstats
path: root/c/src/librdbg/src/i386/rdbg_cpu_asm.s
blob: f0942310ce3537570806a92ddea3d55d7ca3347a (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*  cpu_asm.s
 *
 *  This file contains all assembly code for the Intel i386 implementation
 *  of RDBG.
 *
 */

#include <asm.h>

        BEGIN_CODE

/*
 *  void copyback_data_cache_and_invalidate_instr_cache()
 *
 *  This routine performs a copy of the data cache 
 *  and invalidate the instruction cache
 */

        .p2align  1
        PUBLIC (copyback_data_cache_and_invalidate_instr_cache)

SYM (copyback_data_cache_and_invalidate_instr_cache):
        wbinvd
        ret


	
/*
 * void enterRdbg(void)
 *	
 * This function perform a call to the exception 19
 * It is used :
 *   1 - in the user code, to simulate a Breakpoint.
 *       (with justSaveContext = 0)
 *   2 - in the RDBG code, to push a ctx in the list.
 *       (with justSaveContext = 1)
 *
 * In most of case, it will be use as described in 1.
 * The 2nd possibility will be used by RDBG to obtain
 * its own ctx
 */

        PUBLIC (enterRdbg)

SYM (enterRdbg):
        int $50
        ret


/*
 * void rtems_exception_prologue_50(void)
 *	
 * Exception 50 is used to enter Rdbg
 *
 */
	
        .p2align 4
	
        PUBLIC (rtems_exception_prologue_50)
        PUBLIC (_Exception_Handler)

SYM (rtems_exception_prologue_50):	
	pushl	$ 0
	pushl	$ 50	
        jmp   SYM(_Exception_Handler) ;


END_CODE

END