sparc: fix breakage introduced by cmp+jmp fusion (sparc64 has two sets of
[ajla.git] / save.h
blob1e309bcc39f836681922e587d886540a76b204c2
1 /*
2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
9 * version.
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
19 #ifndef AJLA_SAVE_H
20 #define AJLA_SAVE_H
22 #include "data.h"
23 #include "module.h"
25 #define save_prepare name(save_prepare)
26 #define save_start_function name(save_start_function)
27 #define save_cache_entry name(save_cache_entry)
28 #define save_finish_function name(save_finish_function)
29 #define save_find_function_descriptor name(save_find_function_descriptor)
30 #define save_register_dependence name(save_register_dependence)
32 extern bool save_disable;
34 void save_prepare(void);
35 void save_start_function(struct data *d, bool new_cache);
36 void save_cache_entry(struct data *d, struct cache_entry *ce);
37 void save_finish_function(struct data *d);
39 struct function_descriptor {
40 struct data *data_saved_cache;
41 code_t *code;
42 ip_t code_size;
43 const struct local_variable_flags *local_variables_flags;
44 frame_t n_slots;
45 struct data *types;
46 struct line_position *lp;
47 size_t lp_size;
48 void *unoptimized_code_base;
49 size_t unoptimized_code_size;
50 size_t *entries;
51 size_t n_entries;
52 struct trap_record *trap_records;
53 size_t trap_records_size;
54 struct module_designator *md;
55 struct function_designator *fd;
58 struct function_descriptor *save_find_function_descriptor(const struct module_designator *md, const struct function_designator *fd);
60 void save_register_dependence(const char *path_name);
62 #endif