[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 21/26] cputlb: Replace size and endian operan
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v6 21/26] cputlb: Replace size and endian operands for MemOp |
Date: |
Wed, 7 Aug 2019 10:38:41 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/7/19 1:33 AM, address@hidden 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~
- Re: [Qemu-devel] [PATCH v6 15/26] build: Correct non-common common-obj-* to obj-*, (continued)
- [Qemu-devel] [PATCH v6 23/26] cpu: TLB_FLAGS_MASK bit to force memory slow path, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 24/26] cputlb: Byte swap memory transaction attribute, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 22/26] memory: Single byte swap along the I/O path, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 21/26] cputlb: Replace size and endian operands for MemOp, tony.nguyen, 2019/08/07
- Re: [Qemu-devel] [PATCH v6 21/26] cputlb: Replace size and endian operands for MemOp,
Richard Henderson <=
- [Qemu-devel] [PATCH v6 25/26] target/sparc: Add TLB entry with attributes, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 26/26] target/sparc: sun4u Invert Endian TTE bit, tony.nguyen, 2019/08/07
- Re: [Qemu-devel] [PATCH v6 00/26] Invert Endian bit in SPARCv9 MMU TTE, Philippe Mathieu-Daudé, 2019/08/07
- [Qemu-devel] [PATCH v6 17/26] exec: Replace device_endian with MemOp, tony.nguyen, 2019/08/07