[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [Qemu-devel] [PATCH v6 21/26] cputlb: Replace size and endian operands for MemOp
- To: tony.nguyen@xxxxxx, qemu-devel@xxxxxxxxxx
- From: Richard Henderson <richard.henderson@xxxxxxxxxx>
- Date: Wed, 7 Aug 2019 10:38:41 -0700
- Cc: fam@xxxxxxxxxx, peter.maydell@xxxxxxxxxx, walling@xxxxxxxxxxxxx, dmitry.fleytman@xxxxxxxxx, imammedo@xxxxxxxxxx, sagark@xxxxxxxxxxxxxxxxx, david@xxxxxxxxxx, jasowang@xxxxxxxxxx, palmer@xxxxxxxxxx, mark.cave-ayland@xxxxxxxxxxxx, laurent@xxxxxxxxx, keith.busch@xxxxxxxxx, jcmvbkbc@xxxxxxxxx, frederic.konrad@xxxxxxxxxxx, pbonzini@xxxxxxxxxx, kraxel@xxxxxxxxxx, edgar.iglesias@xxxxxxxxx, gxt@xxxxxxxxxxxxxxx, pburton@xxxxxxxxxxxx, marex@xxxxxxx, robh@xxxxxxxxxx, hare@xxxxxxxx, sstabellini@xxxxxxxxxx, berto@xxxxxxxxxx, proljc@xxxxxxxxx, qemu-block@xxxxxxxxxx, arikalo@xxxxxxxxxxxx, jslaby@xxxxxxx, deller@xxxxxx, mst@xxxxxxxxxx, magnus.damm@xxxxxxxxx, pasic@xxxxxxxxxxxxx, borntraeger@xxxxxxxxxx, mreitz@xxxxxxxxxx, hpoussin@xxxxxxxxxxx, joel@xxxxxxxxx, anthony.perard@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, rth@xxxxxxxxxxx, philmd@xxxxxxxxxx, green@xxxxxxxxxxxxxx, atar4qemu@xxxxxxxxx, antonynpavlov@xxxxxxxxx, jiri@xxxxxxxxxxx, ehabkost@xxxxxxxxxx, minyard@xxxxxxx, sw@xxxxxxxxxxx, alistair@xxxxxxxxxxxxx, chouteau@xxxxxxxxxxx, b.galvani@xxxxxxxxx, eric.auger@xxxxxxxxxx, qemu-s390x@xxxxxxxxxx, qemu-arm@xxxxxxxxxx, peter.chubb@xxxxxxxxxxxx, yuval.shaia@xxxxxxxxxx, stefanha@xxxxxxxxxx, marcandre.lureau@xxxxxxxxxx, shorne@xxxxxxxxx, sundeep.lkml@xxxxxxxxx, jsnow@xxxxxxxxxx, david@xxxxxxxxxxxxxxxxxxxxx, kwolf@xxxxxxxxxx, crwulff@xxxxxxxxx, qemu-riscv@xxxxxxxxxx, xiaoguangrong.eric@xxxxxxxxx, i.mitsyanko@xxxxxxxxx, lersek@xxxxxxxxxx, cohuck@xxxxxxxxxx, alex.williamson@xxxxxxxxxx, Andrew.Baumann@xxxxxxxxxxxxx, jcd@xxxxxxxxxxxxxxx, andrew@xxxxxxxx, michael@xxxxxxxx, paul.durrant@xxxxxxxxxx, qemu-ppc@xxxxxxxxxx, huth@xxxxxxxxxxxxx, amarkovic@xxxxxxxxxxxx, kbastian@xxxxxxxxxxxxxxxxxxxxx, jan.kiszka@xxxxxx, stefanb@xxxxxxxxxxxxx, andrew.smirnov@xxxxxxxxx, aurelien@xxxxxxxxxxx, clg@xxxxxxxx
- Delivery-date: Wed, 07 Aug 2019 17:38:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Openpgp: preference=signencrypt
On 8/7/19 1:33 AM, tony.nguyen@xxxxxx wrote:
> @@ -1246,7 +1246,7 @@ typedef uint64_t FullLoadHelper(CPUArchState *env,
> target_ulong addr,
>
> static inline uint64_t __attribute__((always_inline))
> load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
> - uintptr_t retaddr, size_t size, bool big_endian, bool code_read,
> + uintptr_t retaddr, MemOp op, bool code_read,
I assume the code generation is the same, or nearly so, for these functions?
It seems like it should be, since we're replacing one set of constant arguments
with another, and the compiler should be able to fold away the same set of
tests.
But we should at least have a look...
> + switch (op) {
> + case MO_8:
> res = ldub_p(haddr);
> break;
> + case MO_BEUW:
> + res = lduw_be_p(haddr);
I don't like mixing a bare size with size+sign+endian.
I think you should go ahead and pass MO_UB.
> @@ -1605,30 +1605,27 @@ store_helper(CPUArchState *env, target_ulong addr,
> uint64_t val,
>
> do_aligned_access:
> haddr = (void *)((uintptr_t)addr + entry->addend);
> - switch (size) {
> - case 1:
> + switch (op) {
> + case MO_8:
Likewise.
r~
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|