mirror of
https://github.com/Cxbx-Reloaded/unicorn.git
synced 2024-11-23 19:39:50 +00:00
cleanup qemu/util code
This commit is contained in:
parent
fdbbdc6216
commit
c1f39c3db2
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_aarch64
|
||||
#define addrrange_shift addrrange_shift_aarch64
|
||||
#define adjust_endianness adjust_endianness_aarch64
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_aarch64
|
||||
#define AES_decrypt AES_decrypt_aarch64
|
||||
#define AES_encrypt AES_encrypt_aarch64
|
||||
#define AES_imc AES_imc_aarch64
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_aarch64
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_aarch64
|
||||
#define all_helpers all_helpers_aarch64
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_aarch64
|
||||
#define alloc_entry alloc_entry_aarch64
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_aarch64
|
||||
#define bad_mode_switch bad_mode_switch_aarch64
|
||||
#define bank_number bank_number_aarch64
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_aarch64
|
||||
#define bitmap_zero_extend bitmap_zero_extend_aarch64
|
||||
#define bp_wp_matches bp_wp_matches_aarch64
|
||||
#define breakpoint_invalidate breakpoint_invalidate_aarch64
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_aarch64
|
||||
#define extractFloatx80Frac extractFloatx80Frac_aarch64
|
||||
#define extractFloatx80Sign extractFloatx80Sign_aarch64
|
||||
#define fcntl_setfl fcntl_setfl_aarch64
|
||||
#define fcse_write fcse_write_aarch64
|
||||
#define find_better_copy find_better_copy_aarch64
|
||||
#define find_default_machine find_default_machine_aarch64
|
||||
#define find_desc_by_name find_desc_by_name_aarch64
|
||||
#define find_first_bit find_first_bit_aarch64
|
||||
#define find_last_bit find_last_bit_aarch64
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_aarch64
|
||||
#define find_ram_block find_ram_block_aarch64
|
||||
#define find_ram_offset find_ram_offset_aarch64
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_aarch64
|
||||
#define is_a64 is_a64_aarch64
|
||||
#define is_help_option is_help_option_aarch64
|
||||
#define is_power_of_2 is_power_of_2_aarch64
|
||||
#define isr_read isr_read_aarch64
|
||||
#define is_valid_option_list is_valid_option_list_aarch64
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_aarch64
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_aarch64
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_aarch64
|
||||
#define memory_try_enable_merging memory_try_enable_merging_aarch64
|
||||
#define mktimegm mktimegm_aarch64
|
||||
#define module_call_init module_call_init_aarch64
|
||||
#define module_load module_load_aarch64
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_aarch64
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_aarch64
|
||||
#define parse_type_size parse_type_size_aarch64
|
||||
#define parse_type_str parse_type_str_aarch64
|
||||
#define parse_uint parse_uint_aarch64
|
||||
#define parse_uint_full parse_uint_full_aarch64
|
||||
#define parse_value parse_value_aarch64
|
||||
#define par_write par_write_aarch64
|
||||
#define patch_reloc patch_reloc_aarch64
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_aarch64
|
||||
#define pmuserenr_write pmuserenr_write_aarch64
|
||||
#define pmxevtyper_write pmxevtyper_write_aarch64
|
||||
#define pow2floor pow2floor_aarch64
|
||||
#define print_type_bool print_type_bool_aarch64
|
||||
#define print_type_int print_type_int_aarch64
|
||||
#define print_type_number print_type_number_aarch64
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_aarch64
|
||||
#define qemu_clock_ptr qemu_clock_ptr_aarch64
|
||||
#define qemu_clocks qemu_clocks_aarch64
|
||||
#define qemu_fdatasync qemu_fdatasync_aarch64
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_aarch64
|
||||
#define qemu_get_cpu qemu_get_cpu_aarch64
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_aarch64
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_aarch64
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_aarch64
|
||||
#define qemu_st_helpers qemu_st_helpers_aarch64
|
||||
#define qemu_strnlen qemu_strnlen_aarch64
|
||||
#define qemu_strsep qemu_strsep_aarch64
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_aarch64
|
||||
#define qemu_try_memalign qemu_try_memalign_aarch64
|
||||
#define qentry_destroy qentry_destroy_aarch64
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_aarch64
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_aarch64
|
||||
#define size_code_gen_buffer size_code_gen_buffer_aarch64
|
||||
#define slow_bitmap_and slow_bitmap_and_aarch64
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_aarch64
|
||||
#define slow_bitmap_complement slow_bitmap_complement_aarch64
|
||||
#define slow_bitmap_empty slow_bitmap_empty_aarch64
|
||||
#define slow_bitmap_equal slow_bitmap_equal_aarch64
|
||||
#define slow_bitmap_full slow_bitmap_full_aarch64
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_aarch64
|
||||
#define slow_bitmap_or slow_bitmap_or_aarch64
|
||||
#define slow_bitmap_xor slow_bitmap_xor_aarch64
|
||||
#define softmmu_lock_user softmmu_lock_user_aarch64
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_aarch64
|
||||
#define softmmu_tget32 softmmu_tget32_aarch64
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_aarch64
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_aarch64
|
||||
#define string_input_visitor_new string_input_visitor_new_aarch64
|
||||
#define stristart stristart_aarch64
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_aarch64
|
||||
#define strpadcpy strpadcpy_aarch64
|
||||
#define strstart strstart_aarch64
|
||||
#define strtosz strtosz_aarch64
|
||||
#define strtosz_suffix strtosz_suffix_aarch64
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_aarch64
|
||||
#define uint64_to_float32 uint64_to_float32_aarch64
|
||||
#define uint64_to_float64 uint64_to_float64_aarch64
|
||||
#define uleb128_decode_small uleb128_decode_small_aarch64
|
||||
#define uleb128_encode_small uleb128_encode_small_aarch64
|
||||
#define unassigned_io_ops unassigned_io_ops_aarch64
|
||||
#define unassigned_io_read unassigned_io_read_aarch64
|
||||
#define unassigned_io_write unassigned_io_write_aarch64
|
||||
|
30
qemu/arm.h
30
qemu/arm.h
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_arm
|
||||
#define addrrange_shift addrrange_shift_arm
|
||||
#define adjust_endianness adjust_endianness_arm
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_arm
|
||||
#define AES_decrypt AES_decrypt_arm
|
||||
#define AES_encrypt AES_encrypt_arm
|
||||
#define AES_imc AES_imc_arm
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_arm
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_arm
|
||||
#define all_helpers all_helpers_arm
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_arm
|
||||
#define alloc_entry alloc_entry_arm
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_arm
|
||||
#define bad_mode_switch bad_mode_switch_arm
|
||||
#define bank_number bank_number_arm
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_arm
|
||||
#define bitmap_zero_extend bitmap_zero_extend_arm
|
||||
#define bp_wp_matches bp_wp_matches_arm
|
||||
#define breakpoint_invalidate breakpoint_invalidate_arm
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_arm
|
||||
#define extractFloatx80Frac extractFloatx80Frac_arm
|
||||
#define extractFloatx80Sign extractFloatx80Sign_arm
|
||||
#define fcntl_setfl fcntl_setfl_arm
|
||||
#define fcse_write fcse_write_arm
|
||||
#define find_better_copy find_better_copy_arm
|
||||
#define find_default_machine find_default_machine_arm
|
||||
#define find_desc_by_name find_desc_by_name_arm
|
||||
#define find_first_bit find_first_bit_arm
|
||||
#define find_last_bit find_last_bit_arm
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_arm
|
||||
#define find_ram_block find_ram_block_arm
|
||||
#define find_ram_offset find_ram_offset_arm
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_arm
|
||||
#define is_a64 is_a64_arm
|
||||
#define is_help_option is_help_option_arm
|
||||
#define is_power_of_2 is_power_of_2_arm
|
||||
#define isr_read isr_read_arm
|
||||
#define is_valid_option_list is_valid_option_list_arm
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_arm
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_arm
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_arm
|
||||
#define memory_try_enable_merging memory_try_enable_merging_arm
|
||||
#define mktimegm mktimegm_arm
|
||||
#define module_call_init module_call_init_arm
|
||||
#define module_load module_load_arm
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_arm
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_arm
|
||||
#define parse_type_size parse_type_size_arm
|
||||
#define parse_type_str parse_type_str_arm
|
||||
#define parse_uint parse_uint_arm
|
||||
#define parse_uint_full parse_uint_full_arm
|
||||
#define parse_value parse_value_arm
|
||||
#define par_write par_write_arm
|
||||
#define patch_reloc patch_reloc_arm
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_arm
|
||||
#define pmuserenr_write pmuserenr_write_arm
|
||||
#define pmxevtyper_write pmxevtyper_write_arm
|
||||
#define pow2floor pow2floor_arm
|
||||
#define print_type_bool print_type_bool_arm
|
||||
#define print_type_int print_type_int_arm
|
||||
#define print_type_number print_type_number_arm
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_arm
|
||||
#define qemu_clock_ptr qemu_clock_ptr_arm
|
||||
#define qemu_clocks qemu_clocks_arm
|
||||
#define qemu_fdatasync qemu_fdatasync_arm
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_arm
|
||||
#define qemu_get_cpu qemu_get_cpu_arm
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_arm
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_arm
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_arm
|
||||
#define qemu_st_helpers qemu_st_helpers_arm
|
||||
#define qemu_strnlen qemu_strnlen_arm
|
||||
#define qemu_strsep qemu_strsep_arm
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_arm
|
||||
#define qemu_try_memalign qemu_try_memalign_arm
|
||||
#define qentry_destroy qentry_destroy_arm
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_arm
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_arm
|
||||
#define size_code_gen_buffer size_code_gen_buffer_arm
|
||||
#define slow_bitmap_and slow_bitmap_and_arm
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_arm
|
||||
#define slow_bitmap_complement slow_bitmap_complement_arm
|
||||
#define slow_bitmap_empty slow_bitmap_empty_arm
|
||||
#define slow_bitmap_equal slow_bitmap_equal_arm
|
||||
#define slow_bitmap_full slow_bitmap_full_arm
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_arm
|
||||
#define slow_bitmap_or slow_bitmap_or_arm
|
||||
#define slow_bitmap_xor slow_bitmap_xor_arm
|
||||
#define softmmu_lock_user softmmu_lock_user_arm
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_arm
|
||||
#define softmmu_tget32 softmmu_tget32_arm
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_arm
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_arm
|
||||
#define string_input_visitor_new string_input_visitor_new_arm
|
||||
#define stristart stristart_arm
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_arm
|
||||
#define strpadcpy strpadcpy_arm
|
||||
#define strstart strstart_arm
|
||||
#define strtosz strtosz_arm
|
||||
#define strtosz_suffix strtosz_suffix_arm
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_arm
|
||||
#define uint64_to_float32 uint64_to_float32_arm
|
||||
#define uint64_to_float64 uint64_to_float64_arm
|
||||
#define uleb128_decode_small uleb128_decode_small_arm
|
||||
#define uleb128_encode_small uleb128_encode_small_arm
|
||||
#define unassigned_io_ops unassigned_io_ops_arm
|
||||
#define unassigned_io_read unassigned_io_read_arm
|
||||
#define unassigned_io_write unassigned_io_write_arm
|
||||
|
@ -88,12 +88,6 @@ symbols = (
|
||||
'addrrange_make',
|
||||
'addrrange_shift',
|
||||
'adjust_endianness',
|
||||
'AES_cbc_encrypt',
|
||||
'AES_decrypt',
|
||||
'AES_encrypt',
|
||||
'AES_imc',
|
||||
'AES_set_decrypt_key',
|
||||
'AES_set_encrypt_key',
|
||||
'all_helpers',
|
||||
'alloc_code_gen_buffer',
|
||||
'alloc_entry',
|
||||
@ -163,7 +157,6 @@ symbols = (
|
||||
'ats_write',
|
||||
'bad_mode_switch',
|
||||
'bank_number',
|
||||
'bitmap_find_next_zero_area',
|
||||
'bitmap_zero_extend',
|
||||
'bp_wp_matches',
|
||||
'breakpoint_invalidate',
|
||||
@ -400,13 +393,11 @@ symbols = (
|
||||
'extractFloatx80Exp',
|
||||
'extractFloatx80Frac',
|
||||
'extractFloatx80Sign',
|
||||
'fcntl_setfl',
|
||||
'fcse_write',
|
||||
'find_better_copy',
|
||||
'find_default_machine',
|
||||
'find_desc_by_name',
|
||||
'find_first_bit',
|
||||
'find_last_bit',
|
||||
'find_paging_enabled_cpu',
|
||||
'find_ram_block',
|
||||
'find_ram_offset',
|
||||
@ -1957,7 +1948,6 @@ symbols = (
|
||||
'io_writew',
|
||||
'is_a64',
|
||||
'is_help_option',
|
||||
'is_power_of_2',
|
||||
'isr_read',
|
||||
'is_valid_option_list',
|
||||
'iwmmxt_load_creg',
|
||||
@ -2105,7 +2095,6 @@ symbols = (
|
||||
'memory_region_write_accessor',
|
||||
'memory_region_wrong_endianness',
|
||||
'memory_try_enable_merging',
|
||||
'mktimegm',
|
||||
'module_call_init',
|
||||
'module_load',
|
||||
'mpidr_cp_reginfo',
|
||||
@ -2241,8 +2230,6 @@ symbols = (
|
||||
'parse_type_number',
|
||||
'parse_type_size',
|
||||
'parse_type_str',
|
||||
'parse_uint',
|
||||
'parse_uint_full',
|
||||
'parse_value',
|
||||
'par_write',
|
||||
'patch_reloc',
|
||||
@ -2279,7 +2266,6 @@ symbols = (
|
||||
'pmsav5_insn_ap_write',
|
||||
'pmuserenr_write',
|
||||
'pmxevtyper_write',
|
||||
'pow2floor',
|
||||
'print_type_bool',
|
||||
'print_type_int',
|
||||
'print_type_number',
|
||||
@ -2404,7 +2390,6 @@ symbols = (
|
||||
'qemu_clock_get_us',
|
||||
'qemu_clock_ptr',
|
||||
'qemu_clocks',
|
||||
'qemu_fdatasync',
|
||||
'qemu_flush_coalesced_mmio_buffer',
|
||||
'qemu_get_cpu',
|
||||
'qemu_get_guest_memory_mapping',
|
||||
@ -2459,8 +2444,6 @@ symbols = (
|
||||
'qemu_ram_unset_idstr',
|
||||
'qemu_real_host_page_size',
|
||||
'qemu_st_helpers',
|
||||
'qemu_strnlen',
|
||||
'qemu_strsep',
|
||||
'qemu_tcg_init_vcpu',
|
||||
'qemu_try_memalign',
|
||||
'qentry_destroy',
|
||||
@ -2615,15 +2598,6 @@ symbols = (
|
||||
'shortShift192Left',
|
||||
'simple_mpu_ap_bits',
|
||||
'size_code_gen_buffer',
|
||||
'slow_bitmap_and',
|
||||
'slow_bitmap_andnot',
|
||||
'slow_bitmap_complement',
|
||||
'slow_bitmap_empty',
|
||||
'slow_bitmap_equal',
|
||||
'slow_bitmap_full',
|
||||
'slow_bitmap_intersects',
|
||||
'slow_bitmap_or',
|
||||
'slow_bitmap_xor',
|
||||
'softmmu_lock_user',
|
||||
'softmmu_lock_user_string',
|
||||
'softmmu_tget32',
|
||||
@ -2660,9 +2634,7 @@ symbols = (
|
||||
'string_input_get_visitor',
|
||||
'string_input_visitor_cleanup',
|
||||
'string_input_visitor_new',
|
||||
'stristart',
|
||||
'strongarm_cp_reginfo',
|
||||
'strpadcpy',
|
||||
'strstart',
|
||||
'strtosz',
|
||||
'strtosz_suffix',
|
||||
@ -3038,8 +3010,6 @@ symbols = (
|
||||
'uint64_to_float128',
|
||||
'uint64_to_float32',
|
||||
'uint64_to_float64',
|
||||
'uleb128_decode_small',
|
||||
'uleb128_encode_small',
|
||||
'unassigned_io_ops',
|
||||
'unassigned_io_read',
|
||||
'unassigned_io_write',
|
||||
|
@ -93,16 +93,8 @@ int qemu_ftruncate64(int, int64_t);
|
||||
#if !defined(ftruncate)
|
||||
# define ftruncate qemu_ftruncate64
|
||||
#endif
|
||||
|
||||
static inline char *realpath(const char *path, char *resolved_path)
|
||||
{
|
||||
_fullpath(resolved_path, path, _MAX_PATH);
|
||||
return resolved_path;
|
||||
}
|
||||
#endif
|
||||
|
||||
void cpu_ticks_init(void);
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/bswap.h"
|
||||
|
||||
@ -111,49 +103,11 @@ void cpu_ticks_init(void);
|
||||
#include "cpu.h"
|
||||
#endif /* !defined(NEED_CPU_H) */
|
||||
|
||||
/* main function, renamed */
|
||||
#if defined(CONFIG_COCOA)
|
||||
int qemu_main(int argc, char **argv, char **envp);
|
||||
#endif
|
||||
|
||||
void qemu_get_timedate(struct tm *tm, int offset);
|
||||
int qemu_timedate_diff(struct tm *tm);
|
||||
|
||||
/**
|
||||
* is_help_option:
|
||||
* @s: string to test
|
||||
*
|
||||
* Check whether @s is one of the standard strings which indicate
|
||||
* that the user is asking for a list of the valid values for a
|
||||
* command option like -cpu or -M. The current accepted strings
|
||||
* are 'help' and '?'. '?' is deprecated (it is a shell wildcard
|
||||
* which makes it annoying to use in a reliable way) but provided
|
||||
* for backwards compatibility.
|
||||
*
|
||||
* Returns: true if @s is a request for a list.
|
||||
*/
|
||||
static inline bool is_help_option(const char *s)
|
||||
{
|
||||
return !strcmp(s, "?") || !strcmp(s, "help");
|
||||
}
|
||||
|
||||
/* cutils.c */
|
||||
void pstrcpy(char *buf, int buf_size, const char *str);
|
||||
void strpadcpy(char *buf, int buf_size, const char *str, char pad);
|
||||
char *pstrcat(char *buf, int buf_size, const char *s);
|
||||
int strstart(const char *str, const char *val, const char **ptr);
|
||||
int stristart(const char *str, const char *val, const char **ptr);
|
||||
int qemu_strnlen(const char *s, int max_len);
|
||||
char *qemu_strsep(char **input, const char *delim);
|
||||
time_t mktimegm(struct tm *tm);
|
||||
int qemu_fls(int i);
|
||||
int qemu_fdatasync(int fd);
|
||||
int fcntl_setfl(int fd, int flag);
|
||||
int qemu_parse_fd(const char *param);
|
||||
|
||||
int parse_uint(const char *s, unsigned long long *value, char **endptr,
|
||||
int base);
|
||||
int parse_uint_full(const char *s, unsigned long long *value, int base);
|
||||
|
||||
/*
|
||||
* strtosz() suffixes used to specify the default treatment of an
|
||||
@ -177,13 +131,6 @@ int64_t strtosz_suffix_unit(const char *nptr, char **end,
|
||||
/* used to print char* safely */
|
||||
#define STR_OR_NULL(str) ((str) ? (str) : "null")
|
||||
|
||||
/* id.c */
|
||||
bool id_wellformed(const char *id);
|
||||
|
||||
/* path.c */
|
||||
void init_paths(const char *prefix);
|
||||
const char *path(const char *pathname);
|
||||
|
||||
#define qemu_isalnum(c) isalnum((unsigned char)(c))
|
||||
#define qemu_isalpha(c) isalpha((unsigned char)(c))
|
||||
#define qemu_iscntrl(c) iscntrl((unsigned char)(c))
|
||||
@ -202,19 +149,6 @@ const char *path(const char *pathname);
|
||||
|
||||
void *qemu_oom_check(void *ptr);
|
||||
|
||||
ssize_t qemu_write_full(int fd, const void *buf, size_t count)
|
||||
QEMU_WARN_UNUSED_RESULT;
|
||||
ssize_t qemu_send_full(int fd, const void *buf, size_t count, int flags)
|
||||
QEMU_WARN_UNUSED_RESULT;
|
||||
ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags)
|
||||
QEMU_WARN_UNUSED_RESULT;
|
||||
|
||||
#ifndef _WIN32
|
||||
int qemu_pipe(int pipefd[2]);
|
||||
/* like openpty() but also makes it raw; return master fd */
|
||||
int qemu_openpty_raw(int *aslave, char *pty_name);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
/* MinGW needs type casts for the 'buf' and 'optval' arguments. */
|
||||
#define qemu_getsockopt(sockfd, level, optname, optval, optlen) \
|
||||
@ -242,26 +176,6 @@ bool tcg_enabled(struct uc_struct *uc);
|
||||
struct uc_struct;
|
||||
void cpu_exec_init_all(struct uc_struct *uc);
|
||||
|
||||
/* work queue */
|
||||
struct qemu_work_item {
|
||||
struct qemu_work_item *next;
|
||||
void (*func)(void *data);
|
||||
void *data;
|
||||
int done;
|
||||
bool free;
|
||||
};
|
||||
|
||||
/* Convert a byte between binary and BCD. */
|
||||
static inline uint8_t to_bcd(uint8_t val)
|
||||
{
|
||||
return ((val / 10) << 4) | (val % 10);
|
||||
}
|
||||
|
||||
static inline uint8_t from_bcd(uint8_t val)
|
||||
{
|
||||
return ((val >> 4) * 10) + (val & 0x0f);
|
||||
}
|
||||
|
||||
/* compute with 96 bit intermediate result: (a*b)/c */
|
||||
static inline uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
|
||||
{
|
||||
@ -292,37 +206,8 @@ static inline uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
|
||||
/* Round number up to multiple */
|
||||
#define QEMU_ALIGN_UP(n, m) QEMU_ALIGN_DOWN((n) + (m) - 1, (m))
|
||||
|
||||
static inline bool is_power_of_2(uint64_t value)
|
||||
{
|
||||
if (!value) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return !(value & (value - 1));
|
||||
}
|
||||
|
||||
/* round down to the nearest power of 2*/
|
||||
int64_t pow2floor(int64_t value);
|
||||
|
||||
#include "qemu/module.h"
|
||||
|
||||
/*
|
||||
* Implementation of ULEB128 (http://en.wikipedia.org/wiki/LEB128)
|
||||
* Input is limited to 14-bit numbers
|
||||
*/
|
||||
|
||||
int uleb128_encode_small(uint8_t *out, uint32_t n);
|
||||
int uleb128_decode_small(const uint8_t *in, uint32_t *n);
|
||||
|
||||
/* unicode.c */
|
||||
int mod_utf8_codepoint(const char *s, size_t n, char **end);
|
||||
|
||||
/*
|
||||
* Hexdump a buffer to a file. An optional string prefix is added to every line
|
||||
*/
|
||||
|
||||
void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);
|
||||
|
||||
/* vector definitions */
|
||||
#ifdef __ALTIVEC__
|
||||
#include <altivec.h>
|
||||
|
@ -119,16 +119,6 @@ static inline int test_bit(long nr, const unsigned long *addr)
|
||||
return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
|
||||
}
|
||||
|
||||
/**
|
||||
* find_last_bit - find the last set bit in a memory region
|
||||
* @addr: The address to start the search at
|
||||
* @size: The maximum size to search
|
||||
*
|
||||
* Returns the bit number of the first set bit, or size.
|
||||
*/
|
||||
unsigned long find_last_bit(const unsigned long *addr,
|
||||
unsigned long size);
|
||||
|
||||
/**
|
||||
* find_next_bit - find the next set bit in a memory region
|
||||
* @addr: The address to base the search on
|
||||
|
30
qemu/m68k.h
30
qemu/m68k.h
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_m68k
|
||||
#define addrrange_shift addrrange_shift_m68k
|
||||
#define adjust_endianness adjust_endianness_m68k
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_m68k
|
||||
#define AES_decrypt AES_decrypt_m68k
|
||||
#define AES_encrypt AES_encrypt_m68k
|
||||
#define AES_imc AES_imc_m68k
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_m68k
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_m68k
|
||||
#define all_helpers all_helpers_m68k
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_m68k
|
||||
#define alloc_entry alloc_entry_m68k
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_m68k
|
||||
#define bad_mode_switch bad_mode_switch_m68k
|
||||
#define bank_number bank_number_m68k
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_m68k
|
||||
#define bitmap_zero_extend bitmap_zero_extend_m68k
|
||||
#define bp_wp_matches bp_wp_matches_m68k
|
||||
#define breakpoint_invalidate breakpoint_invalidate_m68k
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_m68k
|
||||
#define extractFloatx80Frac extractFloatx80Frac_m68k
|
||||
#define extractFloatx80Sign extractFloatx80Sign_m68k
|
||||
#define fcntl_setfl fcntl_setfl_m68k
|
||||
#define fcse_write fcse_write_m68k
|
||||
#define find_better_copy find_better_copy_m68k
|
||||
#define find_default_machine find_default_machine_m68k
|
||||
#define find_desc_by_name find_desc_by_name_m68k
|
||||
#define find_first_bit find_first_bit_m68k
|
||||
#define find_last_bit find_last_bit_m68k
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_m68k
|
||||
#define find_ram_block find_ram_block_m68k
|
||||
#define find_ram_offset find_ram_offset_m68k
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_m68k
|
||||
#define is_a64 is_a64_m68k
|
||||
#define is_help_option is_help_option_m68k
|
||||
#define is_power_of_2 is_power_of_2_m68k
|
||||
#define isr_read isr_read_m68k
|
||||
#define is_valid_option_list is_valid_option_list_m68k
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_m68k
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_m68k
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_m68k
|
||||
#define memory_try_enable_merging memory_try_enable_merging_m68k
|
||||
#define mktimegm mktimegm_m68k
|
||||
#define module_call_init module_call_init_m68k
|
||||
#define module_load module_load_m68k
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_m68k
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_m68k
|
||||
#define parse_type_size parse_type_size_m68k
|
||||
#define parse_type_str parse_type_str_m68k
|
||||
#define parse_uint parse_uint_m68k
|
||||
#define parse_uint_full parse_uint_full_m68k
|
||||
#define parse_value parse_value_m68k
|
||||
#define par_write par_write_m68k
|
||||
#define patch_reloc patch_reloc_m68k
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_m68k
|
||||
#define pmuserenr_write pmuserenr_write_m68k
|
||||
#define pmxevtyper_write pmxevtyper_write_m68k
|
||||
#define pow2floor pow2floor_m68k
|
||||
#define print_type_bool print_type_bool_m68k
|
||||
#define print_type_int print_type_int_m68k
|
||||
#define print_type_number print_type_number_m68k
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_m68k
|
||||
#define qemu_clock_ptr qemu_clock_ptr_m68k
|
||||
#define qemu_clocks qemu_clocks_m68k
|
||||
#define qemu_fdatasync qemu_fdatasync_m68k
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_m68k
|
||||
#define qemu_get_cpu qemu_get_cpu_m68k
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_m68k
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_m68k
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_m68k
|
||||
#define qemu_st_helpers qemu_st_helpers_m68k
|
||||
#define qemu_strnlen qemu_strnlen_m68k
|
||||
#define qemu_strsep qemu_strsep_m68k
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_m68k
|
||||
#define qemu_try_memalign qemu_try_memalign_m68k
|
||||
#define qentry_destroy qentry_destroy_m68k
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_m68k
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_m68k
|
||||
#define size_code_gen_buffer size_code_gen_buffer_m68k
|
||||
#define slow_bitmap_and slow_bitmap_and_m68k
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_m68k
|
||||
#define slow_bitmap_complement slow_bitmap_complement_m68k
|
||||
#define slow_bitmap_empty slow_bitmap_empty_m68k
|
||||
#define slow_bitmap_equal slow_bitmap_equal_m68k
|
||||
#define slow_bitmap_full slow_bitmap_full_m68k
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_m68k
|
||||
#define slow_bitmap_or slow_bitmap_or_m68k
|
||||
#define slow_bitmap_xor slow_bitmap_xor_m68k
|
||||
#define softmmu_lock_user softmmu_lock_user_m68k
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_m68k
|
||||
#define softmmu_tget32 softmmu_tget32_m68k
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_m68k
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_m68k
|
||||
#define string_input_visitor_new string_input_visitor_new_m68k
|
||||
#define stristart stristart_m68k
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_m68k
|
||||
#define strpadcpy strpadcpy_m68k
|
||||
#define strstart strstart_m68k
|
||||
#define strtosz strtosz_m68k
|
||||
#define strtosz_suffix strtosz_suffix_m68k
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_m68k
|
||||
#define uint64_to_float32 uint64_to_float32_m68k
|
||||
#define uint64_to_float64 uint64_to_float64_m68k
|
||||
#define uleb128_decode_small uleb128_decode_small_m68k
|
||||
#define uleb128_encode_small uleb128_encode_small_m68k
|
||||
#define unassigned_io_ops unassigned_io_ops_m68k
|
||||
#define unassigned_io_read unassigned_io_read_m68k
|
||||
#define unassigned_io_write unassigned_io_write_m68k
|
||||
|
30
qemu/mips.h
30
qemu/mips.h
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_mips
|
||||
#define addrrange_shift addrrange_shift_mips
|
||||
#define adjust_endianness adjust_endianness_mips
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_mips
|
||||
#define AES_decrypt AES_decrypt_mips
|
||||
#define AES_encrypt AES_encrypt_mips
|
||||
#define AES_imc AES_imc_mips
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_mips
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_mips
|
||||
#define all_helpers all_helpers_mips
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_mips
|
||||
#define alloc_entry alloc_entry_mips
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_mips
|
||||
#define bad_mode_switch bad_mode_switch_mips
|
||||
#define bank_number bank_number_mips
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_mips
|
||||
#define bitmap_zero_extend bitmap_zero_extend_mips
|
||||
#define bp_wp_matches bp_wp_matches_mips
|
||||
#define breakpoint_invalidate breakpoint_invalidate_mips
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_mips
|
||||
#define extractFloatx80Frac extractFloatx80Frac_mips
|
||||
#define extractFloatx80Sign extractFloatx80Sign_mips
|
||||
#define fcntl_setfl fcntl_setfl_mips
|
||||
#define fcse_write fcse_write_mips
|
||||
#define find_better_copy find_better_copy_mips
|
||||
#define find_default_machine find_default_machine_mips
|
||||
#define find_desc_by_name find_desc_by_name_mips
|
||||
#define find_first_bit find_first_bit_mips
|
||||
#define find_last_bit find_last_bit_mips
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_mips
|
||||
#define find_ram_block find_ram_block_mips
|
||||
#define find_ram_offset find_ram_offset_mips
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_mips
|
||||
#define is_a64 is_a64_mips
|
||||
#define is_help_option is_help_option_mips
|
||||
#define is_power_of_2 is_power_of_2_mips
|
||||
#define isr_read isr_read_mips
|
||||
#define is_valid_option_list is_valid_option_list_mips
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_mips
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_mips
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_mips
|
||||
#define memory_try_enable_merging memory_try_enable_merging_mips
|
||||
#define mktimegm mktimegm_mips
|
||||
#define module_call_init module_call_init_mips
|
||||
#define module_load module_load_mips
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_mips
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_mips
|
||||
#define parse_type_size parse_type_size_mips
|
||||
#define parse_type_str parse_type_str_mips
|
||||
#define parse_uint parse_uint_mips
|
||||
#define parse_uint_full parse_uint_full_mips
|
||||
#define parse_value parse_value_mips
|
||||
#define par_write par_write_mips
|
||||
#define patch_reloc patch_reloc_mips
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_mips
|
||||
#define pmuserenr_write pmuserenr_write_mips
|
||||
#define pmxevtyper_write pmxevtyper_write_mips
|
||||
#define pow2floor pow2floor_mips
|
||||
#define print_type_bool print_type_bool_mips
|
||||
#define print_type_int print_type_int_mips
|
||||
#define print_type_number print_type_number_mips
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_mips
|
||||
#define qemu_clock_ptr qemu_clock_ptr_mips
|
||||
#define qemu_clocks qemu_clocks_mips
|
||||
#define qemu_fdatasync qemu_fdatasync_mips
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_mips
|
||||
#define qemu_get_cpu qemu_get_cpu_mips
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_mips
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_mips
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_mips
|
||||
#define qemu_st_helpers qemu_st_helpers_mips
|
||||
#define qemu_strnlen qemu_strnlen_mips
|
||||
#define qemu_strsep qemu_strsep_mips
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_mips
|
||||
#define qemu_try_memalign qemu_try_memalign_mips
|
||||
#define qentry_destroy qentry_destroy_mips
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_mips
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_mips
|
||||
#define size_code_gen_buffer size_code_gen_buffer_mips
|
||||
#define slow_bitmap_and slow_bitmap_and_mips
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_mips
|
||||
#define slow_bitmap_complement slow_bitmap_complement_mips
|
||||
#define slow_bitmap_empty slow_bitmap_empty_mips
|
||||
#define slow_bitmap_equal slow_bitmap_equal_mips
|
||||
#define slow_bitmap_full slow_bitmap_full_mips
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_mips
|
||||
#define slow_bitmap_or slow_bitmap_or_mips
|
||||
#define slow_bitmap_xor slow_bitmap_xor_mips
|
||||
#define softmmu_lock_user softmmu_lock_user_mips
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_mips
|
||||
#define softmmu_tget32 softmmu_tget32_mips
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_mips
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_mips
|
||||
#define string_input_visitor_new string_input_visitor_new_mips
|
||||
#define stristart stristart_mips
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_mips
|
||||
#define strpadcpy strpadcpy_mips
|
||||
#define strstart strstart_mips
|
||||
#define strtosz strtosz_mips
|
||||
#define strtosz_suffix strtosz_suffix_mips
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_mips
|
||||
#define uint64_to_float32 uint64_to_float32_mips
|
||||
#define uint64_to_float64 uint64_to_float64_mips
|
||||
#define uleb128_decode_small uleb128_decode_small_mips
|
||||
#define uleb128_encode_small uleb128_encode_small_mips
|
||||
#define unassigned_io_ops unassigned_io_ops_mips
|
||||
#define unassigned_io_read unassigned_io_read_mips
|
||||
#define unassigned_io_write unassigned_io_write_mips
|
||||
|
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_mips64
|
||||
#define addrrange_shift addrrange_shift_mips64
|
||||
#define adjust_endianness adjust_endianness_mips64
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_mips64
|
||||
#define AES_decrypt AES_decrypt_mips64
|
||||
#define AES_encrypt AES_encrypt_mips64
|
||||
#define AES_imc AES_imc_mips64
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_mips64
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_mips64
|
||||
#define all_helpers all_helpers_mips64
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_mips64
|
||||
#define alloc_entry alloc_entry_mips64
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_mips64
|
||||
#define bad_mode_switch bad_mode_switch_mips64
|
||||
#define bank_number bank_number_mips64
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_mips64
|
||||
#define bitmap_zero_extend bitmap_zero_extend_mips64
|
||||
#define bp_wp_matches bp_wp_matches_mips64
|
||||
#define breakpoint_invalidate breakpoint_invalidate_mips64
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_mips64
|
||||
#define extractFloatx80Frac extractFloatx80Frac_mips64
|
||||
#define extractFloatx80Sign extractFloatx80Sign_mips64
|
||||
#define fcntl_setfl fcntl_setfl_mips64
|
||||
#define fcse_write fcse_write_mips64
|
||||
#define find_better_copy find_better_copy_mips64
|
||||
#define find_default_machine find_default_machine_mips64
|
||||
#define find_desc_by_name find_desc_by_name_mips64
|
||||
#define find_first_bit find_first_bit_mips64
|
||||
#define find_last_bit find_last_bit_mips64
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_mips64
|
||||
#define find_ram_block find_ram_block_mips64
|
||||
#define find_ram_offset find_ram_offset_mips64
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_mips64
|
||||
#define is_a64 is_a64_mips64
|
||||
#define is_help_option is_help_option_mips64
|
||||
#define is_power_of_2 is_power_of_2_mips64
|
||||
#define isr_read isr_read_mips64
|
||||
#define is_valid_option_list is_valid_option_list_mips64
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_mips64
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_mips64
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_mips64
|
||||
#define memory_try_enable_merging memory_try_enable_merging_mips64
|
||||
#define mktimegm mktimegm_mips64
|
||||
#define module_call_init module_call_init_mips64
|
||||
#define module_load module_load_mips64
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_mips64
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_mips64
|
||||
#define parse_type_size parse_type_size_mips64
|
||||
#define parse_type_str parse_type_str_mips64
|
||||
#define parse_uint parse_uint_mips64
|
||||
#define parse_uint_full parse_uint_full_mips64
|
||||
#define parse_value parse_value_mips64
|
||||
#define par_write par_write_mips64
|
||||
#define patch_reloc patch_reloc_mips64
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_mips64
|
||||
#define pmuserenr_write pmuserenr_write_mips64
|
||||
#define pmxevtyper_write pmxevtyper_write_mips64
|
||||
#define pow2floor pow2floor_mips64
|
||||
#define print_type_bool print_type_bool_mips64
|
||||
#define print_type_int print_type_int_mips64
|
||||
#define print_type_number print_type_number_mips64
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_mips64
|
||||
#define qemu_clock_ptr qemu_clock_ptr_mips64
|
||||
#define qemu_clocks qemu_clocks_mips64
|
||||
#define qemu_fdatasync qemu_fdatasync_mips64
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_mips64
|
||||
#define qemu_get_cpu qemu_get_cpu_mips64
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_mips64
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_mips64
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_mips64
|
||||
#define qemu_st_helpers qemu_st_helpers_mips64
|
||||
#define qemu_strnlen qemu_strnlen_mips64
|
||||
#define qemu_strsep qemu_strsep_mips64
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_mips64
|
||||
#define qemu_try_memalign qemu_try_memalign_mips64
|
||||
#define qentry_destroy qentry_destroy_mips64
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_mips64
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_mips64
|
||||
#define size_code_gen_buffer size_code_gen_buffer_mips64
|
||||
#define slow_bitmap_and slow_bitmap_and_mips64
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_mips64
|
||||
#define slow_bitmap_complement slow_bitmap_complement_mips64
|
||||
#define slow_bitmap_empty slow_bitmap_empty_mips64
|
||||
#define slow_bitmap_equal slow_bitmap_equal_mips64
|
||||
#define slow_bitmap_full slow_bitmap_full_mips64
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_mips64
|
||||
#define slow_bitmap_or slow_bitmap_or_mips64
|
||||
#define slow_bitmap_xor slow_bitmap_xor_mips64
|
||||
#define softmmu_lock_user softmmu_lock_user_mips64
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_mips64
|
||||
#define softmmu_tget32 softmmu_tget32_mips64
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_mips64
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_mips64
|
||||
#define string_input_visitor_new string_input_visitor_new_mips64
|
||||
#define stristart stristart_mips64
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_mips64
|
||||
#define strpadcpy strpadcpy_mips64
|
||||
#define strstart strstart_mips64
|
||||
#define strtosz strtosz_mips64
|
||||
#define strtosz_suffix strtosz_suffix_mips64
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_mips64
|
||||
#define uint64_to_float32 uint64_to_float32_mips64
|
||||
#define uint64_to_float64 uint64_to_float64_mips64
|
||||
#define uleb128_decode_small uleb128_decode_small_mips64
|
||||
#define uleb128_encode_small uleb128_encode_small_mips64
|
||||
#define unassigned_io_ops unassigned_io_ops_mips64
|
||||
#define unassigned_io_read unassigned_io_read_mips64
|
||||
#define unassigned_io_write unassigned_io_write_mips64
|
||||
|
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_mips64el
|
||||
#define addrrange_shift addrrange_shift_mips64el
|
||||
#define adjust_endianness adjust_endianness_mips64el
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_mips64el
|
||||
#define AES_decrypt AES_decrypt_mips64el
|
||||
#define AES_encrypt AES_encrypt_mips64el
|
||||
#define AES_imc AES_imc_mips64el
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_mips64el
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_mips64el
|
||||
#define all_helpers all_helpers_mips64el
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_mips64el
|
||||
#define alloc_entry alloc_entry_mips64el
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_mips64el
|
||||
#define bad_mode_switch bad_mode_switch_mips64el
|
||||
#define bank_number bank_number_mips64el
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_mips64el
|
||||
#define bitmap_zero_extend bitmap_zero_extend_mips64el
|
||||
#define bp_wp_matches bp_wp_matches_mips64el
|
||||
#define breakpoint_invalidate breakpoint_invalidate_mips64el
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_mips64el
|
||||
#define extractFloatx80Frac extractFloatx80Frac_mips64el
|
||||
#define extractFloatx80Sign extractFloatx80Sign_mips64el
|
||||
#define fcntl_setfl fcntl_setfl_mips64el
|
||||
#define fcse_write fcse_write_mips64el
|
||||
#define find_better_copy find_better_copy_mips64el
|
||||
#define find_default_machine find_default_machine_mips64el
|
||||
#define find_desc_by_name find_desc_by_name_mips64el
|
||||
#define find_first_bit find_first_bit_mips64el
|
||||
#define find_last_bit find_last_bit_mips64el
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_mips64el
|
||||
#define find_ram_block find_ram_block_mips64el
|
||||
#define find_ram_offset find_ram_offset_mips64el
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_mips64el
|
||||
#define is_a64 is_a64_mips64el
|
||||
#define is_help_option is_help_option_mips64el
|
||||
#define is_power_of_2 is_power_of_2_mips64el
|
||||
#define isr_read isr_read_mips64el
|
||||
#define is_valid_option_list is_valid_option_list_mips64el
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_mips64el
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_mips64el
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_mips64el
|
||||
#define memory_try_enable_merging memory_try_enable_merging_mips64el
|
||||
#define mktimegm mktimegm_mips64el
|
||||
#define module_call_init module_call_init_mips64el
|
||||
#define module_load module_load_mips64el
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_mips64el
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_mips64el
|
||||
#define parse_type_size parse_type_size_mips64el
|
||||
#define parse_type_str parse_type_str_mips64el
|
||||
#define parse_uint parse_uint_mips64el
|
||||
#define parse_uint_full parse_uint_full_mips64el
|
||||
#define parse_value parse_value_mips64el
|
||||
#define par_write par_write_mips64el
|
||||
#define patch_reloc patch_reloc_mips64el
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_mips64el
|
||||
#define pmuserenr_write pmuserenr_write_mips64el
|
||||
#define pmxevtyper_write pmxevtyper_write_mips64el
|
||||
#define pow2floor pow2floor_mips64el
|
||||
#define print_type_bool print_type_bool_mips64el
|
||||
#define print_type_int print_type_int_mips64el
|
||||
#define print_type_number print_type_number_mips64el
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_mips64el
|
||||
#define qemu_clock_ptr qemu_clock_ptr_mips64el
|
||||
#define qemu_clocks qemu_clocks_mips64el
|
||||
#define qemu_fdatasync qemu_fdatasync_mips64el
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_mips64el
|
||||
#define qemu_get_cpu qemu_get_cpu_mips64el
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_mips64el
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_mips64el
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_mips64el
|
||||
#define qemu_st_helpers qemu_st_helpers_mips64el
|
||||
#define qemu_strnlen qemu_strnlen_mips64el
|
||||
#define qemu_strsep qemu_strsep_mips64el
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_mips64el
|
||||
#define qemu_try_memalign qemu_try_memalign_mips64el
|
||||
#define qentry_destroy qentry_destroy_mips64el
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_mips64el
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_mips64el
|
||||
#define size_code_gen_buffer size_code_gen_buffer_mips64el
|
||||
#define slow_bitmap_and slow_bitmap_and_mips64el
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_mips64el
|
||||
#define slow_bitmap_complement slow_bitmap_complement_mips64el
|
||||
#define slow_bitmap_empty slow_bitmap_empty_mips64el
|
||||
#define slow_bitmap_equal slow_bitmap_equal_mips64el
|
||||
#define slow_bitmap_full slow_bitmap_full_mips64el
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_mips64el
|
||||
#define slow_bitmap_or slow_bitmap_or_mips64el
|
||||
#define slow_bitmap_xor slow_bitmap_xor_mips64el
|
||||
#define softmmu_lock_user softmmu_lock_user_mips64el
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_mips64el
|
||||
#define softmmu_tget32 softmmu_tget32_mips64el
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_mips64el
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_mips64el
|
||||
#define string_input_visitor_new string_input_visitor_new_mips64el
|
||||
#define stristart stristart_mips64el
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_mips64el
|
||||
#define strpadcpy strpadcpy_mips64el
|
||||
#define strstart strstart_mips64el
|
||||
#define strtosz strtosz_mips64el
|
||||
#define strtosz_suffix strtosz_suffix_mips64el
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_mips64el
|
||||
#define uint64_to_float32 uint64_to_float32_mips64el
|
||||
#define uint64_to_float64 uint64_to_float64_mips64el
|
||||
#define uleb128_decode_small uleb128_decode_small_mips64el
|
||||
#define uleb128_encode_small uleb128_encode_small_mips64el
|
||||
#define unassigned_io_ops unassigned_io_ops_mips64el
|
||||
#define unassigned_io_read unassigned_io_read_mips64el
|
||||
#define unassigned_io_write unassigned_io_write_mips64el
|
||||
|
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_mipsel
|
||||
#define addrrange_shift addrrange_shift_mipsel
|
||||
#define adjust_endianness adjust_endianness_mipsel
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_mipsel
|
||||
#define AES_decrypt AES_decrypt_mipsel
|
||||
#define AES_encrypt AES_encrypt_mipsel
|
||||
#define AES_imc AES_imc_mipsel
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_mipsel
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_mipsel
|
||||
#define all_helpers all_helpers_mipsel
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_mipsel
|
||||
#define alloc_entry alloc_entry_mipsel
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_mipsel
|
||||
#define bad_mode_switch bad_mode_switch_mipsel
|
||||
#define bank_number bank_number_mipsel
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_mipsel
|
||||
#define bitmap_zero_extend bitmap_zero_extend_mipsel
|
||||
#define bp_wp_matches bp_wp_matches_mipsel
|
||||
#define breakpoint_invalidate breakpoint_invalidate_mipsel
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_mipsel
|
||||
#define extractFloatx80Frac extractFloatx80Frac_mipsel
|
||||
#define extractFloatx80Sign extractFloatx80Sign_mipsel
|
||||
#define fcntl_setfl fcntl_setfl_mipsel
|
||||
#define fcse_write fcse_write_mipsel
|
||||
#define find_better_copy find_better_copy_mipsel
|
||||
#define find_default_machine find_default_machine_mipsel
|
||||
#define find_desc_by_name find_desc_by_name_mipsel
|
||||
#define find_first_bit find_first_bit_mipsel
|
||||
#define find_last_bit find_last_bit_mipsel
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_mipsel
|
||||
#define find_ram_block find_ram_block_mipsel
|
||||
#define find_ram_offset find_ram_offset_mipsel
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_mipsel
|
||||
#define is_a64 is_a64_mipsel
|
||||
#define is_help_option is_help_option_mipsel
|
||||
#define is_power_of_2 is_power_of_2_mipsel
|
||||
#define isr_read isr_read_mipsel
|
||||
#define is_valid_option_list is_valid_option_list_mipsel
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_mipsel
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_mipsel
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_mipsel
|
||||
#define memory_try_enable_merging memory_try_enable_merging_mipsel
|
||||
#define mktimegm mktimegm_mipsel
|
||||
#define module_call_init module_call_init_mipsel
|
||||
#define module_load module_load_mipsel
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_mipsel
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_mipsel
|
||||
#define parse_type_size parse_type_size_mipsel
|
||||
#define parse_type_str parse_type_str_mipsel
|
||||
#define parse_uint parse_uint_mipsel
|
||||
#define parse_uint_full parse_uint_full_mipsel
|
||||
#define parse_value parse_value_mipsel
|
||||
#define par_write par_write_mipsel
|
||||
#define patch_reloc patch_reloc_mipsel
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_mipsel
|
||||
#define pmuserenr_write pmuserenr_write_mipsel
|
||||
#define pmxevtyper_write pmxevtyper_write_mipsel
|
||||
#define pow2floor pow2floor_mipsel
|
||||
#define print_type_bool print_type_bool_mipsel
|
||||
#define print_type_int print_type_int_mipsel
|
||||
#define print_type_number print_type_number_mipsel
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_mipsel
|
||||
#define qemu_clock_ptr qemu_clock_ptr_mipsel
|
||||
#define qemu_clocks qemu_clocks_mipsel
|
||||
#define qemu_fdatasync qemu_fdatasync_mipsel
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_mipsel
|
||||
#define qemu_get_cpu qemu_get_cpu_mipsel
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_mipsel
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_mipsel
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_mipsel
|
||||
#define qemu_st_helpers qemu_st_helpers_mipsel
|
||||
#define qemu_strnlen qemu_strnlen_mipsel
|
||||
#define qemu_strsep qemu_strsep_mipsel
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_mipsel
|
||||
#define qemu_try_memalign qemu_try_memalign_mipsel
|
||||
#define qentry_destroy qentry_destroy_mipsel
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_mipsel
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_mipsel
|
||||
#define size_code_gen_buffer size_code_gen_buffer_mipsel
|
||||
#define slow_bitmap_and slow_bitmap_and_mipsel
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_mipsel
|
||||
#define slow_bitmap_complement slow_bitmap_complement_mipsel
|
||||
#define slow_bitmap_empty slow_bitmap_empty_mipsel
|
||||
#define slow_bitmap_equal slow_bitmap_equal_mipsel
|
||||
#define slow_bitmap_full slow_bitmap_full_mipsel
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_mipsel
|
||||
#define slow_bitmap_or slow_bitmap_or_mipsel
|
||||
#define slow_bitmap_xor slow_bitmap_xor_mipsel
|
||||
#define softmmu_lock_user softmmu_lock_user_mipsel
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_mipsel
|
||||
#define softmmu_tget32 softmmu_tget32_mipsel
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_mipsel
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_mipsel
|
||||
#define string_input_visitor_new string_input_visitor_new_mipsel
|
||||
#define stristart stristart_mipsel
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_mipsel
|
||||
#define strpadcpy strpadcpy_mipsel
|
||||
#define strstart strstart_mipsel
|
||||
#define strtosz strtosz_mipsel
|
||||
#define strtosz_suffix strtosz_suffix_mipsel
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_mipsel
|
||||
#define uint64_to_float32 uint64_to_float32_mipsel
|
||||
#define uint64_to_float64 uint64_to_float64_mipsel
|
||||
#define uleb128_decode_small uleb128_decode_small_mipsel
|
||||
#define uleb128_encode_small uleb128_encode_small_mipsel
|
||||
#define unassigned_io_ops unassigned_io_ops_mipsel
|
||||
#define unassigned_io_read unassigned_io_read_mipsel
|
||||
#define unassigned_io_write unassigned_io_write_mipsel
|
||||
|
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_powerpc
|
||||
#define addrrange_shift addrrange_shift_powerpc
|
||||
#define adjust_endianness adjust_endianness_powerpc
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_powerpc
|
||||
#define AES_decrypt AES_decrypt_powerpc
|
||||
#define AES_encrypt AES_encrypt_powerpc
|
||||
#define AES_imc AES_imc_powerpc
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_powerpc
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_powerpc
|
||||
#define all_helpers all_helpers_powerpc
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_powerpc
|
||||
#define alloc_entry alloc_entry_powerpc
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_powerpc
|
||||
#define bad_mode_switch bad_mode_switch_powerpc
|
||||
#define bank_number bank_number_powerpc
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_powerpc
|
||||
#define bitmap_zero_extend bitmap_zero_extend_powerpc
|
||||
#define bp_wp_matches bp_wp_matches_powerpc
|
||||
#define breakpoint_invalidate breakpoint_invalidate_powerpc
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_powerpc
|
||||
#define extractFloatx80Frac extractFloatx80Frac_powerpc
|
||||
#define extractFloatx80Sign extractFloatx80Sign_powerpc
|
||||
#define fcntl_setfl fcntl_setfl_powerpc
|
||||
#define fcse_write fcse_write_powerpc
|
||||
#define find_better_copy find_better_copy_powerpc
|
||||
#define find_default_machine find_default_machine_powerpc
|
||||
#define find_desc_by_name find_desc_by_name_powerpc
|
||||
#define find_first_bit find_first_bit_powerpc
|
||||
#define find_last_bit find_last_bit_powerpc
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_powerpc
|
||||
#define find_ram_block find_ram_block_powerpc
|
||||
#define find_ram_offset find_ram_offset_powerpc
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_powerpc
|
||||
#define is_a64 is_a64_powerpc
|
||||
#define is_help_option is_help_option_powerpc
|
||||
#define is_power_of_2 is_power_of_2_powerpc
|
||||
#define isr_read isr_read_powerpc
|
||||
#define is_valid_option_list is_valid_option_list_powerpc
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_powerpc
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_powerpc
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_powerpc
|
||||
#define memory_try_enable_merging memory_try_enable_merging_powerpc
|
||||
#define mktimegm mktimegm_powerpc
|
||||
#define module_call_init module_call_init_powerpc
|
||||
#define module_load module_load_powerpc
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_powerpc
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_powerpc
|
||||
#define parse_type_size parse_type_size_powerpc
|
||||
#define parse_type_str parse_type_str_powerpc
|
||||
#define parse_uint parse_uint_powerpc
|
||||
#define parse_uint_full parse_uint_full_powerpc
|
||||
#define parse_value parse_value_powerpc
|
||||
#define par_write par_write_powerpc
|
||||
#define patch_reloc patch_reloc_powerpc
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_powerpc
|
||||
#define pmuserenr_write pmuserenr_write_powerpc
|
||||
#define pmxevtyper_write pmxevtyper_write_powerpc
|
||||
#define pow2floor pow2floor_powerpc
|
||||
#define print_type_bool print_type_bool_powerpc
|
||||
#define print_type_int print_type_int_powerpc
|
||||
#define print_type_number print_type_number_powerpc
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_powerpc
|
||||
#define qemu_clock_ptr qemu_clock_ptr_powerpc
|
||||
#define qemu_clocks qemu_clocks_powerpc
|
||||
#define qemu_fdatasync qemu_fdatasync_powerpc
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_powerpc
|
||||
#define qemu_get_cpu qemu_get_cpu_powerpc
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_powerpc
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_powerpc
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_powerpc
|
||||
#define qemu_st_helpers qemu_st_helpers_powerpc
|
||||
#define qemu_strnlen qemu_strnlen_powerpc
|
||||
#define qemu_strsep qemu_strsep_powerpc
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_powerpc
|
||||
#define qemu_try_memalign qemu_try_memalign_powerpc
|
||||
#define qentry_destroy qentry_destroy_powerpc
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_powerpc
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_powerpc
|
||||
#define size_code_gen_buffer size_code_gen_buffer_powerpc
|
||||
#define slow_bitmap_and slow_bitmap_and_powerpc
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_powerpc
|
||||
#define slow_bitmap_complement slow_bitmap_complement_powerpc
|
||||
#define slow_bitmap_empty slow_bitmap_empty_powerpc
|
||||
#define slow_bitmap_equal slow_bitmap_equal_powerpc
|
||||
#define slow_bitmap_full slow_bitmap_full_powerpc
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_powerpc
|
||||
#define slow_bitmap_or slow_bitmap_or_powerpc
|
||||
#define slow_bitmap_xor slow_bitmap_xor_powerpc
|
||||
#define softmmu_lock_user softmmu_lock_user_powerpc
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_powerpc
|
||||
#define softmmu_tget32 softmmu_tget32_powerpc
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_powerpc
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_powerpc
|
||||
#define string_input_visitor_new string_input_visitor_new_powerpc
|
||||
#define stristart stristart_powerpc
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_powerpc
|
||||
#define strpadcpy strpadcpy_powerpc
|
||||
#define strstart strstart_powerpc
|
||||
#define strtosz strtosz_powerpc
|
||||
#define strtosz_suffix strtosz_suffix_powerpc
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_powerpc
|
||||
#define uint64_to_float32 uint64_to_float32_powerpc
|
||||
#define uint64_to_float64 uint64_to_float64_powerpc
|
||||
#define uleb128_decode_small uleb128_decode_small_powerpc
|
||||
#define uleb128_encode_small uleb128_encode_small_powerpc
|
||||
#define unassigned_io_ops unassigned_io_ops_powerpc
|
||||
#define unassigned_io_read unassigned_io_read_powerpc
|
||||
#define unassigned_io_write unassigned_io_write_powerpc
|
||||
|
@ -221,28 +221,6 @@ error:
|
||||
"an int64 value or range");
|
||||
}
|
||||
|
||||
static void parse_type_size(Visitor *v, uint64_t *obj, const char *name,
|
||||
Error **errp)
|
||||
{
|
||||
StringInputVisitor *siv = DO_UPCAST(StringInputVisitor, visitor, v);
|
||||
Error *err = NULL;
|
||||
uint64_t val;
|
||||
|
||||
if (siv->string) {
|
||||
parse_option_size(name, siv->string, &val, &err);
|
||||
} else {
|
||||
error_set(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",
|
||||
"size");
|
||||
return;
|
||||
}
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
}
|
||||
|
||||
*obj = val;
|
||||
}
|
||||
|
||||
static void parse_type_bool(Visitor *v, bool *obj, const char *name,
|
||||
Error **errp)
|
||||
{
|
||||
@ -332,7 +310,7 @@ StringInputVisitor *string_input_visitor_new(const char *str)
|
||||
|
||||
v->visitor.type_enum = input_type_enum;
|
||||
v->visitor.type_int = parse_type_int;
|
||||
v->visitor.type_size = parse_type_size;
|
||||
v->visitor.type_size = NULL;
|
||||
v->visitor.type_bool = parse_type_bool;
|
||||
v->visitor.type_str = parse_type_str;
|
||||
v->visitor.type_number = parse_type_number;
|
||||
|
30
qemu/sparc.h
30
qemu/sparc.h
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_sparc
|
||||
#define addrrange_shift addrrange_shift_sparc
|
||||
#define adjust_endianness adjust_endianness_sparc
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_sparc
|
||||
#define AES_decrypt AES_decrypt_sparc
|
||||
#define AES_encrypt AES_encrypt_sparc
|
||||
#define AES_imc AES_imc_sparc
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_sparc
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_sparc
|
||||
#define all_helpers all_helpers_sparc
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_sparc
|
||||
#define alloc_entry alloc_entry_sparc
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_sparc
|
||||
#define bad_mode_switch bad_mode_switch_sparc
|
||||
#define bank_number bank_number_sparc
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_sparc
|
||||
#define bitmap_zero_extend bitmap_zero_extend_sparc
|
||||
#define bp_wp_matches bp_wp_matches_sparc
|
||||
#define breakpoint_invalidate breakpoint_invalidate_sparc
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_sparc
|
||||
#define extractFloatx80Frac extractFloatx80Frac_sparc
|
||||
#define extractFloatx80Sign extractFloatx80Sign_sparc
|
||||
#define fcntl_setfl fcntl_setfl_sparc
|
||||
#define fcse_write fcse_write_sparc
|
||||
#define find_better_copy find_better_copy_sparc
|
||||
#define find_default_machine find_default_machine_sparc
|
||||
#define find_desc_by_name find_desc_by_name_sparc
|
||||
#define find_first_bit find_first_bit_sparc
|
||||
#define find_last_bit find_last_bit_sparc
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_sparc
|
||||
#define find_ram_block find_ram_block_sparc
|
||||
#define find_ram_offset find_ram_offset_sparc
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_sparc
|
||||
#define is_a64 is_a64_sparc
|
||||
#define is_help_option is_help_option_sparc
|
||||
#define is_power_of_2 is_power_of_2_sparc
|
||||
#define isr_read isr_read_sparc
|
||||
#define is_valid_option_list is_valid_option_list_sparc
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_sparc
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_sparc
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_sparc
|
||||
#define memory_try_enable_merging memory_try_enable_merging_sparc
|
||||
#define mktimegm mktimegm_sparc
|
||||
#define module_call_init module_call_init_sparc
|
||||
#define module_load module_load_sparc
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_sparc
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_sparc
|
||||
#define parse_type_size parse_type_size_sparc
|
||||
#define parse_type_str parse_type_str_sparc
|
||||
#define parse_uint parse_uint_sparc
|
||||
#define parse_uint_full parse_uint_full_sparc
|
||||
#define parse_value parse_value_sparc
|
||||
#define par_write par_write_sparc
|
||||
#define patch_reloc patch_reloc_sparc
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_sparc
|
||||
#define pmuserenr_write pmuserenr_write_sparc
|
||||
#define pmxevtyper_write pmxevtyper_write_sparc
|
||||
#define pow2floor pow2floor_sparc
|
||||
#define print_type_bool print_type_bool_sparc
|
||||
#define print_type_int print_type_int_sparc
|
||||
#define print_type_number print_type_number_sparc
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_sparc
|
||||
#define qemu_clock_ptr qemu_clock_ptr_sparc
|
||||
#define qemu_clocks qemu_clocks_sparc
|
||||
#define qemu_fdatasync qemu_fdatasync_sparc
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_sparc
|
||||
#define qemu_get_cpu qemu_get_cpu_sparc
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_sparc
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_sparc
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_sparc
|
||||
#define qemu_st_helpers qemu_st_helpers_sparc
|
||||
#define qemu_strnlen qemu_strnlen_sparc
|
||||
#define qemu_strsep qemu_strsep_sparc
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_sparc
|
||||
#define qemu_try_memalign qemu_try_memalign_sparc
|
||||
#define qentry_destroy qentry_destroy_sparc
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_sparc
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_sparc
|
||||
#define size_code_gen_buffer size_code_gen_buffer_sparc
|
||||
#define slow_bitmap_and slow_bitmap_and_sparc
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_sparc
|
||||
#define slow_bitmap_complement slow_bitmap_complement_sparc
|
||||
#define slow_bitmap_empty slow_bitmap_empty_sparc
|
||||
#define slow_bitmap_equal slow_bitmap_equal_sparc
|
||||
#define slow_bitmap_full slow_bitmap_full_sparc
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_sparc
|
||||
#define slow_bitmap_or slow_bitmap_or_sparc
|
||||
#define slow_bitmap_xor slow_bitmap_xor_sparc
|
||||
#define softmmu_lock_user softmmu_lock_user_sparc
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_sparc
|
||||
#define softmmu_tget32 softmmu_tget32_sparc
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_sparc
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_sparc
|
||||
#define string_input_visitor_new string_input_visitor_new_sparc
|
||||
#define stristart stristart_sparc
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_sparc
|
||||
#define strpadcpy strpadcpy_sparc
|
||||
#define strstart strstart_sparc
|
||||
#define strtosz strtosz_sparc
|
||||
#define strtosz_suffix strtosz_suffix_sparc
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_sparc
|
||||
#define uint64_to_float32 uint64_to_float32_sparc
|
||||
#define uint64_to_float64 uint64_to_float64_sparc
|
||||
#define uleb128_decode_small uleb128_decode_small_sparc
|
||||
#define uleb128_encode_small uleb128_encode_small_sparc
|
||||
#define unassigned_io_ops unassigned_io_ops_sparc
|
||||
#define unassigned_io_read unassigned_io_read_sparc
|
||||
#define unassigned_io_write unassigned_io_write_sparc
|
||||
|
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_sparc64
|
||||
#define addrrange_shift addrrange_shift_sparc64
|
||||
#define adjust_endianness adjust_endianness_sparc64
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_sparc64
|
||||
#define AES_decrypt AES_decrypt_sparc64
|
||||
#define AES_encrypt AES_encrypt_sparc64
|
||||
#define AES_imc AES_imc_sparc64
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_sparc64
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_sparc64
|
||||
#define all_helpers all_helpers_sparc64
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_sparc64
|
||||
#define alloc_entry alloc_entry_sparc64
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_sparc64
|
||||
#define bad_mode_switch bad_mode_switch_sparc64
|
||||
#define bank_number bank_number_sparc64
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_sparc64
|
||||
#define bitmap_zero_extend bitmap_zero_extend_sparc64
|
||||
#define bp_wp_matches bp_wp_matches_sparc64
|
||||
#define breakpoint_invalidate breakpoint_invalidate_sparc64
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_sparc64
|
||||
#define extractFloatx80Frac extractFloatx80Frac_sparc64
|
||||
#define extractFloatx80Sign extractFloatx80Sign_sparc64
|
||||
#define fcntl_setfl fcntl_setfl_sparc64
|
||||
#define fcse_write fcse_write_sparc64
|
||||
#define find_better_copy find_better_copy_sparc64
|
||||
#define find_default_machine find_default_machine_sparc64
|
||||
#define find_desc_by_name find_desc_by_name_sparc64
|
||||
#define find_first_bit find_first_bit_sparc64
|
||||
#define find_last_bit find_last_bit_sparc64
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_sparc64
|
||||
#define find_ram_block find_ram_block_sparc64
|
||||
#define find_ram_offset find_ram_offset_sparc64
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_sparc64
|
||||
#define is_a64 is_a64_sparc64
|
||||
#define is_help_option is_help_option_sparc64
|
||||
#define is_power_of_2 is_power_of_2_sparc64
|
||||
#define isr_read isr_read_sparc64
|
||||
#define is_valid_option_list is_valid_option_list_sparc64
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_sparc64
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_sparc64
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_sparc64
|
||||
#define memory_try_enable_merging memory_try_enable_merging_sparc64
|
||||
#define mktimegm mktimegm_sparc64
|
||||
#define module_call_init module_call_init_sparc64
|
||||
#define module_load module_load_sparc64
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_sparc64
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_sparc64
|
||||
#define parse_type_size parse_type_size_sparc64
|
||||
#define parse_type_str parse_type_str_sparc64
|
||||
#define parse_uint parse_uint_sparc64
|
||||
#define parse_uint_full parse_uint_full_sparc64
|
||||
#define parse_value parse_value_sparc64
|
||||
#define par_write par_write_sparc64
|
||||
#define patch_reloc patch_reloc_sparc64
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_sparc64
|
||||
#define pmuserenr_write pmuserenr_write_sparc64
|
||||
#define pmxevtyper_write pmxevtyper_write_sparc64
|
||||
#define pow2floor pow2floor_sparc64
|
||||
#define print_type_bool print_type_bool_sparc64
|
||||
#define print_type_int print_type_int_sparc64
|
||||
#define print_type_number print_type_number_sparc64
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_sparc64
|
||||
#define qemu_clock_ptr qemu_clock_ptr_sparc64
|
||||
#define qemu_clocks qemu_clocks_sparc64
|
||||
#define qemu_fdatasync qemu_fdatasync_sparc64
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_sparc64
|
||||
#define qemu_get_cpu qemu_get_cpu_sparc64
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_sparc64
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_sparc64
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_sparc64
|
||||
#define qemu_st_helpers qemu_st_helpers_sparc64
|
||||
#define qemu_strnlen qemu_strnlen_sparc64
|
||||
#define qemu_strsep qemu_strsep_sparc64
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_sparc64
|
||||
#define qemu_try_memalign qemu_try_memalign_sparc64
|
||||
#define qentry_destroy qentry_destroy_sparc64
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_sparc64
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_sparc64
|
||||
#define size_code_gen_buffer size_code_gen_buffer_sparc64
|
||||
#define slow_bitmap_and slow_bitmap_and_sparc64
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_sparc64
|
||||
#define slow_bitmap_complement slow_bitmap_complement_sparc64
|
||||
#define slow_bitmap_empty slow_bitmap_empty_sparc64
|
||||
#define slow_bitmap_equal slow_bitmap_equal_sparc64
|
||||
#define slow_bitmap_full slow_bitmap_full_sparc64
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_sparc64
|
||||
#define slow_bitmap_or slow_bitmap_or_sparc64
|
||||
#define slow_bitmap_xor slow_bitmap_xor_sparc64
|
||||
#define softmmu_lock_user softmmu_lock_user_sparc64
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_sparc64
|
||||
#define softmmu_tget32 softmmu_tget32_sparc64
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_sparc64
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_sparc64
|
||||
#define string_input_visitor_new string_input_visitor_new_sparc64
|
||||
#define stristart stristart_sparc64
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_sparc64
|
||||
#define strpadcpy strpadcpy_sparc64
|
||||
#define strstart strstart_sparc64
|
||||
#define strtosz strtosz_sparc64
|
||||
#define strtosz_suffix strtosz_suffix_sparc64
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_sparc64
|
||||
#define uint64_to_float32 uint64_to_float32_sparc64
|
||||
#define uint64_to_float64 uint64_to_float64_sparc64
|
||||
#define uleb128_decode_small uleb128_decode_small_sparc64
|
||||
#define uleb128_encode_small uleb128_encode_small_sparc64
|
||||
#define unassigned_io_ops unassigned_io_ops_sparc64
|
||||
#define unassigned_io_read unassigned_io_read_sparc64
|
||||
#define unassigned_io_write unassigned_io_write_sparc64
|
||||
|
@ -5,7 +5,6 @@ util-obj-y += module.o
|
||||
util-obj-y += bitmap.o bitops.o
|
||||
util-obj-y += error.o
|
||||
util-obj-y += aes.o
|
||||
util-obj-y += qemu-option.o
|
||||
util-obj-y += crc32c.o
|
||||
util-obj-y += host-utils.o
|
||||
util-obj-y += getauxval.o
|
||||
|
593
qemu/util/aes.c
593
qemu/util/aes.c
@ -1057,596 +1057,3 @@ const uint32_t AES_Td4[256] = {
|
||||
0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U,
|
||||
0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU,
|
||||
};
|
||||
static const u32 rcon[] = {
|
||||
0x01000000, 0x02000000, 0x04000000, 0x08000000,
|
||||
0x10000000, 0x20000000, 0x40000000, 0x80000000,
|
||||
0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
|
||||
};
|
||||
|
||||
/**
|
||||
* Expand the cipher key into the encryption key schedule.
|
||||
*/
|
||||
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key) {
|
||||
|
||||
u32 *rk;
|
||||
int i = 0;
|
||||
u32 temp;
|
||||
|
||||
if (!userKey || !key)
|
||||
return -1;
|
||||
if (bits != 128 && bits != 192 && bits != 256)
|
||||
return -2;
|
||||
|
||||
rk = key->rd_key;
|
||||
|
||||
if (bits==128)
|
||||
key->rounds = 10;
|
||||
else if (bits==192)
|
||||
key->rounds = 12;
|
||||
else
|
||||
key->rounds = 14;
|
||||
|
||||
rk[0] = GETU32(userKey );
|
||||
rk[1] = GETU32(userKey + 4);
|
||||
rk[2] = GETU32(userKey + 8);
|
||||
rk[3] = GETU32(userKey + 12);
|
||||
if (bits == 128) {
|
||||
while (1) {
|
||||
temp = rk[3];
|
||||
rk[4] = rk[0] ^
|
||||
(AES_Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||
(AES_Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Te4[(temp ) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Te4[(temp >> 24) ] & 0x000000ff) ^
|
||||
rcon[i];
|
||||
rk[5] = rk[1] ^ rk[4];
|
||||
rk[6] = rk[2] ^ rk[5];
|
||||
rk[7] = rk[3] ^ rk[6];
|
||||
if (++i == 10) {
|
||||
return 0;
|
||||
}
|
||||
rk += 4;
|
||||
}
|
||||
}
|
||||
rk[4] = GETU32(userKey + 16);
|
||||
rk[5] = GETU32(userKey + 20);
|
||||
if (bits == 192) {
|
||||
while (1) {
|
||||
temp = rk[ 5];
|
||||
rk[ 6] = rk[ 0] ^
|
||||
(AES_Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||
(AES_Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Te4[(temp ) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Te4[(temp >> 24) ] & 0x000000ff) ^
|
||||
rcon[i];
|
||||
rk[ 7] = rk[ 1] ^ rk[ 6];
|
||||
rk[ 8] = rk[ 2] ^ rk[ 7];
|
||||
rk[ 9] = rk[ 3] ^ rk[ 8];
|
||||
if (++i == 8) {
|
||||
return 0;
|
||||
}
|
||||
rk[10] = rk[ 4] ^ rk[ 9];
|
||||
rk[11] = rk[ 5] ^ rk[10];
|
||||
rk += 6;
|
||||
}
|
||||
}
|
||||
rk[6] = GETU32(userKey + 24);
|
||||
rk[7] = GETU32(userKey + 28);
|
||||
if (bits == 256) {
|
||||
while (1) {
|
||||
temp = rk[ 7];
|
||||
rk[ 8] = rk[ 0] ^
|
||||
(AES_Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||
(AES_Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Te4[(temp ) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Te4[(temp >> 24) ] & 0x000000ff) ^
|
||||
rcon[i];
|
||||
rk[ 9] = rk[ 1] ^ rk[ 8];
|
||||
rk[10] = rk[ 2] ^ rk[ 9];
|
||||
rk[11] = rk[ 3] ^ rk[10];
|
||||
if (++i == 7) {
|
||||
return 0;
|
||||
}
|
||||
temp = rk[11];
|
||||
rk[12] = rk[ 4] ^
|
||||
(AES_Te4[(temp >> 24) ] & 0xff000000) ^
|
||||
(AES_Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Te4[(temp >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Te4[(temp ) & 0xff] & 0x000000ff);
|
||||
rk[13] = rk[ 5] ^ rk[12];
|
||||
rk[14] = rk[ 6] ^ rk[13];
|
||||
rk[15] = rk[ 7] ^ rk[14];
|
||||
|
||||
rk += 8;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand the cipher key into the decryption key schedule.
|
||||
*/
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key) {
|
||||
|
||||
u32 *rk;
|
||||
int i, j, status;
|
||||
u32 temp;
|
||||
|
||||
/* first, start with an encryption schedule */
|
||||
status = AES_set_encrypt_key(userKey, bits, key);
|
||||
if (status < 0)
|
||||
return status;
|
||||
|
||||
rk = key->rd_key;
|
||||
|
||||
/* invert the order of the round keys: */
|
||||
for (i = 0, j = 4*(key->rounds); i < j; i += 4, j -= 4) {
|
||||
temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp;
|
||||
temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp;
|
||||
temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp;
|
||||
temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp;
|
||||
}
|
||||
/* apply the inverse MixColumn transform to all round keys but the first and the last: */
|
||||
for (i = 1; i < (key->rounds); i++) {
|
||||
rk += 4;
|
||||
rk[0] =
|
||||
AES_Td0[AES_Te4[(rk[0] >> 24) ] & 0xff] ^
|
||||
AES_Td1[AES_Te4[(rk[0] >> 16) & 0xff] & 0xff] ^
|
||||
AES_Td2[AES_Te4[(rk[0] >> 8) & 0xff] & 0xff] ^
|
||||
AES_Td3[AES_Te4[(rk[0] ) & 0xff] & 0xff];
|
||||
rk[1] =
|
||||
AES_Td0[AES_Te4[(rk[1] >> 24) ] & 0xff] ^
|
||||
AES_Td1[AES_Te4[(rk[1] >> 16) & 0xff] & 0xff] ^
|
||||
AES_Td2[AES_Te4[(rk[1] >> 8) & 0xff] & 0xff] ^
|
||||
AES_Td3[AES_Te4[(rk[1] ) & 0xff] & 0xff];
|
||||
rk[2] =
|
||||
AES_Td0[AES_Te4[(rk[2] >> 24) ] & 0xff] ^
|
||||
AES_Td1[AES_Te4[(rk[2] >> 16) & 0xff] & 0xff] ^
|
||||
AES_Td2[AES_Te4[(rk[2] >> 8) & 0xff] & 0xff] ^
|
||||
AES_Td3[AES_Te4[(rk[2] ) & 0xff] & 0xff];
|
||||
rk[3] =
|
||||
AES_Td0[AES_Te4[(rk[3] >> 24) ] & 0xff] ^
|
||||
AES_Td1[AES_Te4[(rk[3] >> 16) & 0xff] & 0xff] ^
|
||||
AES_Td2[AES_Te4[(rk[3] >> 8) & 0xff] & 0xff] ^
|
||||
AES_Td3[AES_Te4[(rk[3] ) & 0xff] & 0xff];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef AES_ASM
|
||||
/*
|
||||
* Encrypt a single block
|
||||
* in and out can overlap
|
||||
*/
|
||||
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key) {
|
||||
|
||||
const u32 *rk;
|
||||
u32 s0, s1, s2, s3, t0, t1, t2, t3;
|
||||
#ifndef FULL_UNROLL
|
||||
int r;
|
||||
#endif /* ?FULL_UNROLL */
|
||||
|
||||
assert(in && out && key);
|
||||
rk = key->rd_key;
|
||||
|
||||
/*
|
||||
* map byte array block to cipher state
|
||||
* and add initial round key:
|
||||
*/
|
||||
s0 = GETU32(in ) ^ rk[0];
|
||||
s1 = GETU32(in + 4) ^ rk[1];
|
||||
s2 = GETU32(in + 8) ^ rk[2];
|
||||
s3 = GETU32(in + 12) ^ rk[3];
|
||||
#ifdef FULL_UNROLL
|
||||
/* round 1: */
|
||||
t0 = AES_Te0[s0 >> 24] ^ AES_Te1[(s1 >> 16) & 0xff] ^ AES_Te2[(s2 >> 8) & 0xff] ^ AES_Te3[s3 & 0xff] ^ rk[ 4];
|
||||
t1 = AES_Te0[s1 >> 24] ^ AES_Te1[(s2 >> 16) & 0xff] ^ AES_Te2[(s3 >> 8) & 0xff] ^ AES_Te3[s0 & 0xff] ^ rk[ 5];
|
||||
t2 = AES_Te0[s2 >> 24] ^ AES_Te1[(s3 >> 16) & 0xff] ^ AES_Te2[(s0 >> 8) & 0xff] ^ AES_Te3[s1 & 0xff] ^ rk[ 6];
|
||||
t3 = AES_Te0[s3 >> 24] ^ AES_Te1[(s0 >> 16) & 0xff] ^ AES_Te2[(s1 >> 8) & 0xff] ^ AES_Te3[s2 & 0xff] ^ rk[ 7];
|
||||
/* round 2: */
|
||||
s0 = AES_Te0[t0 >> 24] ^ AES_Te1[(t1 >> 16) & 0xff] ^ AES_Te2[(t2 >> 8) & 0xff] ^ AES_Te3[t3 & 0xff] ^ rk[ 8];
|
||||
s1 = AES_Te0[t1 >> 24] ^ AES_Te1[(t2 >> 16) & 0xff] ^ AES_Te2[(t3 >> 8) & 0xff] ^ AES_Te3[t0 & 0xff] ^ rk[ 9];
|
||||
s2 = AES_Te0[t2 >> 24] ^ AES_Te1[(t3 >> 16) & 0xff] ^ AES_Te2[(t0 >> 8) & 0xff] ^ AES_Te3[t1 & 0xff] ^ rk[10];
|
||||
s3 = AES_Te0[t3 >> 24] ^ AES_Te1[(t0 >> 16) & 0xff] ^ AES_Te2[(t1 >> 8) & 0xff] ^ AES_Te3[t2 & 0xff] ^ rk[11];
|
||||
/* round 3: */
|
||||
t0 = AES_Te0[s0 >> 24] ^ AES_Te1[(s1 >> 16) & 0xff] ^ AES_Te2[(s2 >> 8) & 0xff] ^ AES_Te3[s3 & 0xff] ^ rk[12];
|
||||
t1 = AES_Te0[s1 >> 24] ^ AES_Te1[(s2 >> 16) & 0xff] ^ AES_Te2[(s3 >> 8) & 0xff] ^ AES_Te3[s0 & 0xff] ^ rk[13];
|
||||
t2 = AES_Te0[s2 >> 24] ^ AES_Te1[(s3 >> 16) & 0xff] ^ AES_Te2[(s0 >> 8) & 0xff] ^ AES_Te3[s1 & 0xff] ^ rk[14];
|
||||
t3 = AES_Te0[s3 >> 24] ^ AES_Te1[(s0 >> 16) & 0xff] ^ AES_Te2[(s1 >> 8) & 0xff] ^ AES_Te3[s2 & 0xff] ^ rk[15];
|
||||
/* round 4: */
|
||||
s0 = AES_Te0[t0 >> 24] ^ AES_Te1[(t1 >> 16) & 0xff] ^ AES_Te2[(t2 >> 8) & 0xff] ^ AES_Te3[t3 & 0xff] ^ rk[16];
|
||||
s1 = AES_Te0[t1 >> 24] ^ AES_Te1[(t2 >> 16) & 0xff] ^ AES_Te2[(t3 >> 8) & 0xff] ^ AES_Te3[t0 & 0xff] ^ rk[17];
|
||||
s2 = AES_Te0[t2 >> 24] ^ AES_Te1[(t3 >> 16) & 0xff] ^ AES_Te2[(t0 >> 8) & 0xff] ^ AES_Te3[t1 & 0xff] ^ rk[18];
|
||||
s3 = AES_Te0[t3 >> 24] ^ AES_Te1[(t0 >> 16) & 0xff] ^ AES_Te2[(t1 >> 8) & 0xff] ^ AES_Te3[t2 & 0xff] ^ rk[19];
|
||||
/* round 5: */
|
||||
t0 = AES_Te0[s0 >> 24] ^ AES_Te1[(s1 >> 16) & 0xff] ^ AES_Te2[(s2 >> 8) & 0xff] ^ AES_Te3[s3 & 0xff] ^ rk[20];
|
||||
t1 = AES_Te0[s1 >> 24] ^ AES_Te1[(s2 >> 16) & 0xff] ^ AES_Te2[(s3 >> 8) & 0xff] ^ AES_Te3[s0 & 0xff] ^ rk[21];
|
||||
t2 = AES_Te0[s2 >> 24] ^ AES_Te1[(s3 >> 16) & 0xff] ^ AES_Te2[(s0 >> 8) & 0xff] ^ AES_Te3[s1 & 0xff] ^ rk[22];
|
||||
t3 = AES_Te0[s3 >> 24] ^ AES_Te1[(s0 >> 16) & 0xff] ^ AES_Te2[(s1 >> 8) & 0xff] ^ AES_Te3[s2 & 0xff] ^ rk[23];
|
||||
/* round 6: */
|
||||
s0 = AES_Te0[t0 >> 24] ^ AES_Te1[(t1 >> 16) & 0xff] ^ AES_Te2[(t2 >> 8) & 0xff] ^ AES_Te3[t3 & 0xff] ^ rk[24];
|
||||
s1 = AES_Te0[t1 >> 24] ^ AES_Te1[(t2 >> 16) & 0xff] ^ AES_Te2[(t3 >> 8) & 0xff] ^ AES_Te3[t0 & 0xff] ^ rk[25];
|
||||
s2 = AES_Te0[t2 >> 24] ^ AES_Te1[(t3 >> 16) & 0xff] ^ AES_Te2[(t0 >> 8) & 0xff] ^ AES_Te3[t1 & 0xff] ^ rk[26];
|
||||
s3 = AES_Te0[t3 >> 24] ^ AES_Te1[(t0 >> 16) & 0xff] ^ AES_Te2[(t1 >> 8) & 0xff] ^ AES_Te3[t2 & 0xff] ^ rk[27];
|
||||
/* round 7: */
|
||||
t0 = AES_Te0[s0 >> 24] ^ AES_Te1[(s1 >> 16) & 0xff] ^ AES_Te2[(s2 >> 8) & 0xff] ^ AES_Te3[s3 & 0xff] ^ rk[28];
|
||||
t1 = AES_Te0[s1 >> 24] ^ AES_Te1[(s2 >> 16) & 0xff] ^ AES_Te2[(s3 >> 8) & 0xff] ^ AES_Te3[s0 & 0xff] ^ rk[29];
|
||||
t2 = AES_Te0[s2 >> 24] ^ AES_Te1[(s3 >> 16) & 0xff] ^ AES_Te2[(s0 >> 8) & 0xff] ^ AES_Te3[s1 & 0xff] ^ rk[30];
|
||||
t3 = AES_Te0[s3 >> 24] ^ AES_Te1[(s0 >> 16) & 0xff] ^ AES_Te2[(s1 >> 8) & 0xff] ^ AES_Te3[s2 & 0xff] ^ rk[31];
|
||||
/* round 8: */
|
||||
s0 = AES_Te0[t0 >> 24] ^ AES_Te1[(t1 >> 16) & 0xff] ^ AES_Te2[(t2 >> 8) & 0xff] ^ AES_Te3[t3 & 0xff] ^ rk[32];
|
||||
s1 = AES_Te0[t1 >> 24] ^ AES_Te1[(t2 >> 16) & 0xff] ^ AES_Te2[(t3 >> 8) & 0xff] ^ AES_Te3[t0 & 0xff] ^ rk[33];
|
||||
s2 = AES_Te0[t2 >> 24] ^ AES_Te1[(t3 >> 16) & 0xff] ^ AES_Te2[(t0 >> 8) & 0xff] ^ AES_Te3[t1 & 0xff] ^ rk[34];
|
||||
s3 = AES_Te0[t3 >> 24] ^ AES_Te1[(t0 >> 16) & 0xff] ^ AES_Te2[(t1 >> 8) & 0xff] ^ AES_Te3[t2 & 0xff] ^ rk[35];
|
||||
/* round 9: */
|
||||
t0 = AES_Te0[s0 >> 24] ^ AES_Te1[(s1 >> 16) & 0xff] ^ AES_Te2[(s2 >> 8) & 0xff] ^ AES_Te3[s3 & 0xff] ^ rk[36];
|
||||
t1 = AES_Te0[s1 >> 24] ^ AES_Te1[(s2 >> 16) & 0xff] ^ AES_Te2[(s3 >> 8) & 0xff] ^ AES_Te3[s0 & 0xff] ^ rk[37];
|
||||
t2 = AES_Te0[s2 >> 24] ^ AES_Te1[(s3 >> 16) & 0xff] ^ AES_Te2[(s0 >> 8) & 0xff] ^ AES_Te3[s1 & 0xff] ^ rk[38];
|
||||
t3 = AES_Te0[s3 >> 24] ^ AES_Te1[(s0 >> 16) & 0xff] ^ AES_Te2[(s1 >> 8) & 0xff] ^ AES_Te3[s2 & 0xff] ^ rk[39];
|
||||
if (key->rounds > 10) {
|
||||
/* round 10: */
|
||||
s0 = AES_Te0[t0 >> 24] ^ AES_Te1[(t1 >> 16) & 0xff] ^ AES_Te2[(t2 >> 8) & 0xff] ^ AES_Te3[t3 & 0xff] ^ rk[40];
|
||||
s1 = AES_Te0[t1 >> 24] ^ AES_Te1[(t2 >> 16) & 0xff] ^ AES_Te2[(t3 >> 8) & 0xff] ^ AES_Te3[t0 & 0xff] ^ rk[41];
|
||||
s2 = AES_Te0[t2 >> 24] ^ AES_Te1[(t3 >> 16) & 0xff] ^ AES_Te2[(t0 >> 8) & 0xff] ^ AES_Te3[t1 & 0xff] ^ rk[42];
|
||||
s3 = AES_Te0[t3 >> 24] ^ AES_Te1[(t0 >> 16) & 0xff] ^ AES_Te2[(t1 >> 8) & 0xff] ^ AES_Te3[t2 & 0xff] ^ rk[43];
|
||||
/* round 11: */
|
||||
t0 = AES_Te0[s0 >> 24] ^ AES_Te1[(s1 >> 16) & 0xff] ^ AES_Te2[(s2 >> 8) & 0xff] ^ AES_Te3[s3 & 0xff] ^ rk[44];
|
||||
t1 = AES_Te0[s1 >> 24] ^ AES_Te1[(s2 >> 16) & 0xff] ^ AES_Te2[(s3 >> 8) & 0xff] ^ AES_Te3[s0 & 0xff] ^ rk[45];
|
||||
t2 = AES_Te0[s2 >> 24] ^ AES_Te1[(s3 >> 16) & 0xff] ^ AES_Te2[(s0 >> 8) & 0xff] ^ AES_Te3[s1 & 0xff] ^ rk[46];
|
||||
t3 = AES_Te0[s3 >> 24] ^ AES_Te1[(s0 >> 16) & 0xff] ^ AES_Te2[(s1 >> 8) & 0xff] ^ AES_Te3[s2 & 0xff] ^ rk[47];
|
||||
if (key->rounds > 12) {
|
||||
/* round 12: */
|
||||
s0 = AES_Te0[t0 >> 24] ^ AES_Te1[(t1 >> 16) & 0xff] ^ AES_Te2[(t2 >> 8) & 0xff] ^ AES_Te3[t3 & 0xff] ^ rk[48];
|
||||
s1 = AES_Te0[t1 >> 24] ^ AES_Te1[(t2 >> 16) & 0xff] ^ AES_Te2[(t3 >> 8) & 0xff] ^ AES_Te3[t0 & 0xff] ^ rk[49];
|
||||
s2 = AES_Te0[t2 >> 24] ^ AES_Te1[(t3 >> 16) & 0xff] ^ AES_Te2[(t0 >> 8) & 0xff] ^ AES_Te3[t1 & 0xff] ^ rk[50];
|
||||
s3 = AES_Te0[t3 >> 24] ^ AES_Te1[(t0 >> 16) & 0xff] ^ AES_Te2[(t1 >> 8) & 0xff] ^ AES_Te3[t2 & 0xff] ^ rk[51];
|
||||
/* round 13: */
|
||||
t0 = AES_Te0[s0 >> 24] ^ AES_Te1[(s1 >> 16) & 0xff] ^ AES_Te2[(s2 >> 8) & 0xff] ^ AES_Te3[s3 & 0xff] ^ rk[52];
|
||||
t1 = AES_Te0[s1 >> 24] ^ AES_Te1[(s2 >> 16) & 0xff] ^ AES_Te2[(s3 >> 8) & 0xff] ^ AES_Te3[s0 & 0xff] ^ rk[53];
|
||||
t2 = AES_Te0[s2 >> 24] ^ AES_Te1[(s3 >> 16) & 0xff] ^ AES_Te2[(s0 >> 8) & 0xff] ^ AES_Te3[s1 & 0xff] ^ rk[54];
|
||||
t3 = AES_Te0[s3 >> 24] ^ AES_Te1[(s0 >> 16) & 0xff] ^ AES_Te2[(s1 >> 8) & 0xff] ^ AES_Te3[s2 & 0xff] ^ rk[55];
|
||||
}
|
||||
}
|
||||
rk += key->rounds << 2;
|
||||
#else /* !FULL_UNROLL */
|
||||
/*
|
||||
* Nr - 1 full rounds:
|
||||
*/
|
||||
r = key->rounds >> 1;
|
||||
for (;;) {
|
||||
t0 =
|
||||
AES_Te0[(s0 >> 24) ] ^
|
||||
AES_Te1[(s1 >> 16) & 0xff] ^
|
||||
AES_Te2[(s2 >> 8) & 0xff] ^
|
||||
AES_Te3[(s3 ) & 0xff] ^
|
||||
rk[4];
|
||||
t1 =
|
||||
AES_Te0[(s1 >> 24) ] ^
|
||||
AES_Te1[(s2 >> 16) & 0xff] ^
|
||||
AES_Te2[(s3 >> 8) & 0xff] ^
|
||||
AES_Te3[(s0 ) & 0xff] ^
|
||||
rk[5];
|
||||
t2 =
|
||||
AES_Te0[(s2 >> 24) ] ^
|
||||
AES_Te1[(s3 >> 16) & 0xff] ^
|
||||
AES_Te2[(s0 >> 8) & 0xff] ^
|
||||
AES_Te3[(s1 ) & 0xff] ^
|
||||
rk[6];
|
||||
t3 =
|
||||
AES_Te0[(s3 >> 24) ] ^
|
||||
AES_Te1[(s0 >> 16) & 0xff] ^
|
||||
AES_Te2[(s1 >> 8) & 0xff] ^
|
||||
AES_Te3[(s2 ) & 0xff] ^
|
||||
rk[7];
|
||||
|
||||
rk += 8;
|
||||
if (--r == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
s0 =
|
||||
AES_Te0[(t0 >> 24) ] ^
|
||||
AES_Te1[(t1 >> 16) & 0xff] ^
|
||||
AES_Te2[(t2 >> 8) & 0xff] ^
|
||||
AES_Te3[(t3 ) & 0xff] ^
|
||||
rk[0];
|
||||
s1 =
|
||||
AES_Te0[(t1 >> 24) ] ^
|
||||
AES_Te1[(t2 >> 16) & 0xff] ^
|
||||
AES_Te2[(t3 >> 8) & 0xff] ^
|
||||
AES_Te3[(t0 ) & 0xff] ^
|
||||
rk[1];
|
||||
s2 =
|
||||
AES_Te0[(t2 >> 24) ] ^
|
||||
AES_Te1[(t3 >> 16) & 0xff] ^
|
||||
AES_Te2[(t0 >> 8) & 0xff] ^
|
||||
AES_Te3[(t1 ) & 0xff] ^
|
||||
rk[2];
|
||||
s3 =
|
||||
AES_Te0[(t3 >> 24) ] ^
|
||||
AES_Te1[(t0 >> 16) & 0xff] ^
|
||||
AES_Te2[(t1 >> 8) & 0xff] ^
|
||||
AES_Te3[(t2 ) & 0xff] ^
|
||||
rk[3];
|
||||
}
|
||||
#endif /* ?FULL_UNROLL */
|
||||
/*
|
||||
* apply last round and
|
||||
* map cipher state to byte array block:
|
||||
*/
|
||||
s0 =
|
||||
(AES_Te4[(t0 >> 24) ] & 0xff000000) ^
|
||||
(AES_Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Te4[(t2 >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Te4[(t3 ) & 0xff] & 0x000000ff) ^
|
||||
rk[0];
|
||||
PUTU32(out , s0);
|
||||
s1 =
|
||||
(AES_Te4[(t1 >> 24) ] & 0xff000000) ^
|
||||
(AES_Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Te4[(t3 >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Te4[(t0 ) & 0xff] & 0x000000ff) ^
|
||||
rk[1];
|
||||
PUTU32(out + 4, s1);
|
||||
s2 =
|
||||
(AES_Te4[(t2 >> 24) ] & 0xff000000) ^
|
||||
(AES_Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Te4[(t0 >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Te4[(t1 ) & 0xff] & 0x000000ff) ^
|
||||
rk[2];
|
||||
PUTU32(out + 8, s2);
|
||||
s3 =
|
||||
(AES_Te4[(t3 >> 24) ] & 0xff000000) ^
|
||||
(AES_Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Te4[(t1 >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Te4[(t2 ) & 0xff] & 0x000000ff) ^
|
||||
rk[3];
|
||||
PUTU32(out + 12, s3);
|
||||
}
|
||||
|
||||
/*
|
||||
* Decrypt a single block
|
||||
* in and out can overlap
|
||||
*/
|
||||
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key) {
|
||||
|
||||
const u32 *rk;
|
||||
u32 s0, s1, s2, s3, t0, t1, t2, t3;
|
||||
#ifndef FULL_UNROLL
|
||||
int r;
|
||||
#endif /* ?FULL_UNROLL */
|
||||
|
||||
assert(in && out && key);
|
||||
rk = key->rd_key;
|
||||
|
||||
/*
|
||||
* map byte array block to cipher state
|
||||
* and add initial round key:
|
||||
*/
|
||||
s0 = GETU32(in ) ^ rk[0];
|
||||
s1 = GETU32(in + 4) ^ rk[1];
|
||||
s2 = GETU32(in + 8) ^ rk[2];
|
||||
s3 = GETU32(in + 12) ^ rk[3];
|
||||
#ifdef FULL_UNROLL
|
||||
/* round 1: */
|
||||
t0 = AES_Td0[s0 >> 24] ^ AES_Td1[(s3 >> 16) & 0xff] ^ AES_Td2[(s2 >> 8) & 0xff] ^ AES_Td3[s1 & 0xff] ^ rk[ 4];
|
||||
t1 = AES_Td0[s1 >> 24] ^ AES_Td1[(s0 >> 16) & 0xff] ^ AES_Td2[(s3 >> 8) & 0xff] ^ AES_Td3[s2 & 0xff] ^ rk[ 5];
|
||||
t2 = AES_Td0[s2 >> 24] ^ AES_Td1[(s1 >> 16) & 0xff] ^ AES_Td2[(s0 >> 8) & 0xff] ^ AES_Td3[s3 & 0xff] ^ rk[ 6];
|
||||
t3 = AES_Td0[s3 >> 24] ^ AES_Td1[(s2 >> 16) & 0xff] ^ AES_Td2[(s1 >> 8) & 0xff] ^ AES_Td3[s0 & 0xff] ^ rk[ 7];
|
||||
/* round 2: */
|
||||
s0 = AES_Td0[t0 >> 24] ^ AES_Td1[(t3 >> 16) & 0xff] ^ AES_Td2[(t2 >> 8) & 0xff] ^ AES_Td3[t1 & 0xff] ^ rk[ 8];
|
||||
s1 = AES_Td0[t1 >> 24] ^ AES_Td1[(t0 >> 16) & 0xff] ^ AES_Td2[(t3 >> 8) & 0xff] ^ AES_Td3[t2 & 0xff] ^ rk[ 9];
|
||||
s2 = AES_Td0[t2 >> 24] ^ AES_Td1[(t1 >> 16) & 0xff] ^ AES_Td2[(t0 >> 8) & 0xff] ^ AES_Td3[t3 & 0xff] ^ rk[10];
|
||||
s3 = AES_Td0[t3 >> 24] ^ AES_Td1[(t2 >> 16) & 0xff] ^ AES_Td2[(t1 >> 8) & 0xff] ^ AES_Td3[t0 & 0xff] ^ rk[11];
|
||||
/* round 3: */
|
||||
t0 = AES_Td0[s0 >> 24] ^ AES_Td1[(s3 >> 16) & 0xff] ^ AES_Td2[(s2 >> 8) & 0xff] ^ AES_Td3[s1 & 0xff] ^ rk[12];
|
||||
t1 = AES_Td0[s1 >> 24] ^ AES_Td1[(s0 >> 16) & 0xff] ^ AES_Td2[(s3 >> 8) & 0xff] ^ AES_Td3[s2 & 0xff] ^ rk[13];
|
||||
t2 = AES_Td0[s2 >> 24] ^ AES_Td1[(s1 >> 16) & 0xff] ^ AES_Td2[(s0 >> 8) & 0xff] ^ AES_Td3[s3 & 0xff] ^ rk[14];
|
||||
t3 = AES_Td0[s3 >> 24] ^ AES_Td1[(s2 >> 16) & 0xff] ^ AES_Td2[(s1 >> 8) & 0xff] ^ AES_Td3[s0 & 0xff] ^ rk[15];
|
||||
/* round 4: */
|
||||
s0 = AES_Td0[t0 >> 24] ^ AES_Td1[(t3 >> 16) & 0xff] ^ AES_Td2[(t2 >> 8) & 0xff] ^ AES_Td3[t1 & 0xff] ^ rk[16];
|
||||
s1 = AES_Td0[t1 >> 24] ^ AES_Td1[(t0 >> 16) & 0xff] ^ AES_Td2[(t3 >> 8) & 0xff] ^ AES_Td3[t2 & 0xff] ^ rk[17];
|
||||
s2 = AES_Td0[t2 >> 24] ^ AES_Td1[(t1 >> 16) & 0xff] ^ AES_Td2[(t0 >> 8) & 0xff] ^ AES_Td3[t3 & 0xff] ^ rk[18];
|
||||
s3 = AES_Td0[t3 >> 24] ^ AES_Td1[(t2 >> 16) & 0xff] ^ AES_Td2[(t1 >> 8) & 0xff] ^ AES_Td3[t0 & 0xff] ^ rk[19];
|
||||
/* round 5: */
|
||||
t0 = AES_Td0[s0 >> 24] ^ AES_Td1[(s3 >> 16) & 0xff] ^ AES_Td2[(s2 >> 8) & 0xff] ^ AES_Td3[s1 & 0xff] ^ rk[20];
|
||||
t1 = AES_Td0[s1 >> 24] ^ AES_Td1[(s0 >> 16) & 0xff] ^ AES_Td2[(s3 >> 8) & 0xff] ^ AES_Td3[s2 & 0xff] ^ rk[21];
|
||||
t2 = AES_Td0[s2 >> 24] ^ AES_Td1[(s1 >> 16) & 0xff] ^ AES_Td2[(s0 >> 8) & 0xff] ^ AES_Td3[s3 & 0xff] ^ rk[22];
|
||||
t3 = AES_Td0[s3 >> 24] ^ AES_Td1[(s2 >> 16) & 0xff] ^ AES_Td2[(s1 >> 8) & 0xff] ^ AES_Td3[s0 & 0xff] ^ rk[23];
|
||||
/* round 6: */
|
||||
s0 = AES_Td0[t0 >> 24] ^ AES_Td1[(t3 >> 16) & 0xff] ^ AES_Td2[(t2 >> 8) & 0xff] ^ AES_Td3[t1 & 0xff] ^ rk[24];
|
||||
s1 = AES_Td0[t1 >> 24] ^ AES_Td1[(t0 >> 16) & 0xff] ^ AES_Td2[(t3 >> 8) & 0xff] ^ AES_Td3[t2 & 0xff] ^ rk[25];
|
||||
s2 = AES_Td0[t2 >> 24] ^ AES_Td1[(t1 >> 16) & 0xff] ^ AES_Td2[(t0 >> 8) & 0xff] ^ AES_Td3[t3 & 0xff] ^ rk[26];
|
||||
s3 = AES_Td0[t3 >> 24] ^ AES_Td1[(t2 >> 16) & 0xff] ^ AES_Td2[(t1 >> 8) & 0xff] ^ AES_Td3[t0 & 0xff] ^ rk[27];
|
||||
/* round 7: */
|
||||
t0 = AES_Td0[s0 >> 24] ^ AES_Td1[(s3 >> 16) & 0xff] ^ AES_Td2[(s2 >> 8) & 0xff] ^ AES_Td3[s1 & 0xff] ^ rk[28];
|
||||
t1 = AES_Td0[s1 >> 24] ^ AES_Td1[(s0 >> 16) & 0xff] ^ AES_Td2[(s3 >> 8) & 0xff] ^ AES_Td3[s2 & 0xff] ^ rk[29];
|
||||
t2 = AES_Td0[s2 >> 24] ^ AES_Td1[(s1 >> 16) & 0xff] ^ AES_Td2[(s0 >> 8) & 0xff] ^ AES_Td3[s3 & 0xff] ^ rk[30];
|
||||
t3 = AES_Td0[s3 >> 24] ^ AES_Td1[(s2 >> 16) & 0xff] ^ AES_Td2[(s1 >> 8) & 0xff] ^ AES_Td3[s0 & 0xff] ^ rk[31];
|
||||
/* round 8: */
|
||||
s0 = AES_Td0[t0 >> 24] ^ AES_Td1[(t3 >> 16) & 0xff] ^ AES_Td2[(t2 >> 8) & 0xff] ^ AES_Td3[t1 & 0xff] ^ rk[32];
|
||||
s1 = AES_Td0[t1 >> 24] ^ AES_Td1[(t0 >> 16) & 0xff] ^ AES_Td2[(t3 >> 8) & 0xff] ^ AES_Td3[t2 & 0xff] ^ rk[33];
|
||||
s2 = AES_Td0[t2 >> 24] ^ AES_Td1[(t1 >> 16) & 0xff] ^ AES_Td2[(t0 >> 8) & 0xff] ^ AES_Td3[t3 & 0xff] ^ rk[34];
|
||||
s3 = AES_Td0[t3 >> 24] ^ AES_Td1[(t2 >> 16) & 0xff] ^ AES_Td2[(t1 >> 8) & 0xff] ^ AES_Td3[t0 & 0xff] ^ rk[35];
|
||||
/* round 9: */
|
||||
t0 = AES_Td0[s0 >> 24] ^ AES_Td1[(s3 >> 16) & 0xff] ^ AES_Td2[(s2 >> 8) & 0xff] ^ AES_Td3[s1 & 0xff] ^ rk[36];
|
||||
t1 = AES_Td0[s1 >> 24] ^ AES_Td1[(s0 >> 16) & 0xff] ^ AES_Td2[(s3 >> 8) & 0xff] ^ AES_Td3[s2 & 0xff] ^ rk[37];
|
||||
t2 = AES_Td0[s2 >> 24] ^ AES_Td1[(s1 >> 16) & 0xff] ^ AES_Td2[(s0 >> 8) & 0xff] ^ AES_Td3[s3 & 0xff] ^ rk[38];
|
||||
t3 = AES_Td0[s3 >> 24] ^ AES_Td1[(s2 >> 16) & 0xff] ^ AES_Td2[(s1 >> 8) & 0xff] ^ AES_Td3[s0 & 0xff] ^ rk[39];
|
||||
if (key->rounds > 10) {
|
||||
/* round 10: */
|
||||
s0 = AES_Td0[t0 >> 24] ^ AES_Td1[(t3 >> 16) & 0xff] ^ AES_Td2[(t2 >> 8) & 0xff] ^ AES_Td3[t1 & 0xff] ^ rk[40];
|
||||
s1 = AES_Td0[t1 >> 24] ^ AES_Td1[(t0 >> 16) & 0xff] ^ AES_Td2[(t3 >> 8) & 0xff] ^ AES_Td3[t2 & 0xff] ^ rk[41];
|
||||
s2 = AES_Td0[t2 >> 24] ^ AES_Td1[(t1 >> 16) & 0xff] ^ AES_Td2[(t0 >> 8) & 0xff] ^ AES_Td3[t3 & 0xff] ^ rk[42];
|
||||
s3 = AES_Td0[t3 >> 24] ^ AES_Td1[(t2 >> 16) & 0xff] ^ AES_Td2[(t1 >> 8) & 0xff] ^ AES_Td3[t0 & 0xff] ^ rk[43];
|
||||
/* round 11: */
|
||||
t0 = AES_Td0[s0 >> 24] ^ AES_Td1[(s3 >> 16) & 0xff] ^ AES_Td2[(s2 >> 8) & 0xff] ^ AES_Td3[s1 & 0xff] ^ rk[44];
|
||||
t1 = AES_Td0[s1 >> 24] ^ AES_Td1[(s0 >> 16) & 0xff] ^ AES_Td2[(s3 >> 8) & 0xff] ^ AES_Td3[s2 & 0xff] ^ rk[45];
|
||||
t2 = AES_Td0[s2 >> 24] ^ AES_Td1[(s1 >> 16) & 0xff] ^ AES_Td2[(s0 >> 8) & 0xff] ^ AES_Td3[s3 & 0xff] ^ rk[46];
|
||||
t3 = AES_Td0[s3 >> 24] ^ AES_Td1[(s2 >> 16) & 0xff] ^ AES_Td2[(s1 >> 8) & 0xff] ^ AES_Td3[s0 & 0xff] ^ rk[47];
|
||||
if (key->rounds > 12) {
|
||||
/* round 12: */
|
||||
s0 = AES_Td0[t0 >> 24] ^ AES_Td1[(t3 >> 16) & 0xff] ^ AES_Td2[(t2 >> 8) & 0xff] ^ AES_Td3[t1 & 0xff] ^ rk[48];
|
||||
s1 = AES_Td0[t1 >> 24] ^ AES_Td1[(t0 >> 16) & 0xff] ^ AES_Td2[(t3 >> 8) & 0xff] ^ AES_Td3[t2 & 0xff] ^ rk[49];
|
||||
s2 = AES_Td0[t2 >> 24] ^ AES_Td1[(t1 >> 16) & 0xff] ^ AES_Td2[(t0 >> 8) & 0xff] ^ AES_Td3[t3 & 0xff] ^ rk[50];
|
||||
s3 = AES_Td0[t3 >> 24] ^ AES_Td1[(t2 >> 16) & 0xff] ^ AES_Td2[(t1 >> 8) & 0xff] ^ AES_Td3[t0 & 0xff] ^ rk[51];
|
||||
/* round 13: */
|
||||
t0 = AES_Td0[s0 >> 24] ^ AES_Td1[(s3 >> 16) & 0xff] ^ AES_Td2[(s2 >> 8) & 0xff] ^ AES_Td3[s1 & 0xff] ^ rk[52];
|
||||
t1 = AES_Td0[s1 >> 24] ^ AES_Td1[(s0 >> 16) & 0xff] ^ AES_Td2[(s3 >> 8) & 0xff] ^ AES_Td3[s2 & 0xff] ^ rk[53];
|
||||
t2 = AES_Td0[s2 >> 24] ^ AES_Td1[(s1 >> 16) & 0xff] ^ AES_Td2[(s0 >> 8) & 0xff] ^ AES_Td3[s3 & 0xff] ^ rk[54];
|
||||
t3 = AES_Td0[s3 >> 24] ^ AES_Td1[(s2 >> 16) & 0xff] ^ AES_Td2[(s1 >> 8) & 0xff] ^ AES_Td3[s0 & 0xff] ^ rk[55];
|
||||
}
|
||||
}
|
||||
rk += key->rounds << 2;
|
||||
#else /* !FULL_UNROLL */
|
||||
/*
|
||||
* Nr - 1 full rounds:
|
||||
*/
|
||||
r = key->rounds >> 1;
|
||||
for (;;) {
|
||||
t0 =
|
||||
AES_Td0[(s0 >> 24) ] ^
|
||||
AES_Td1[(s3 >> 16) & 0xff] ^
|
||||
AES_Td2[(s2 >> 8) & 0xff] ^
|
||||
AES_Td3[(s1 ) & 0xff] ^
|
||||
rk[4];
|
||||
t1 =
|
||||
AES_Td0[(s1 >> 24) ] ^
|
||||
AES_Td1[(s0 >> 16) & 0xff] ^
|
||||
AES_Td2[(s3 >> 8) & 0xff] ^
|
||||
AES_Td3[(s2 ) & 0xff] ^
|
||||
rk[5];
|
||||
t2 =
|
||||
AES_Td0[(s2 >> 24) ] ^
|
||||
AES_Td1[(s1 >> 16) & 0xff] ^
|
||||
AES_Td2[(s0 >> 8) & 0xff] ^
|
||||
AES_Td3[(s3 ) & 0xff] ^
|
||||
rk[6];
|
||||
t3 =
|
||||
AES_Td0[(s3 >> 24) ] ^
|
||||
AES_Td1[(s2 >> 16) & 0xff] ^
|
||||
AES_Td2[(s1 >> 8) & 0xff] ^
|
||||
AES_Td3[(s0 ) & 0xff] ^
|
||||
rk[7];
|
||||
|
||||
rk += 8;
|
||||
if (--r == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
s0 =
|
||||
AES_Td0[(t0 >> 24) ] ^
|
||||
AES_Td1[(t3 >> 16) & 0xff] ^
|
||||
AES_Td2[(t2 >> 8) & 0xff] ^
|
||||
AES_Td3[(t1 ) & 0xff] ^
|
||||
rk[0];
|
||||
s1 =
|
||||
AES_Td0[(t1 >> 24) ] ^
|
||||
AES_Td1[(t0 >> 16) & 0xff] ^
|
||||
AES_Td2[(t3 >> 8) & 0xff] ^
|
||||
AES_Td3[(t2 ) & 0xff] ^
|
||||
rk[1];
|
||||
s2 =
|
||||
AES_Td0[(t2 >> 24) ] ^
|
||||
AES_Td1[(t1 >> 16) & 0xff] ^
|
||||
AES_Td2[(t0 >> 8) & 0xff] ^
|
||||
AES_Td3[(t3 ) & 0xff] ^
|
||||
rk[2];
|
||||
s3 =
|
||||
AES_Td0[(t3 >> 24) ] ^
|
||||
AES_Td1[(t2 >> 16) & 0xff] ^
|
||||
AES_Td2[(t1 >> 8) & 0xff] ^
|
||||
AES_Td3[(t0 ) & 0xff] ^
|
||||
rk[3];
|
||||
}
|
||||
#endif /* ?FULL_UNROLL */
|
||||
/*
|
||||
* apply last round and
|
||||
* map cipher state to byte array block:
|
||||
*/
|
||||
s0 =
|
||||
(AES_Td4[(t0 >> 24) ] & 0xff000000) ^
|
||||
(AES_Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Td4[(t2 >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Td4[(t1 ) & 0xff] & 0x000000ff) ^
|
||||
rk[0];
|
||||
PUTU32(out , s0);
|
||||
s1 =
|
||||
(AES_Td4[(t1 >> 24) ] & 0xff000000) ^
|
||||
(AES_Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Td4[(t3 >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Td4[(t2 ) & 0xff] & 0x000000ff) ^
|
||||
rk[1];
|
||||
PUTU32(out + 4, s1);
|
||||
s2 =
|
||||
(AES_Td4[(t2 >> 24) ] & 0xff000000) ^
|
||||
(AES_Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Td4[(t0 >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Td4[(t3 ) & 0xff] & 0x000000ff) ^
|
||||
rk[2];
|
||||
PUTU32(out + 8, s2);
|
||||
s3 =
|
||||
(AES_Td4[(t3 >> 24) ] & 0xff000000) ^
|
||||
(AES_Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^
|
||||
(AES_Td4[(t1 >> 8) & 0xff] & 0x0000ff00) ^
|
||||
(AES_Td4[(t0 ) & 0xff] & 0x000000ff) ^
|
||||
rk[3];
|
||||
PUTU32(out + 12, s3);
|
||||
}
|
||||
|
||||
#endif /* AES_ASM */
|
||||
|
||||
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc)
|
||||
{
|
||||
|
||||
unsigned long n;
|
||||
unsigned long len = length;
|
||||
unsigned char tmp[AES_BLOCK_SIZE];
|
||||
|
||||
assert(in && out && key && ivec);
|
||||
|
||||
if (enc) {
|
||||
while (len >= AES_BLOCK_SIZE) {
|
||||
for(n=0; n < AES_BLOCK_SIZE; ++n)
|
||||
tmp[n] = in[n] ^ ivec[n];
|
||||
AES_encrypt(tmp, out, key);
|
||||
memcpy(ivec, out, AES_BLOCK_SIZE);
|
||||
len -= AES_BLOCK_SIZE;
|
||||
in += AES_BLOCK_SIZE;
|
||||
out += AES_BLOCK_SIZE;
|
||||
}
|
||||
if (len) {
|
||||
for(n=0; n < len; ++n)
|
||||
tmp[n] = in[n] ^ ivec[n];
|
||||
for(n=len; n < AES_BLOCK_SIZE; ++n)
|
||||
tmp[n] = ivec[n];
|
||||
AES_encrypt(tmp, tmp, key);
|
||||
memcpy(out, tmp, AES_BLOCK_SIZE);
|
||||
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||
}
|
||||
} else {
|
||||
while (len >= AES_BLOCK_SIZE) {
|
||||
memcpy(tmp, in, AES_BLOCK_SIZE);
|
||||
AES_decrypt(in, out, key);
|
||||
for(n=0; n < AES_BLOCK_SIZE; ++n)
|
||||
out[n] ^= ivec[n];
|
||||
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||
len -= AES_BLOCK_SIZE;
|
||||
in += AES_BLOCK_SIZE;
|
||||
out += AES_BLOCK_SIZE;
|
||||
}
|
||||
if (len) {
|
||||
memcpy(tmp, in, AES_BLOCK_SIZE);
|
||||
AES_decrypt(tmp, tmp, key);
|
||||
for(n=0; n < len; ++n)
|
||||
out[n] = tmp[n] ^ ivec[n];
|
||||
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,149 +12,6 @@
|
||||
#include "qemu/bitops.h"
|
||||
#include "qemu/bitmap.h"
|
||||
|
||||
/*
|
||||
* bitmaps provide an array of bits, implemented using an an
|
||||
* array of unsigned longs. The number of valid bits in a
|
||||
* given bitmap does _not_ need to be an exact multiple of
|
||||
* BITS_PER_LONG.
|
||||
*
|
||||
* The possible unused bits in the last, partially used word
|
||||
* of a bitmap are 'don't care'. The implementation makes
|
||||
* no particular effort to keep them zero. It ensures that
|
||||
* their value will not affect the results of any operation.
|
||||
* The bitmap operations that return Boolean (bitmap_empty,
|
||||
* for example) or scalar (bitmap_weight, for example) results
|
||||
* carefully filter out these unused bits from impacting their
|
||||
* results.
|
||||
*
|
||||
* These operations actually hold to a slightly stronger rule:
|
||||
* if you don't input any bitmaps to these ops that have some
|
||||
* unused bits set, then they won't output any set unused bits
|
||||
* in output bitmaps.
|
||||
*
|
||||
* The byte ordering of bitmaps is more natural on little
|
||||
* endian architectures.
|
||||
*/
|
||||
|
||||
int slow_bitmap_empty(const unsigned long *bitmap, long bits)
|
||||
{
|
||||
long k, lim = bits/BITS_PER_LONG;
|
||||
|
||||
for (k = 0; k < lim; ++k) {
|
||||
if (bitmap[k]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (bits % BITS_PER_LONG) {
|
||||
if (bitmap[k] & BITMAP_LAST_WORD_MASK(bits)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int slow_bitmap_full(const unsigned long *bitmap, long bits)
|
||||
{
|
||||
long k, lim = bits/BITS_PER_LONG;
|
||||
|
||||
for (k = 0; k < lim; ++k) {
|
||||
if (~bitmap[k]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (bits % BITS_PER_LONG) {
|
||||
if (~bitmap[k] & BITMAP_LAST_WORD_MASK(bits)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int slow_bitmap_equal(const unsigned long *bitmap1,
|
||||
const unsigned long *bitmap2, long bits)
|
||||
{
|
||||
long k, lim = bits/BITS_PER_LONG;
|
||||
|
||||
for (k = 0; k < lim; ++k) {
|
||||
if (bitmap1[k] != bitmap2[k]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (bits % BITS_PER_LONG) {
|
||||
if ((bitmap1[k] ^ bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void slow_bitmap_complement(unsigned long *dst, const unsigned long *src,
|
||||
long bits)
|
||||
{
|
||||
long k, lim = bits/BITS_PER_LONG;
|
||||
|
||||
for (k = 0; k < lim; ++k) {
|
||||
dst[k] = ~src[k];
|
||||
}
|
||||
|
||||
if (bits % BITS_PER_LONG) {
|
||||
dst[k] = ~src[k] & BITMAP_LAST_WORD_MASK(bits);
|
||||
}
|
||||
}
|
||||
|
||||
int slow_bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
|
||||
const unsigned long *bitmap2, long bits)
|
||||
{
|
||||
long k;
|
||||
long nr = BITS_TO_LONGS(bits);
|
||||
unsigned long result = 0;
|
||||
|
||||
for (k = 0; k < nr; k++) {
|
||||
result |= (dst[k] = bitmap1[k] & bitmap2[k]);
|
||||
}
|
||||
return result != 0;
|
||||
}
|
||||
|
||||
void slow_bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
|
||||
const unsigned long *bitmap2, long bits)
|
||||
{
|
||||
long k;
|
||||
long nr = BITS_TO_LONGS(bits);
|
||||
|
||||
for (k = 0; k < nr; k++) {
|
||||
dst[k] = bitmap1[k] | bitmap2[k];
|
||||
}
|
||||
}
|
||||
|
||||
void slow_bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
|
||||
const unsigned long *bitmap2, long bits)
|
||||
{
|
||||
long k;
|
||||
long nr = BITS_TO_LONGS(bits);
|
||||
|
||||
for (k = 0; k < nr; k++) {
|
||||
dst[k] = bitmap1[k] ^ bitmap2[k];
|
||||
}
|
||||
}
|
||||
|
||||
int slow_bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
|
||||
const unsigned long *bitmap2, long bits)
|
||||
{
|
||||
long k;
|
||||
long nr = BITS_TO_LONGS(bits);
|
||||
unsigned long result = 0;
|
||||
|
||||
for (k = 0; k < nr; k++) {
|
||||
result |= (dst[k] = bitmap1[k] & ~bitmap2[k]);
|
||||
}
|
||||
return result != 0;
|
||||
}
|
||||
|
||||
#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG))
|
||||
|
||||
void bitmap_set(unsigned long *map, long start, long nr)
|
||||
@ -196,61 +53,3 @@ void bitmap_clear(unsigned long *map, long start, long nr)
|
||||
*p &= ~mask_to_clear;
|
||||
}
|
||||
}
|
||||
|
||||
#define ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
|
||||
|
||||
/**
|
||||
* bitmap_find_next_zero_area - find a contiguous aligned zero area
|
||||
* @map: The address to base the search on
|
||||
* @size: The bitmap size in bits
|
||||
* @start: The bitnumber to start searching at
|
||||
* @nr: The number of zeroed bits we're looking for
|
||||
* @align_mask: Alignment mask for zero area
|
||||
*
|
||||
* The @align_mask should be one less than a power of 2; the effect is that
|
||||
* the bit offset of all zero areas this function finds is multiples of that
|
||||
* power of 2. A @align_mask of 0 means no alignment is required.
|
||||
*/
|
||||
unsigned long bitmap_find_next_zero_area(unsigned long *map,
|
||||
unsigned long size,
|
||||
unsigned long start,
|
||||
unsigned long nr,
|
||||
unsigned long align_mask)
|
||||
{
|
||||
unsigned long index, end, i;
|
||||
again:
|
||||
index = find_next_zero_bit(map, size, start);
|
||||
|
||||
/* Align allocation */
|
||||
index = ALIGN_MASK(index, align_mask);
|
||||
|
||||
end = index + nr;
|
||||
if (end > size) {
|
||||
return end;
|
||||
}
|
||||
i = find_next_bit(map, end, index);
|
||||
if (i < end) {
|
||||
start = i + 1;
|
||||
goto again;
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
int slow_bitmap_intersects(const unsigned long *bitmap1,
|
||||
const unsigned long *bitmap2, long bits)
|
||||
{
|
||||
long k, lim = bits/BITS_PER_LONG;
|
||||
|
||||
for (k = 0; k < lim; ++k) {
|
||||
if (bitmap1[k] & bitmap2[k]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (bits % BITS_PER_LONG) {
|
||||
if ((bitmap1[k] & bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -127,32 +127,3 @@ found_first:
|
||||
found_middle:
|
||||
return result + ctzl(~tmp);
|
||||
}
|
||||
|
||||
unsigned long find_last_bit(const unsigned long *addr, unsigned long size)
|
||||
{
|
||||
unsigned long words;
|
||||
unsigned long tmp;
|
||||
|
||||
/* Start at final word. */
|
||||
words = size / BITS_PER_LONG;
|
||||
|
||||
/* Partial final word? */
|
||||
if (size & (BITS_PER_LONG-1)) {
|
||||
tmp = (addr[words] & (~0UL >> (BITS_PER_LONG
|
||||
- (size & (BITS_PER_LONG-1)))));
|
||||
if (tmp) {
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
|
||||
while (words) {
|
||||
tmp = addr[--words];
|
||||
if (tmp) {
|
||||
found:
|
||||
return words * BITS_PER_LONG + BITS_PER_LONG - 1 - clzl(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Not found */
|
||||
return size;
|
||||
}
|
||||
|
@ -28,13 +28,6 @@
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
void strpadcpy(char *buf, int buf_size, const char *str, char pad)
|
||||
{
|
||||
int len = qemu_strnlen(str, buf_size);
|
||||
memcpy(buf, str, len);
|
||||
memset(buf + len, pad, buf_size - len);
|
||||
}
|
||||
|
||||
void pstrcpy(char *buf, int buf_size, const char *str)
|
||||
{
|
||||
int c;
|
||||
@ -78,108 +71,11 @@ int strstart(const char *str, const char *val, const char **ptr)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int stristart(const char *str, const char *val, const char **ptr)
|
||||
{
|
||||
const char *p, *q;
|
||||
p = str;
|
||||
q = val;
|
||||
while (*q != '\0') {
|
||||
if (qemu_toupper(*p) != qemu_toupper(*q))
|
||||
return 0;
|
||||
p++;
|
||||
q++;
|
||||
}
|
||||
if (ptr)
|
||||
*ptr = p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* XXX: use host strnlen if available ? */
|
||||
int qemu_strnlen(const char *s, int max_len)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0; i < max_len; i++) {
|
||||
if (s[i] == '\0') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
char *qemu_strsep(char **input, const char *delim)
|
||||
{
|
||||
char *result = *input;
|
||||
if (result != NULL) {
|
||||
char *p;
|
||||
|
||||
for (p = result; *p != '\0'; p++) {
|
||||
if (strchr(delim, *p)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (*p == '\0') {
|
||||
*input = NULL;
|
||||
} else {
|
||||
*p = '\0';
|
||||
*input = p + 1;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
time_t mktimegm(struct tm *tm)
|
||||
{
|
||||
time_t t;
|
||||
int y = tm->tm_year + 1900, m = tm->tm_mon + 1, d = tm->tm_mday;
|
||||
if (m < 3) {
|
||||
m += 12;
|
||||
y--;
|
||||
}
|
||||
t = 86400ULL * (d + (153 * m - 457) / 5 + 365 * y + y / 4 - y / 100 +
|
||||
y / 400 - 719469);
|
||||
t += 3600 * tm->tm_hour + 60 * tm->tm_min + tm->tm_sec;
|
||||
return t;
|
||||
}
|
||||
|
||||
int qemu_fls(int i)
|
||||
{
|
||||
return 32 - clz32(i);
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure data goes on disk, but if possible do not bother to
|
||||
* write out the inode just for timestamp updates.
|
||||
*
|
||||
* Unfortunately even in 2009 many operating systems do not support
|
||||
* fdatasync and have to fall back to fsync.
|
||||
*/
|
||||
int qemu_fdatasync(int fd)
|
||||
{
|
||||
#ifdef CONFIG_FDATASYNC
|
||||
return fdatasync(fd);
|
||||
#else
|
||||
return fsync(fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
/* Sets a specific flag */
|
||||
int fcntl_setfl(int fd, int flag)
|
||||
{
|
||||
int flags;
|
||||
|
||||
flags = fcntl(fd, F_GETFL);
|
||||
if (flags == -1)
|
||||
return -errno;
|
||||
|
||||
if (fcntl(fd, F_SETFL, flags | flag) == -1)
|
||||
return -errno;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int64_t suffix_mul(char suffix, int64_t unit)
|
||||
{
|
||||
switch (qemu_toupper(suffix)) {
|
||||
@ -259,161 +155,3 @@ int64_t strtosz(const char *nptr, char **end)
|
||||
{
|
||||
return strtosz_suffix(nptr, end, STRTOSZ_DEFSUFFIX_MB);
|
||||
}
|
||||
|
||||
/**
|
||||
* parse_uint:
|
||||
*
|
||||
* @s: String to parse
|
||||
* @value: Destination for parsed integer value
|
||||
* @endptr: Destination for pointer to first character not consumed
|
||||
* @base: integer base, between 2 and 36 inclusive, or 0
|
||||
*
|
||||
* Parse unsigned integer
|
||||
*
|
||||
* Parsed syntax is like strtoull()'s: arbitrary whitespace, a single optional
|
||||
* '+' or '-', an optional "0x" if @base is 0 or 16, one or more digits.
|
||||
*
|
||||
* If @s is null, or @base is invalid, or @s doesn't start with an
|
||||
* integer in the syntax above, set *@value to 0, *@endptr to @s, and
|
||||
* return -EINVAL.
|
||||
*
|
||||
* Set *@endptr to point right beyond the parsed integer (even if the integer
|
||||
* overflows or is negative, all digits will be parsed and *@endptr will
|
||||
* point right beyond them).
|
||||
*
|
||||
* If the integer is negative, set *@value to 0, and return -ERANGE.
|
||||
*
|
||||
* If the integer overflows unsigned long long, set *@value to
|
||||
* ULLONG_MAX, and return -ERANGE.
|
||||
*
|
||||
* Else, set *@value to the parsed integer, and return 0.
|
||||
*/
|
||||
int parse_uint(const char *s, unsigned long long *value, char **endptr,
|
||||
int base)
|
||||
{
|
||||
int r = 0;
|
||||
char *endp = (char *)s;
|
||||
unsigned long long val = 0;
|
||||
|
||||
if (!s) {
|
||||
r = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
val = strtoull(s, &endp, base);
|
||||
if (errno) {
|
||||
r = -errno;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (endp == s) {
|
||||
r = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* make sure we reject negative numbers: */
|
||||
while (isspace((unsigned char)*s)) {
|
||||
s++;
|
||||
}
|
||||
if (*s == '-') {
|
||||
val = 0;
|
||||
r = -ERANGE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
*value = val;
|
||||
*endptr = endp;
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* parse_uint_full:
|
||||
*
|
||||
* @s: String to parse
|
||||
* @value: Destination for parsed integer value
|
||||
* @base: integer base, between 2 and 36 inclusive, or 0
|
||||
*
|
||||
* Parse unsigned integer from entire string
|
||||
*
|
||||
* Have the same behavior of parse_uint(), but with an additional check
|
||||
* for additional data after the parsed number. If extra characters are present
|
||||
* after the parsed number, the function will return -EINVAL, and *@v will
|
||||
* be set to 0.
|
||||
*/
|
||||
int parse_uint_full(const char *s, unsigned long long *value, int base)
|
||||
{
|
||||
char *endp;
|
||||
int r;
|
||||
|
||||
r = parse_uint(s, value, &endp, base);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
if (*endp) {
|
||||
*value = 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int qemu_parse_fd(const char *param)
|
||||
{
|
||||
long fd;
|
||||
char *endptr;
|
||||
|
||||
errno = 0;
|
||||
fd = strtol(param, &endptr, 10);
|
||||
if (param == endptr /* no conversion performed */ ||
|
||||
errno != 0 /* not representable as long; possibly others */ ||
|
||||
*endptr != '\0' /* final string not empty */ ||
|
||||
fd < 0 /* invalid as file descriptor */ ||
|
||||
fd > INT_MAX /* not representable as int */) {
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
/* round down to the nearest power of 2*/
|
||||
int64_t pow2floor(int64_t value)
|
||||
{
|
||||
if (!is_power_of_2(value)) {
|
||||
value = 0x8000000000000000ULL >> clz64(value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Implementation of ULEB128 (http://en.wikipedia.org/wiki/LEB128)
|
||||
* Input is limited to 14-bit numbers
|
||||
*/
|
||||
int uleb128_encode_small(uint8_t *out, uint32_t n)
|
||||
{
|
||||
g_assert(n <= 0x3fff);
|
||||
if (n < 0x80) {
|
||||
*out++ = n;
|
||||
return 1;
|
||||
} else {
|
||||
*out++ = (n & 0x7f) | 0x80;
|
||||
*out++ = n >> 7;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
int uleb128_decode_small(const uint8_t *in, uint32_t *n)
|
||||
{
|
||||
if (!(*in & 0x80)) {
|
||||
*n = *in++;
|
||||
return 1;
|
||||
} else {
|
||||
*n = *in++ & 0x7f;
|
||||
/* we exceed 14 bit number */
|
||||
if (*in & 0x80) {
|
||||
return -1;
|
||||
}
|
||||
*n |= *in++ << 7;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* Commandline option parsing functions
|
||||
*
|
||||
* Copyright (c) 2003-2008 Fabrice Bellard
|
||||
* Copyright (c) 2009 Kevin Wolf <kwolf@redhat.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "qemu/option.h"
|
||||
|
||||
void parse_option_size(const char *name, const char *value,
|
||||
uint64_t *ret, Error **errp)
|
||||
{
|
||||
char *postfix;
|
||||
double sizef;
|
||||
|
||||
if (value != NULL) {
|
||||
sizef = strtod(value, &postfix);
|
||||
switch (*postfix) {
|
||||
case 'T':
|
||||
sizef *= 1024;
|
||||
/* fall through */
|
||||
case 'G':
|
||||
sizef *= 1024;
|
||||
/* fall through */
|
||||
case 'M':
|
||||
sizef *= 1024;
|
||||
/* fall through */
|
||||
case 'K':
|
||||
case 'k':
|
||||
sizef *= 1024;
|
||||
/* fall through */
|
||||
case 'b':
|
||||
case '\0':
|
||||
*ret = (uint64_t) sizef;
|
||||
break;
|
||||
default:
|
||||
error_set(errp, QERR_INVALID_PARAMETER_VALUE, name, "a size");
|
||||
#if 0 /* conversion from qerror_report() to error_set() broke this: */
|
||||
error_printf_unless_qmp("You may use k, M, G or T suffixes for "
|
||||
"kilobytes, megabytes, gigabytes and terabytes.\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
error_set(errp, QERR_INVALID_PARAMETER_VALUE, name, "a size");
|
||||
}
|
||||
}
|
@ -82,12 +82,6 @@
|
||||
#define addrrange_make addrrange_make_x86_64
|
||||
#define addrrange_shift addrrange_shift_x86_64
|
||||
#define adjust_endianness adjust_endianness_x86_64
|
||||
#define AES_cbc_encrypt AES_cbc_encrypt_x86_64
|
||||
#define AES_decrypt AES_decrypt_x86_64
|
||||
#define AES_encrypt AES_encrypt_x86_64
|
||||
#define AES_imc AES_imc_x86_64
|
||||
#define AES_set_decrypt_key AES_set_decrypt_key_x86_64
|
||||
#define AES_set_encrypt_key AES_set_encrypt_key_x86_64
|
||||
#define all_helpers all_helpers_x86_64
|
||||
#define alloc_code_gen_buffer alloc_code_gen_buffer_x86_64
|
||||
#define alloc_entry alloc_entry_x86_64
|
||||
@ -157,7 +151,6 @@
|
||||
#define ats_write ats_write_x86_64
|
||||
#define bad_mode_switch bad_mode_switch_x86_64
|
||||
#define bank_number bank_number_x86_64
|
||||
#define bitmap_find_next_zero_area bitmap_find_next_zero_area_x86_64
|
||||
#define bitmap_zero_extend bitmap_zero_extend_x86_64
|
||||
#define bp_wp_matches bp_wp_matches_x86_64
|
||||
#define breakpoint_invalidate breakpoint_invalidate_x86_64
|
||||
@ -394,13 +387,11 @@
|
||||
#define extractFloatx80Exp extractFloatx80Exp_x86_64
|
||||
#define extractFloatx80Frac extractFloatx80Frac_x86_64
|
||||
#define extractFloatx80Sign extractFloatx80Sign_x86_64
|
||||
#define fcntl_setfl fcntl_setfl_x86_64
|
||||
#define fcse_write fcse_write_x86_64
|
||||
#define find_better_copy find_better_copy_x86_64
|
||||
#define find_default_machine find_default_machine_x86_64
|
||||
#define find_desc_by_name find_desc_by_name_x86_64
|
||||
#define find_first_bit find_first_bit_x86_64
|
||||
#define find_last_bit find_last_bit_x86_64
|
||||
#define find_paging_enabled_cpu find_paging_enabled_cpu_x86_64
|
||||
#define find_ram_block find_ram_block_x86_64
|
||||
#define find_ram_offset find_ram_offset_x86_64
|
||||
@ -1951,7 +1942,6 @@
|
||||
#define io_writew io_writew_x86_64
|
||||
#define is_a64 is_a64_x86_64
|
||||
#define is_help_option is_help_option_x86_64
|
||||
#define is_power_of_2 is_power_of_2_x86_64
|
||||
#define isr_read isr_read_x86_64
|
||||
#define is_valid_option_list is_valid_option_list_x86_64
|
||||
#define iwmmxt_load_creg iwmmxt_load_creg_x86_64
|
||||
@ -2099,7 +2089,6 @@
|
||||
#define memory_region_write_accessor memory_region_write_accessor_x86_64
|
||||
#define memory_region_wrong_endianness memory_region_wrong_endianness_x86_64
|
||||
#define memory_try_enable_merging memory_try_enable_merging_x86_64
|
||||
#define mktimegm mktimegm_x86_64
|
||||
#define module_call_init module_call_init_x86_64
|
||||
#define module_load module_load_x86_64
|
||||
#define mpidr_cp_reginfo mpidr_cp_reginfo_x86_64
|
||||
@ -2235,8 +2224,6 @@
|
||||
#define parse_type_number parse_type_number_x86_64
|
||||
#define parse_type_size parse_type_size_x86_64
|
||||
#define parse_type_str parse_type_str_x86_64
|
||||
#define parse_uint parse_uint_x86_64
|
||||
#define parse_uint_full parse_uint_full_x86_64
|
||||
#define parse_value parse_value_x86_64
|
||||
#define par_write par_write_x86_64
|
||||
#define patch_reloc patch_reloc_x86_64
|
||||
@ -2273,7 +2260,6 @@
|
||||
#define pmsav5_insn_ap_write pmsav5_insn_ap_write_x86_64
|
||||
#define pmuserenr_write pmuserenr_write_x86_64
|
||||
#define pmxevtyper_write pmxevtyper_write_x86_64
|
||||
#define pow2floor pow2floor_x86_64
|
||||
#define print_type_bool print_type_bool_x86_64
|
||||
#define print_type_int print_type_int_x86_64
|
||||
#define print_type_number print_type_number_x86_64
|
||||
@ -2398,7 +2384,6 @@
|
||||
#define qemu_clock_get_us qemu_clock_get_us_x86_64
|
||||
#define qemu_clock_ptr qemu_clock_ptr_x86_64
|
||||
#define qemu_clocks qemu_clocks_x86_64
|
||||
#define qemu_fdatasync qemu_fdatasync_x86_64
|
||||
#define qemu_flush_coalesced_mmio_buffer qemu_flush_coalesced_mmio_buffer_x86_64
|
||||
#define qemu_get_cpu qemu_get_cpu_x86_64
|
||||
#define qemu_get_guest_memory_mapping qemu_get_guest_memory_mapping_x86_64
|
||||
@ -2453,8 +2438,6 @@
|
||||
#define qemu_ram_unset_idstr qemu_ram_unset_idstr_x86_64
|
||||
#define qemu_real_host_page_size qemu_real_host_page_size_x86_64
|
||||
#define qemu_st_helpers qemu_st_helpers_x86_64
|
||||
#define qemu_strnlen qemu_strnlen_x86_64
|
||||
#define qemu_strsep qemu_strsep_x86_64
|
||||
#define qemu_tcg_init_vcpu qemu_tcg_init_vcpu_x86_64
|
||||
#define qemu_try_memalign qemu_try_memalign_x86_64
|
||||
#define qentry_destroy qentry_destroy_x86_64
|
||||
@ -2609,15 +2592,6 @@
|
||||
#define shortShift192Left shortShift192Left_x86_64
|
||||
#define simple_mpu_ap_bits simple_mpu_ap_bits_x86_64
|
||||
#define size_code_gen_buffer size_code_gen_buffer_x86_64
|
||||
#define slow_bitmap_and slow_bitmap_and_x86_64
|
||||
#define slow_bitmap_andnot slow_bitmap_andnot_x86_64
|
||||
#define slow_bitmap_complement slow_bitmap_complement_x86_64
|
||||
#define slow_bitmap_empty slow_bitmap_empty_x86_64
|
||||
#define slow_bitmap_equal slow_bitmap_equal_x86_64
|
||||
#define slow_bitmap_full slow_bitmap_full_x86_64
|
||||
#define slow_bitmap_intersects slow_bitmap_intersects_x86_64
|
||||
#define slow_bitmap_or slow_bitmap_or_x86_64
|
||||
#define slow_bitmap_xor slow_bitmap_xor_x86_64
|
||||
#define softmmu_lock_user softmmu_lock_user_x86_64
|
||||
#define softmmu_lock_user_string softmmu_lock_user_string_x86_64
|
||||
#define softmmu_tget32 softmmu_tget32_x86_64
|
||||
@ -2654,9 +2628,7 @@
|
||||
#define string_input_get_visitor string_input_get_visitor_x86_64
|
||||
#define string_input_visitor_cleanup string_input_visitor_cleanup_x86_64
|
||||
#define string_input_visitor_new string_input_visitor_new_x86_64
|
||||
#define stristart stristart_x86_64
|
||||
#define strongarm_cp_reginfo strongarm_cp_reginfo_x86_64
|
||||
#define strpadcpy strpadcpy_x86_64
|
||||
#define strstart strstart_x86_64
|
||||
#define strtosz strtosz_x86_64
|
||||
#define strtosz_suffix strtosz_suffix_x86_64
|
||||
@ -3032,8 +3004,6 @@
|
||||
#define uint64_to_float128 uint64_to_float128_x86_64
|
||||
#define uint64_to_float32 uint64_to_float32_x86_64
|
||||
#define uint64_to_float64 uint64_to_float64_x86_64
|
||||
#define uleb128_decode_small uleb128_decode_small_x86_64
|
||||
#define uleb128_encode_small uleb128_encode_small_x86_64
|
||||
#define unassigned_io_ops unassigned_io_ops_x86_64
|
||||
#define unassigned_io_read unassigned_io_read_x86_64
|
||||
#define unassigned_io_write unassigned_io_write_x86_64
|
||||
|
Loading…
Reference in New Issue
Block a user