mirror of
https://github.com/qemu/qemu.git
synced 2026-07-09 01:56:21 +00:00
target/s390x: Replace HOST_BIG_ENDIAN #ifdef with if() check
Replace preprocessor-time #ifdef with a compile-time check to ensure all code paths are built and tested. This reduces build-time configuration complexity and simplifies code maintainability. No functional change intended. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20251010134226.72221-15-philmd@linaro.org>
This commit is contained in:
@@ -258,9 +258,9 @@ static inline int vec_reg_offset(uint8_t reg, uint8_t enr, MemOp es)
|
||||
* 16 byte operations to handle it in a special way.
|
||||
*/
|
||||
g_assert(es <= MO_64);
|
||||
#if !HOST_BIG_ENDIAN
|
||||
offs ^= (8 - bytes);
|
||||
#endif
|
||||
if (!HOST_BIG_ENDIAN) {
|
||||
offs ^= (8 - bytes);
|
||||
}
|
||||
return offs + vec_full_reg_offset(reg);
|
||||
}
|
||||
|
||||
|
||||
@@ -175,9 +175,9 @@ static void get_vec_element_ptr_i64(TCGv_ptr ptr, uint8_t reg, TCGv_i64 enr,
|
||||
|
||||
/* convert it to an element offset relative to tcg_env (vec_reg_offset() */
|
||||
tcg_gen_shli_i64(tmp, tmp, es);
|
||||
#if !HOST_BIG_ENDIAN
|
||||
tcg_gen_xori_i64(tmp, tmp, 8 - NUM_VEC_ELEMENT_BYTES(es));
|
||||
#endif
|
||||
if (!HOST_BIG_ENDIAN) {
|
||||
tcg_gen_xori_i64(tmp, tmp, 8 - NUM_VEC_ELEMENT_BYTES(es));
|
||||
}
|
||||
tcg_gen_addi_i64(tmp, tmp, vec_full_reg_offset(reg));
|
||||
|
||||
/* generate the final ptr by adding tcg_env */
|
||||
|
||||
Reference in New Issue
Block a user