2b0fa727 | 20-Feb-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use tcg_constant_* in translate_vx.c.inc
In most cases, this is a simple local allocate and free replaced by tcg_constant_*. In three cases, a variable temp was initialized with a con
target/s390x: Use tcg_constant_* in translate_vx.c.inc
In most cases, this is a simple local allocate and free replaced by tcg_constant_*. In three cases, a variable temp was initialized with a constant value -- reorg to localize the constant. In gen_acc, this fixes a leak.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20230220184052.163465-5-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
6276d93f | 20-Feb-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use tcg_constant_i32 for fpinst_extract_m34
Return a constant or NULL, which means the free may be removed from all callers of fpinst_extract_m34.
Signed-off-by: Richard Henderson <ri
target/s390x: Use tcg_constant_i32 for fpinst_extract_m34
Return a constant or NULL, which means the free may be removed from all callers of fpinst_extract_m34.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20230220184052.163465-4-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
f5d7b0e2 | 20-Feb-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use tcg_constant_* for DisasCompare
The a and b fields are not modified by the consumer, and while we need not free a constant, tcg will quietly ignore such frees, so free_compare need
target/s390x: Use tcg_constant_* for DisasCompare
The a and b fields are not modified by the consumer, and while we need not free a constant, tcg will quietly ignore such frees, so free_compare need not be changed.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20230220184052.163465-3-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
f1ea739b | 20-Feb-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use tcg_constant_* in local contexts
Replace tcg_const_* with tcg_constant_* in contexts where the free to remove is nearby.
Signed-off-by: Richard Henderson <richard.henderson@linaro
target/s390x: Use tcg_constant_* in local contexts
Replace tcg_const_* with tcg_constant_* in contexts where the free to remove is nearby.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20230220184052.163465-2-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
e73a0f40 | 09-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Hoist some computation in access_memmove
Ensure that the total length is in a local variable across the byte loop. Compute size1 difference once.
Signed-off-by: Richard Henderson <ri
target/s390x: Hoist some computation in access_memmove
Ensure that the total length is in a local variable across the byte loop. Compute size1 difference once.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20230109201856.3916639-8-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
61dee10f | 09-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Inline do_access_{get,set}_byte
Inline into the parent functions with a simple test to select the page, and a new define to remove ifdefs.
Signed-off-by: Richard Henderson <richard.he
target/s390x: Inline do_access_{get,set}_byte
Inline into the parent functions with a simple test to select the page, and a new define to remove ifdefs.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20230109201856.3916639-7-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
96b1416f | 09-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Remove TLB_NOTDIRTY workarounds
When this code was written, it was using tlb_vaddr_to_host, which does not handle TLB_DIRTY. Since then, it has been converted to probe_access_flags, w
target/s390x: Remove TLB_NOTDIRTY workarounds
When this code was written, it was using tlb_vaddr_to_host, which does not handle TLB_DIRTY. Since then, it has been converted to probe_access_flags, which does.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: David Hildenbrand <david@redhat.com> Message-Id: <20230109201856.3916639-6-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
fb391b0b | 09-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Tidy access_prepare_nf
Assign to access struct immediately, rather than waiting until the end of the function. This means we can pass address of haddr struct members instead of alloca
target/s390x: Tidy access_prepare_nf
Assign to access struct immediately, rather than waiting until the end of the function. This means we can pass address of haddr struct members instead of allocating extra space on the local stack.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20230109201856.3916639-5-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
bebc8ade | 09-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use void* for haddr in S390Access
The interface from probe_access_flags is void*, and matching that will be helpful. We already rely on the gcc extension for byte arithmetic on void*.
target/s390x: Use void* for haddr in S390Access
The interface from probe_access_flags is void*, and matching that will be helpful. We already rely on the gcc extension for byte arithmetic on void*.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20230109201856.3916639-4-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
7ba5da81 | 09-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Pass S390Access pointer into access_prepare
Passing a pointer from the caller down to access_prepare_nf eliminates a structure copy.
Signed-off-by: Richard Henderson <richard.henderso
target/s390x: Pass S390Access pointer into access_prepare
Passing a pointer from the caller down to access_prepare_nf eliminates a structure copy.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20230109201856.3916639-3-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
40494314 | 09-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Fix s390_probe_access for user-only
In db9aab5783a2 we broke the contract of s390_probe_access, in that it no longer returned an exception code, nor set __excp_addr. Fix both.
Report
target/s390x: Fix s390_probe_access for user-only
In db9aab5783a2 we broke the contract of s390_probe_access, in that it no longer returned an exception code, nor set __excp_addr. Fix both.
Reported-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20230109201856.3916639-2-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
4376a770 | 15-Feb-2023 |
Thomas Huth <thuth@redhat.com> |
target/s390x/arch_dump: Simplify memory allocation in s390x_write_elf64_notes()
We are not on a hot path here, so there is no real need for the logic here with the split heap and stack space allocat
target/s390x/arch_dump: Simplify memory allocation in s390x_write_elf64_notes()
We are not on a hot path here, so there is no real need for the logic here with the split heap and stack space allocation. Simplify it by always allocating memory from the heap.
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215085703.746788-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
eb600261 | 14-Feb-2023 |
Thomas Huth <thuth@redhat.com> |
target/s390x/arch_dump: Fix memory corruption in s390x_write_elf64_notes()
"note_size" can be smaller than sizeof(note), so unconditionally calling memset(notep, 0, sizeof(note)) could cause a memor
target/s390x/arch_dump: Fix memory corruption in s390x_write_elf64_notes()
"note_size" can be smaller than sizeof(note), so unconditionally calling memset(notep, 0, sizeof(note)) could cause a memory corruption here in case notep has been allocated dynamically, thus let's use note_size as length argument for memset() instead.
Reported-by: Sebastian Mitterle <smitterl@redhat.com> Fixes: 113d8f4e95 ("s390x: pv: Add dump support") Message-Id: <20230214141056.680969-1-thuth@redhat.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
b5deff74 | 10-Nov-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Implement CC_OP_NZ in gen_op_calc_cc
This case is trivial to implement inline.
Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@li
target/s390x: Implement CC_OP_NZ in gen_op_calc_cc
This case is trivial to implement inline.
Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
1fcd84fa | 08-Nov-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
2b91240f | 20-Oct-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use Int128 for passing float128
Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henders
target/s390x: Use Int128 for passing float128
Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- v2: Fix SPEC_in1_x1.
show more ...
|
ee5e866f | 19-Oct-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use Int128 for returning float128
Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.hende
target/s390x: Use Int128 for returning float128
Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- v2: Remove extraneous return_low128.
show more ...
|
f4031d96 | 21-Oct-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Copy wout_x1 to wout_x1_P
Make a copy of wout_x1 before modifying it, as wout_x1_P emphasizing that it operates on the out/out2 pair. The insns that use x1_P are data movement that wi
target/s390x: Copy wout_x1 to wout_x1_P
Make a copy of wout_x1 before modifying it, as wout_x1_P emphasizing that it operates on the out/out2 pair. The insns that use x1_P are data movement that will not change to Int128.
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
ef45f5b9 | 20-Oct-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use Int128 for return from TRE
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderso
target/s390x: Use Int128 for return from TRE
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
c9119224 | 20-Oct-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use Int128 for return from CKSM
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henders
target/s390x: Use Int128 for return from CKSM
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
b71dd2a5 | 20-Oct-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use Int128 for return from CLST
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henders
target/s390x: Use Int128 for return from CLST
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
4e5712f9 | 19-Oct-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use a single return for helper_divs64/u64
Pack the quotient and remainder into a single Int128. Use the divu128 primitive to remove the cpu_abort on 32-bit hosts.
Reviewed-by: Philipp
target/s390x: Use a single return for helper_divs64/u64
Pack the quotient and remainder into a single Int128. Use the divu128 primitive to remove the cpu_abort on 32-bit hosts.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- v2: Extended div test case to cover these insns.
show more ...
|
6d28ff40 | 19-Oct-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/s390x: Use a single return for helper_divs32/u32
Pack the quotient and remainder into a single uint64_t.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: David Hildenbran
target/s390x: Use a single return for helper_divs32/u32
Pack the quotient and remainder into a single uint64_t.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- v2: Fix operand ordering; use tcg_extr32_i64.
show more ...
|
057733f2 | 20-Dec-2022 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
target/s390x: Restrict sysemu/reset.h to system emulation
In user emulation, threads -- implemented as CPU -- are created/destroyed, but never reset. There is no point in allowing the user emulation
target/s390x: Restrict sysemu/reset.h to system emulation
In user emulation, threads -- implemented as CPU -- are created/destroyed, but never reset. There is no point in allowing the user emulation access the sysemu/reset API.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221220145625.26392-5-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
e4272df0 | 17-Dec-2022 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
target/s390x/tcg/excp_helper: Restrict system headers to sysemu
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221217152454.96388-6-philmd@linaro.org> Reviewed-by: Thomas H
target/s390x/tcg/excp_helper: Restrict system headers to sysemu
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221217152454.96388-6-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|