Mercurial > flash_v2
annotate packages/hal/arm/arch/current/include/arm_stub.h @ 38:e7ba79f6d3a8 ecos-sw-1999-09-23
Merge from eCos master repository on 1999-09-23-20:10:25-BST
| author | jlarmour |
|---|---|
| date | Thu, 23 Sep 1999 19:52:27 +0000 |
| parents | 443894e2e912 |
| children | c38311975d4f |
| rev | line source |
|---|---|
| 2 | 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 | |
|
38
e7ba79f6d3a8
Merge from eCos master repository on 1999-09-23-20:10:25-BST
jlarmour
parents:
2
diff
changeset
|
37 #define PS_I CPSR_IRQ_DISABLE |
|
e7ba79f6d3a8
Merge from eCos master repository on 1999-09-23-20:10:25-BST
jlarmour
parents:
2
diff
changeset
|
38 #define PS_F CPSR_FIQ_DISABLE |
|
e7ba79f6d3a8
Merge from eCos master repository on 1999-09-23-20:10:25-BST
jlarmour
parents:
2
diff
changeset
|
39 |
| 2 | 40 typedef enum regnames regnames_t; |
| 41 | |
| 42 /* Given a trap value TRAP, return the corresponding signal. */ | |
| 43 extern int __computeSignal (unsigned int trap_number); | |
| 44 | |
| 45 /* Return the SPARC trap number corresponding to the last-taken trap. */ | |
| 46 extern int __get_trap_number (void); | |
| 47 | |
| 48 /* Return the currently-saved value corresponding to register REG. */ | |
| 49 extern target_register_t get_register (regnames_t reg); | |
| 50 | |
| 51 /* Store VALUE in the register corresponding to WHICH. */ | |
| 52 extern void put_register (regnames_t which, target_register_t value); | |
| 53 | |
| 54 /* Set the currently-saved pc register value to PC. This also updates NPC | |
| 55 as needed. */ | |
| 56 extern void set_pc (target_register_t pc); | |
| 57 | |
| 58 /* Set things up so that the next user resume will execute one instruction. | |
| 59 This may be done by setting breakpoints or setting a single step flag | |
| 60 in the saved user registers, for example. */ | |
| 61 void __single_step (void); | |
| 62 | |
| 63 /* Clear the single-step state. */ | |
| 64 void __clear_single_step (void); | |
| 65 | |
| 66 /* If the breakpoint we hit is in the breakpoint() instruction, return a | |
| 67 non-zero value. */ | |
| 68 extern int __is_breakpoint_function (void); | |
| 69 | |
| 70 /* Skip the current instruction. */ | |
| 71 extern void __skipinst (void); | |
| 72 | |
| 73 extern void __install_breakpoints (void); | |
| 74 | |
| 75 extern void __clear_breakpoints (void); | |
| 76 | |
| 77 #endif // ifndef CYGONCE_HAL_ARM_STUB_H |
