comparison packages/hal/arm/arch/current/include/arm_stub.h @ 2:443894e2e912 ecos-v1_2_1-release

Block commit of eCos version 1.2.1
author jlarmour
date Tue, 11 May 1999 12:24:34 +0000
parents
children e7ba79f6d3a8
comparison
equal deleted inserted replaced
1:72f549f0d891 2:443894e2e912
1 #ifndef CYGONCE_HAL_ARM_STUB_H
2 #define CYGONCE_HAL_ARM_STUB_H
3
4 /* arm_stub.h - ARM-specific definitions for generic stub
5 *
6 * Copyright (c) 1998,1999 Cygnus Solutions
7 *
8 * The authors hereby grant permission to use, copy, modify, distribute,
9 * and license this software and its documentation for any purpose, provided
10 * that existing copyright notices are retained in all copies and that this
11 * notice is included verbatim in any distributions. No written agreement,
12 * license, or royalty fee is required for any of the authorized uses.
13 * Modifications to this software may be copyrighted by their authors
14 * and need not follow the licensing terms described here, provided that
15 * the new terms are clearly indicated on the first page of each file where
16 * they apply.
17 */
18
19 #define NUMREGS (16+8+2) // 16 GPR, 8 FPR (unused), 2 PS
20
21 #define REGSIZE( _x_ ) (((_x_) < F0 || (_x_) >= FPS) ? 4 : 12)
22
23 typedef unsigned long target_register_t;
24
25 enum regnames {
26 R0, R1, R2, R3, R4, R5, R6, R7,
27 R8, R9, R10, FP, IP, SP, LR, PC,
28 F0, F1, F2, F3, F4, F5, F6, F7,
29 FPS, PS
30 };
31
32 #define PS_N 0x80000000
33 #define PS_Z 0x40000000
34 #define PS_C 0x20000000
35 #define PS_V 0x10000000
36
37 typedef enum regnames regnames_t;
38
39 /* Given a trap value TRAP, return the corresponding signal. */
40 extern int __computeSignal (unsigned int trap_number);
41
42 /* Return the SPARC trap number corresponding to the last-taken trap. */
43 extern int __get_trap_number (void);
44
45 /* Return the currently-saved value corresponding to register REG. */
46 extern target_register_t get_register (regnames_t reg);
47
48 /* Store VALUE in the register corresponding to WHICH. */
49 extern void put_register (regnames_t which, target_register_t value);
50
51 /* Set the currently-saved pc register value to PC. This also updates NPC
52 as needed. */
53 extern void set_pc (target_register_t pc);
54
55 /* Set things up so that the next user resume will execute one instruction.
56 This may be done by setting breakpoints or setting a single step flag
57 in the saved user registers, for example. */
58 void __single_step (void);
59
60 /* Clear the single-step state. */
61 void __clear_single_step (void);
62
63 /* If the breakpoint we hit is in the breakpoint() instruction, return a
64 non-zero value. */
65 extern int __is_breakpoint_function (void);
66
67 /* Skip the current instruction. */
68 extern void __skipinst (void);
69
70 extern void __install_breakpoints (void);
71
72 extern void __clear_breakpoints (void);
73
74 #endif // ifndef CYGONCE_HAL_ARM_STUB_H