[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 8/8] target/ppc: simplify get_cpu_vsrh() and get
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 8/8] target/ppc: simplify get_cpu_vsrh() and get_cpu_vsrl() functions |
Date: |
Sun, 3 Mar 2019 15:35:18 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 3/3/19 9:23 AM, Mark Cave-Ayland wrote:
> static inline void get_cpu_vsrh(TCGv_i64 dst, int n)
> {
> - if (n < 32) {
> - get_fpr(dst, n);
> - } else {
> - get_avr64(dst, n - 32, true);
> - }
> + tcg_gen_ld_i64(dst, cpu_env, vsrh_offset(n));
> }
>
> static inline void get_cpu_vsrl(TCGv_i64 dst, int n)
> {
> - if (n < 32) {
> - get_vsrl(dst, n);
> - } else {
> - get_avr64(dst, n - 32, false);
> - }
> + tcg_gen_ld_i64(dst, cpu_env, vsrl_offset(n));
> }
>
> static inline void set_cpu_vsrh(int n, TCGv_i64 src)
> {
> - if (n < 32) {
> - set_fpr(n, src);
> - } else {
> - set_avr64(n - 32, src, true);
> - }
> + tcg_gen_st_i64(src, cpu_env, vsrh_offset(n));
> }
I think these ought to have a "high" parameter, like set/get_avr64.
r~
[Qemu-devel] [PATCH 7/8] target/ppc: introduce vsrh_offset() function, Mark Cave-Ayland, 2019/03/03
[Qemu-devel] [PATCH 3/8] target/ppc: move Vsr* macros from internal.h to cpu.h, Mark Cave-Ayland, 2019/03/03
[Qemu-devel] [PATCH 5/8] target/ppc: introduce avr_offset() function, Mark Cave-Ayland, 2019/03/03