target/s390x: Fix emulation of C(G)HRL
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 2 repliesIn review
- v22 patches 4 repliesSuperseded
- v12 patches 2 repliesSuperseded
Changes in v3 from the cover letter
* pick up R-b's (thanks Richard)
* get rid of tabs in inline asm (cosmetic only)
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | target/s390x: Fix emulation of C(G)HRLtarget/ target/ | +9 | 1 reply | |
| 2/2 | tests/tcg/s390x: Add C(G)HRL testtests/ tests/ | +81 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Richard Henderson | David Hildenbrand |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/2] target/s390x: Fix emulation of C(G)HRL
The second operand of COMPARE HALFWORD RELATIVE LONG is a signed halfword, it does not have the same size as the first operand. Fix this and add a tcg test for c(g)hrl.
v2 -> v3
* pick up R-b's (thanks Richard)
* get rid of tabs in inline asm (cosmetic only)
v1 -> v2
* rebase on newer version
Nina Schoetterl-Glausch (2):
target/s390x: Fix emulation of C(G)HRL
tests/tcg/s390x: Add C(G)HRL test
target/s390x/tcg/insn-data.h.inc | 4 +- target/s390x/tcg/translate.c | 7 +++ tests/tcg/s390x/chrl.c | 80 ++++++++++++++++++++++++++++++++ tests/tcg/s390x/Makefile.target | 1 + 4 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 tests/tcg/s390x/chrl.c
Range-diff against v2:
1: 228a1d9cfb ! 1: 899db74823 target/s390x: Fix emulation of C(G)HRL
@@ Commit message
halfword, it does not have the same size as the first operand.
+ Reviewed-by: Richard Henderson <[email protected]>
## target/s390x/tcg/insn-data.h.inc ##
2: 3b1ca6b682 ! 2: 30868c4692 tests/tcg/s390x: Add C(G)HRL test
@@ Commit message
instruction.
Test the sign extension performed on the second operand.
+ Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Nina Schoetterl-Glausch <[email protected]>
## tests/tcg/s390x/chrl.c (new) ##
@@ tests/tcg/s390x/chrl.c (new)
+ uint32_t program_mask, cc;
+
+ asm volatile (
-+ ".pushsection .rodata\n"
-+ "0: .short 1,0x8000\n"
-+ " .popsection\n"
++ ".pushsection .rodata\n"
++ "0:\n\t"
++ ".short 1, 0x8000\n\t"
++ ".popsection\n\t"
+
-+ " chrl %[r],0b\n"
-+ " ipm %[program_mask]\n"
++ "chrl %[r], 0b\n\t"
++ "ipm %[program_mask]\n"
+ : [program_mask] "=r" (program_mask)
+ : [r] "r" (1)
+ );
@@ tests/tcg/s390x/chrl.c (new)
+ assert(!cc);
+
+ asm volatile (
-+ ".pushsection .rodata\n"
-+ "0: .short -1,0x8000\n"
-+ " .popsection\n"
++ ".pushsection .rodata\n"
++ "0:\n\t"
++ ".short -1, 0x8000\n\t"
++ ".popsection\n\t"
+
-+ " chrl %[r],0b\n"
-+ " ipm %[program_mask]\n"
++ "chrl %[r], 0b\n\t"
++ "ipm %[program_mask]\n"
+ : [program_mask] "=r" (program_mask)
+ : [r] "r" (-1)
+ );
@@ tests/tcg/s390x/chrl.c (new)
+ uint32_t program_mask, cc;
+
+ asm volatile (
-+ ".pushsection .rodata\n"
-+ "0: .short 1,0x8000,0,0\n"
-+ " .popsection\n"
++ ".pushsection .rodata\n"
++ "0:\n\t"
++ ".short 1, 0x8000, 0, 0\n\t"
++ ".popsection\n\t"
+
-+ " cghrl %[r],0b\n"
-+ " ipm %[program_mask]\n"
++ "cghrl %[r], 0b\n\t"
++ "ipm %[program_mask]\n"
+ : [program_mask] "=r" (program_mask)
+ : [r] "r" (1L)
+ );
@@ tests/tcg/s390x/chrl.c (new)
+ assert(!cc);
+
+ asm volatile (
-+ ".pushsection .rodata\n"
-+ "0: .short -1,0x8000,0,0\n"
-+ " .popsection\n"
++ ".pushsection .rodata\n"
++ "0:\n\t"
++ ".short -1, 0x8000, 0, 0\n\t"
++ ".popsection\n\t"
+
-+ " cghrl %[r],0b\n"
-+ " ipm %[program_mask]\n"
++ "cghrl %[r], 0b\n\t"
++ "ipm %[program_mask]\n"
+ : [program_mask] "=r" (program_mask)
+ : [r] "r" (-1L)
+ );base-commit: 15002921e878e6cf485f655d580733b5319ea015
Signature · 1 line
2.39.1