Take pointer, not word count, as upper limit in verify_space()
[sbcl.git] / src / runtime / arch.h
blob1bb3b63c8ad6812647cf714b6e16005299179d7b
1 /*
2 * This software is part of the SBCL system. See the README file for
3 * more information.
5 * This software is derived from the CMU CL system, which was
6 * written at Carnegie Mellon University and released into the
7 * public domain. The software is in the public domain and is
8 * provided with absolutely no warranty. See the COPYING and CREDITS
9 * files for more information.
12 #ifndef __ARCH_H__
13 #define __ARCH_H__
15 #include "os.h"
16 #include "signal.h"
17 #include "thread.h"
19 /* Do anything we need to do when starting up the runtime environment
20 * on this architecture. */
21 extern void arch_init(void);
22 extern void tune_asm_routines_for_microarch(void);
23 extern void untune_asm_routines_for_microarch(void);
24 extern void asm_routine_poke(const char*, int, char);
26 /* FIXME: It would be good to document these too! */
27 extern void arch_skip_instruction(os_context_t*);
28 extern void arch_handle_allocation_trap(os_context_t*);
29 extern boolean arch_pseudo_atomic_atomic(os_context_t*);
30 extern void arch_set_pseudo_atomic_interrupted(os_context_t*);
31 extern void arch_clear_pseudo_atomic_interrupted(os_context_t*);
32 extern os_vm_address_t arch_get_bad_addr(int, siginfo_t*, os_context_t*);
33 extern unsigned char *arch_internal_error_arguments(os_context_t*);
34 extern unsigned int arch_install_breakpoint(void *pc);
35 extern void arch_remove_breakpoint(void *pc, unsigned int orig_inst);
36 extern void arch_install_interrupt_handlers(void);
37 extern void arch_do_displaced_inst(os_context_t *context,
38 unsigned int orig_inst);
40 extern int arch_os_thread_init(struct thread *thread);
41 #if defined(LISP_FEATURE_X86) && defined(LISP_FEATURE_SB_THREAD)
42 extern void arch_os_load_ldt(struct thread *thread);
43 #endif
44 extern int arch_os_thread_cleanup(struct thread *thread);
46 extern lispobj funcall0(lispobj function);
47 extern lispobj funcall1(lispobj function, lispobj arg0);
48 extern lispobj funcall2(lispobj function, lispobj arg0, lispobj arg1);
49 extern lispobj funcall3(lispobj function, lispobj arg0, lispobj arg1,
50 lispobj arg2);
51 extern lispobj *component_ptr_from_pc(lispobj *pc);
53 #if defined(LISP_FEATURE_X86)||defined(LISP_FEATURE_X86_64)
54 extern unsigned int * single_stepping;
55 extern void restore_breakpoint_from_single_step(os_context_t * context);
56 #endif
58 extern void arch_handle_breakpoint(os_context_t* context);
59 extern void arch_handle_fun_end_breakpoint(os_context_t *context);
60 #ifdef trap_AfterBreakpoint
61 extern void arch_handle_after_breakpoint(os_context_t *context);
62 #endif
63 #ifdef trap_SingleStepAround
64 extern void arch_handle_single_step_trap(os_context_t *context, int trap);
65 #endif
67 extern void arch_write_linkage_table_jmp(char *reloc_addr, void *target_addr);
68 extern void arch_write_linkage_table_ref(void *reloc_addr, void *target_addr);
70 #endif /* __ARCH_H__ */