mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a numeric value
TARGET_BIG_ENDIAN is *always* defined, either as 0 for little endian targets or as 1 for big endian targets. So we can use this as a value directly in places that need such a 0 or 1 for some reason, instead of taking a detour through an additional local variable or something similar. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
d417e2214d
commit
ded625e7aa
9 changed files with 18 additions and 75 deletions
|
@ -96,16 +96,11 @@ XtensaCPU *xtensa_sim_common_init(MachineState *machine)
|
|||
void xtensa_sim_load_kernel(XtensaCPU *cpu, MachineState *machine)
|
||||
{
|
||||
const char *kernel_filename = machine->kernel_filename;
|
||||
#if TARGET_BIG_ENDIAN
|
||||
int big_endian = true;
|
||||
#else
|
||||
int big_endian = false;
|
||||
#endif
|
||||
|
||||
if (kernel_filename) {
|
||||
uint64_t elf_entry;
|
||||
int success = load_elf(kernel_filename, NULL, translate_phys_addr, cpu,
|
||||
&elf_entry, NULL, NULL, NULL, big_endian,
|
||||
&elf_entry, NULL, NULL, NULL, TARGET_BIG_ENDIAN,
|
||||
EM_XTENSA, 0, 0);
|
||||
|
||||
if (success > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue