aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-03-24 19:25:09 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-03-24 19:25:09 +0000
commit839a5547574e57cce62f49bfc50fe1f04b00589a (patch)
tree53fdaaf4d7f5d7804117249d1901c45120e4d8d3
parent90c49ef1650698cff1288e0d22aa858d89f820fa (diff)
parentda0af40dd70c8f8f821d79c367aecb08618af28e (diff)
downloadqemu-arm-839a5547574e57cce62f49bfc50fe1f04b00589a.tar.gz
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140324' into staging
target-arm queue for 2.0: * Fix wrong-results bug in A64 Neon MLS instruction * Fix loading of ELF images for 32 bit boards in qemu-system-aarch64 # gpg: Signature made Mon 24 Mar 2014 17:14:07 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-target-arm-20140324: target-arm: Load ELF images with the correct machine type for CPU target-arm: Fix A64 Neon MLS Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/arm/boot.c5
-rw-r--r--target-arm/translate-a64.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index dc62918da2..3d1f4a255b 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -448,6 +448,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
int initrd_size;
int is_linux = 0;
uint64_t elf_entry;
+ int elf_machine;
hwaddr entry, kernel_load_offset;
int big_endian;
static const ARMInsnFixup *primary_loader;
@@ -463,9 +464,11 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
primary_loader = bootloader_aarch64;
kernel_load_offset = KERNEL64_LOAD_ADDR;
+ elf_machine = EM_AARCH64;
} else {
primary_loader = bootloader;
kernel_load_offset = KERNEL_LOAD_ADDR;
+ elf_machine = EM_ARM;
}
info->dtb_filename = qemu_opt_get(qemu_get_machine_opts(), "dtb");
@@ -501,7 +504,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
/* Assume that raw images are linux kernels, and ELF images are not. */
kernel_size = load_elf(info->kernel_filename, NULL, NULL, &elf_entry,
- NULL, NULL, big_endian, ELF_MACHINE, 1);
+ NULL, NULL, big_endian, elf_machine, 1);
entry = elf_entry;
if (kernel_size < 0) {
kernel_size = load_uimage(info->kernel_filename, &entry, NULL,
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
index 9f0645075e..9175e48797 100644
--- a/target-arm/translate-a64.c
+++ b/target-arm/translate-a64.c
@@ -8925,7 +8925,7 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
genfn = fns[size][is_sub];
read_vec_element_i32(s, tcg_op1, rd, pass, MO_32);
- genfn(tcg_res, tcg_res, tcg_op1);
+ genfn(tcg_res, tcg_op1, tcg_res);
}
write_vec_element_i32(s, tcg_res, rd, pass, MO_32);