Re: [PATCH 02/10] target-arm: A64: Fix vector register access on bigendian hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/28/2013 01:49 PM, Peter Maydell wrote:
>      if (size < 4) {
>          switch (size) {
>          case 0:
> -            tcg_gen_ld8u_i64(tmp, cpu_env, freg_offs);
> +            tcg_gen_ld8u_i64(tmp, cpu_env, fp_reg_offset(srcidx, MO_8));
>              break;
>          case 1:
> -            tcg_gen_ld16u_i64(tmp, cpu_env, freg_offs);
> +            tcg_gen_ld16u_i64(tmp, cpu_env, fp_reg_offset(srcidx, MO_16));
>              break;
>          case 2:
> -            tcg_gen_ld32u_i64(tmp, cpu_env, freg_offs);
> +            tcg_gen_ld32u_i64(tmp, cpu_env, fp_reg_offset(srcidx, MO_32));
>              break;
>          case 3:
> -            tcg_gen_ld_i64(tmp, cpu_env, freg_offs);
> +            tcg_gen_ld_i64(tmp, cpu_env, fp_reg_offset(srcidx, MO_64));
>              break;
>          }
>          tcg_gen_qemu_st_i64(tmp, tcg_addr, get_mem_index(s), MO_TE + size);

It occurs to me to wonder whether it wouldn't just be better to load the whole
64-bit quantity and store the piece we need, ignoring the entire host-endian issue.

I agree with the fp_reg_hi_offset helper, I just wonder if we ought not just
have a one-argument fp_reg_lo_offset helper instead of the sized one you introduce.


r~
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux