diff --git a/qemu/aarch64.h b/qemu/aarch64.h index 6127208d..a23e4bdc 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_aarch64 #define qdict_size qdict_size_aarch64 #define qdict_type qdict_type_aarch64 +#define qemu_build_not_reached_always qemu_build_not_reached_always_aarch64 #define qemu_clock_get_us qemu_clock_get_us_aarch64 #define qemu_clock_ptr qemu_clock_ptr_aarch64 #define qemu_clocks qemu_clocks_aarch64 @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_aarch64 #define tcg_gen_divu_i32 tcg_gen_divu_i32_aarch64 #define tcg_gen_divu_i64 tcg_gen_divu_i64_aarch64 -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_aarch64 -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_aarch64 -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_aarch64 -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_aarch64 #define tcg_gen_dupi_vec tcg_gen_dupi_vec_aarch64 #define tcg_gen_dupm_vec tcg_gen_dupm_vec_aarch64 #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_aarch64 diff --git a/qemu/aarch64eb.h b/qemu/aarch64eb.h index 7d54de18..ef5be1f4 100644 --- a/qemu/aarch64eb.h +++ b/qemu/aarch64eb.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_aarch64eb #define qdict_size qdict_size_aarch64eb #define qdict_type qdict_type_aarch64eb +#define qemu_build_not_reached_always qemu_build_not_reached_always_aarch64eb #define qemu_clock_get_us qemu_clock_get_us_aarch64eb #define qemu_clock_ptr qemu_clock_ptr_aarch64eb #define qemu_clocks qemu_clocks_aarch64eb @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_aarch64eb #define tcg_gen_divu_i32 tcg_gen_divu_i32_aarch64eb #define tcg_gen_divu_i64 tcg_gen_divu_i64_aarch64eb -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_aarch64eb -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_aarch64eb -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_aarch64eb -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_aarch64eb #define tcg_gen_dupi_vec tcg_gen_dupi_vec_aarch64eb #define tcg_gen_dupm_vec tcg_gen_dupm_vec_aarch64eb #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_aarch64eb diff --git a/qemu/arm.h b/qemu/arm.h index f464f97d..bbafb73e 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_arm #define qdict_size qdict_size_arm #define qdict_type qdict_type_arm +#define qemu_build_not_reached_always qemu_build_not_reached_always_arm #define qemu_clock_get_us qemu_clock_get_us_arm #define qemu_clock_ptr qemu_clock_ptr_arm #define qemu_clocks qemu_clocks_arm @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_arm #define tcg_gen_divu_i32 tcg_gen_divu_i32_arm #define tcg_gen_divu_i64 tcg_gen_divu_i64_arm -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_arm -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_arm -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_arm -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_arm #define tcg_gen_dupi_vec tcg_gen_dupi_vec_arm #define tcg_gen_dupm_vec tcg_gen_dupm_vec_arm #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_arm diff --git a/qemu/armeb.h b/qemu/armeb.h index a0db6f19..ac184593 100644 --- a/qemu/armeb.h +++ b/qemu/armeb.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_armeb #define qdict_size qdict_size_armeb #define qdict_type qdict_type_armeb +#define qemu_build_not_reached_always qemu_build_not_reached_always_armeb #define qemu_clock_get_us qemu_clock_get_us_armeb #define qemu_clock_ptr qemu_clock_ptr_armeb #define qemu_clocks qemu_clocks_armeb @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_armeb #define tcg_gen_divu_i32 tcg_gen_divu_i32_armeb #define tcg_gen_divu_i64 tcg_gen_divu_i64_armeb -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_armeb -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_armeb -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_armeb -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_armeb #define tcg_gen_dupi_vec tcg_gen_dupi_vec_armeb #define tcg_gen_dupm_vec tcg_gen_dupm_vec_armeb #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_armeb diff --git a/qemu/header_gen.py b/qemu/header_gen.py index 512732d3..e5b8519c 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -2622,6 +2622,7 @@ symbols = ( 'qdict_rename_keys', 'qdict_size', 'qdict_type', + 'qemu_build_not_reached_always', 'qemu_clock_get_us', 'qemu_clock_ptr', 'qemu_clocks', diff --git a/qemu/include/qemu/compiler.h b/qemu/include/qemu/compiler.h index 8220b01c..5d68afb3 100644 --- a/qemu/include/qemu/compiler.h +++ b/qemu/include/qemu/compiler.h @@ -44,6 +44,33 @@ # define QEMU_NONSTRING #endif +/* + * Forced inlining may be desired to encourage constant propagation + * of function parameters. However, it can also make debugging harder, + * so disable it for a non-optimizing build. + */ +#if defined(__OPTIMIZE__) +#define QEMU_ALWAYS_INLINE __attribute__((always_inline)) +#else +#define QEMU_ALWAYS_INLINE +#endif + +/** + * qemu_build_not_reached() + * + * The compiler, during optimization, is expected to prove that a call + * to this function cannot be reached and remove it. If the compiler + * supports QEMU_ERROR, this will be reported at compile time; otherwise + * this will be reported at link time due to the missing symbol. + */ +#if defined(__OPTIMIZE__) && !defined(__NO_INLINE__) +extern void QEMU_NORETURN QEMU_ERROR("code path is reachable") + qemu_build_not_reached_always(void); +#define qemu_build_not_reached() qemu_build_not_reached_always() +#else +#define qemu_build_not_reached() g_assert_not_reached() +#endif + #ifdef _MSC_VER // MSVC support diff --git a/qemu/m68k.h b/qemu/m68k.h index e8375d3e..2ddb1e42 100644 --- a/qemu/m68k.h +++ b/qemu/m68k.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_m68k #define qdict_size qdict_size_m68k #define qdict_type qdict_type_m68k +#define qemu_build_not_reached_always qemu_build_not_reached_always_m68k #define qemu_clock_get_us qemu_clock_get_us_m68k #define qemu_clock_ptr qemu_clock_ptr_m68k #define qemu_clocks qemu_clocks_m68k @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_m68k #define tcg_gen_divu_i32 tcg_gen_divu_i32_m68k #define tcg_gen_divu_i64 tcg_gen_divu_i64_m68k -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_m68k -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_m68k -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_m68k -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_m68k #define tcg_gen_dupi_vec tcg_gen_dupi_vec_m68k #define tcg_gen_dupm_vec tcg_gen_dupm_vec_m68k #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_m68k diff --git a/qemu/mips.h b/qemu/mips.h index fdb2098e..5abc0ff5 100644 --- a/qemu/mips.h +++ b/qemu/mips.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_mips #define qdict_size qdict_size_mips #define qdict_type qdict_type_mips +#define qemu_build_not_reached_always qemu_build_not_reached_always_mips #define qemu_clock_get_us qemu_clock_get_us_mips #define qemu_clock_ptr qemu_clock_ptr_mips #define qemu_clocks qemu_clocks_mips @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_mips #define tcg_gen_divu_i32 tcg_gen_divu_i32_mips #define tcg_gen_divu_i64 tcg_gen_divu_i64_mips -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_mips -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_mips -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_mips -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_mips #define tcg_gen_dupi_vec tcg_gen_dupi_vec_mips #define tcg_gen_dupm_vec tcg_gen_dupm_vec_mips #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_mips diff --git a/qemu/mips64.h b/qemu/mips64.h index fd55fa01..040d29b5 100644 --- a/qemu/mips64.h +++ b/qemu/mips64.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_mips64 #define qdict_size qdict_size_mips64 #define qdict_type qdict_type_mips64 +#define qemu_build_not_reached_always qemu_build_not_reached_always_mips64 #define qemu_clock_get_us qemu_clock_get_us_mips64 #define qemu_clock_ptr qemu_clock_ptr_mips64 #define qemu_clocks qemu_clocks_mips64 @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_mips64 #define tcg_gen_divu_i32 tcg_gen_divu_i32_mips64 #define tcg_gen_divu_i64 tcg_gen_divu_i64_mips64 -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_mips64 -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_mips64 -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_mips64 -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_mips64 #define tcg_gen_dupi_vec tcg_gen_dupi_vec_mips64 #define tcg_gen_dupm_vec tcg_gen_dupm_vec_mips64 #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_mips64 diff --git a/qemu/mips64el.h b/qemu/mips64el.h index 4c162fa7..c0c5fb9f 100644 --- a/qemu/mips64el.h +++ b/qemu/mips64el.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_mips64el #define qdict_size qdict_size_mips64el #define qdict_type qdict_type_mips64el +#define qemu_build_not_reached_always qemu_build_not_reached_always_mips64el #define qemu_clock_get_us qemu_clock_get_us_mips64el #define qemu_clock_ptr qemu_clock_ptr_mips64el #define qemu_clocks qemu_clocks_mips64el @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_mips64el #define tcg_gen_divu_i32 tcg_gen_divu_i32_mips64el #define tcg_gen_divu_i64 tcg_gen_divu_i64_mips64el -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_mips64el -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_mips64el -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_mips64el -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_mips64el #define tcg_gen_dupi_vec tcg_gen_dupi_vec_mips64el #define tcg_gen_dupm_vec tcg_gen_dupm_vec_mips64el #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_mips64el diff --git a/qemu/mipsel.h b/qemu/mipsel.h index 92a6af93..0e4f4217 100644 --- a/qemu/mipsel.h +++ b/qemu/mipsel.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_mipsel #define qdict_size qdict_size_mipsel #define qdict_type qdict_type_mipsel +#define qemu_build_not_reached_always qemu_build_not_reached_always_mipsel #define qemu_clock_get_us qemu_clock_get_us_mipsel #define qemu_clock_ptr qemu_clock_ptr_mipsel #define qemu_clocks qemu_clocks_mipsel @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_mipsel #define tcg_gen_divu_i32 tcg_gen_divu_i32_mipsel #define tcg_gen_divu_i64 tcg_gen_divu_i64_mipsel -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_mipsel -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_mipsel -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_mipsel -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_mipsel #define tcg_gen_dupi_vec tcg_gen_dupi_vec_mipsel #define tcg_gen_dupm_vec tcg_gen_dupm_vec_mipsel #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_mipsel diff --git a/qemu/powerpc.h b/qemu/powerpc.h index e320afde..4ffbf776 100644 --- a/qemu/powerpc.h +++ b/qemu/powerpc.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_powerpc #define qdict_size qdict_size_powerpc #define qdict_type qdict_type_powerpc +#define qemu_build_not_reached_always qemu_build_not_reached_always_powerpc #define qemu_clock_get_us qemu_clock_get_us_powerpc #define qemu_clock_ptr qemu_clock_ptr_powerpc #define qemu_clocks qemu_clocks_powerpc @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_powerpc #define tcg_gen_divu_i32 tcg_gen_divu_i32_powerpc #define tcg_gen_divu_i64 tcg_gen_divu_i64_powerpc -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_powerpc -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_powerpc -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_powerpc -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_powerpc #define tcg_gen_dupi_vec tcg_gen_dupi_vec_powerpc #define tcg_gen_dupm_vec tcg_gen_dupm_vec_powerpc #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_powerpc diff --git a/qemu/riscv32.h b/qemu/riscv32.h index 592acd90..b8516fa3 100644 --- a/qemu/riscv32.h +++ b/qemu/riscv32.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_riscv32 #define qdict_size qdict_size_riscv32 #define qdict_type qdict_type_riscv32 +#define qemu_build_not_reached_always qemu_build_not_reached_always_riscv32 #define qemu_clock_get_us qemu_clock_get_us_riscv32 #define qemu_clock_ptr qemu_clock_ptr_riscv32 #define qemu_clocks qemu_clocks_riscv32 @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_riscv32 #define tcg_gen_divu_i32 tcg_gen_divu_i32_riscv32 #define tcg_gen_divu_i64 tcg_gen_divu_i64_riscv32 -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_riscv32 -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_riscv32 -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_riscv32 -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_riscv32 #define tcg_gen_dupi_vec tcg_gen_dupi_vec_riscv32 #define tcg_gen_dupm_vec tcg_gen_dupm_vec_riscv32 #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_riscv32 diff --git a/qemu/riscv64.h b/qemu/riscv64.h index 0e6f1942..70ddfc57 100644 --- a/qemu/riscv64.h +++ b/qemu/riscv64.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_riscv64 #define qdict_size qdict_size_riscv64 #define qdict_type qdict_type_riscv64 +#define qemu_build_not_reached_always qemu_build_not_reached_always_riscv64 #define qemu_clock_get_us qemu_clock_get_us_riscv64 #define qemu_clock_ptr qemu_clock_ptr_riscv64 #define qemu_clocks qemu_clocks_riscv64 @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_riscv64 #define tcg_gen_divu_i32 tcg_gen_divu_i32_riscv64 #define tcg_gen_divu_i64 tcg_gen_divu_i64_riscv64 -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_riscv64 -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_riscv64 -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_riscv64 -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_riscv64 #define tcg_gen_dupi_vec tcg_gen_dupi_vec_riscv64 #define tcg_gen_dupm_vec tcg_gen_dupm_vec_riscv64 #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_riscv64 diff --git a/qemu/sparc.h b/qemu/sparc.h index 01b18a71..a2c78c82 100644 --- a/qemu/sparc.h +++ b/qemu/sparc.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_sparc #define qdict_size qdict_size_sparc #define qdict_type qdict_type_sparc +#define qemu_build_not_reached_always qemu_build_not_reached_always_sparc #define qemu_clock_get_us qemu_clock_get_us_sparc #define qemu_clock_ptr qemu_clock_ptr_sparc #define qemu_clocks qemu_clocks_sparc @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_sparc #define tcg_gen_divu_i32 tcg_gen_divu_i32_sparc #define tcg_gen_divu_i64 tcg_gen_divu_i64_sparc -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_sparc -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_sparc -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_sparc -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_sparc #define tcg_gen_dupi_vec tcg_gen_dupi_vec_sparc #define tcg_gen_dupm_vec tcg_gen_dupm_vec_sparc #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_sparc diff --git a/qemu/sparc64.h b/qemu/sparc64.h index 78cffbae..84e8f61e 100644 --- a/qemu/sparc64.h +++ b/qemu/sparc64.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_sparc64 #define qdict_size qdict_size_sparc64 #define qdict_type qdict_type_sparc64 +#define qemu_build_not_reached_always qemu_build_not_reached_always_sparc64 #define qemu_clock_get_us qemu_clock_get_us_sparc64 #define qemu_clock_ptr qemu_clock_ptr_sparc64 #define qemu_clocks qemu_clocks_sparc64 @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_sparc64 #define tcg_gen_divu_i32 tcg_gen_divu_i32_sparc64 #define tcg_gen_divu_i64 tcg_gen_divu_i64_sparc64 -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_sparc64 -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_sparc64 -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_sparc64 -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_sparc64 #define tcg_gen_dupi_vec tcg_gen_dupi_vec_sparc64 #define tcg_gen_dupm_vec tcg_gen_dupm_vec_sparc64 #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_sparc64 diff --git a/qemu/x86_64.h b/qemu/x86_64.h index 55d0e0ee..5a30a8c2 100644 --- a/qemu/x86_64.h +++ b/qemu/x86_64.h @@ -2616,6 +2616,7 @@ #define qdict_rename_keys qdict_rename_keys_x86_64 #define qdict_size qdict_size_x86_64 #define qdict_type qdict_type_x86_64 +#define qemu_build_not_reached_always qemu_build_not_reached_always_x86_64 #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 @@ -3068,10 +3069,6 @@ #define tcg_gen_div_i64 tcg_gen_div_i64_x86_64 #define tcg_gen_divu_i32 tcg_gen_divu_i32_x86_64 #define tcg_gen_divu_i64 tcg_gen_divu_i64_x86_64 -#define tcg_gen_dup8i_vec tcg_gen_dup8i_vec_x86_64 -#define tcg_gen_dup16i_vec tcg_gen_dup16i_vec_x86_64 -#define tcg_gen_dup32i_vec tcg_gen_dup32i_vec_x86_64 -#define tcg_gen_dup64i_vec tcg_gen_dup64i_vec_x86_64 #define tcg_gen_dupi_vec tcg_gen_dupi_vec_x86_64 #define tcg_gen_dupm_vec tcg_gen_dupm_vec_x86_64 #define tcg_gen_dup_i32_vec tcg_gen_dup_i32_vec_x86_64