From 8f62f31dff564289a2422d58e8ecd5062d443b81 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Tue, 9 Jul 2024 08:26:25 +0000 Subject: [PATCH] 8335906: [s390x] Test Failure: GTestWrapper.java Reviewed-by: stuefe --- src/hotspot/share/runtime/os.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index 7b766707b0d..490a04aa6f1 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -959,7 +959,7 @@ static void print_ascii_form(stringStream& ascii_form, uint64_t value, int units uint8_t c[sizeof(v)]; } u = { value }; for (int i = 0; i < unitsize; i++) { - const int idx = LITTLE_ENDIAN_ONLY(i) BIG_ENDIAN_ONLY(sizeof(u.v) - 1 - i); + const int idx = LITTLE_ENDIAN_ONLY(i) BIG_ENDIAN_ONLY(sizeof(u.v) - unitsize + i); const uint8_t c = u.c[idx]; ascii_form.put(isprint(c) && isascii(c) ? c : '.'); }