From c0b231616b376826dececf345e9107140088eafb Mon Sep 17 00:00:00 2001 From: Finn Wilkinson Date: Mon, 16 Dec 2024 12:36:13 +0000 Subject: [PATCH] Fixed order of vector concat for NEON uminp. --- src/include/simeng/arch/aarch64/helpers/neon.hh | 4 ++-- test/regression/aarch64/instructions/neon.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/simeng/arch/aarch64/helpers/neon.hh b/src/include/simeng/arch/aarch64/helpers/neon.hh index 04c2ce0b3..110473b30 100644 --- a/src/include/simeng/arch/aarch64/helpers/neon.hh +++ b/src/include/simeng/arch/aarch64/helpers/neon.hh @@ -592,8 +592,8 @@ RegisterValue vecUMinP(srcValContainer& sourceValues) { // Concatenate the vectors T temp[2 * I]; - memcpy(temp, m, sizeof(T) * I); - memcpy(temp + (sizeof(T) * I), n, sizeof(T) * I); + memcpy(temp, n, sizeof(T) * I); + memcpy(temp + (sizeof(T) * I), m, sizeof(T) * I); T out[I]; for (int i = 0; i < I; i++) { diff --git a/test/regression/aarch64/instructions/neon.cc b/test/regression/aarch64/instructions/neon.cc index 572ad842d..96d23590a 100644 --- a/test/regression/aarch64/instructions/neon.cc +++ b/test/regression/aarch64/instructions/neon.cc @@ -2684,8 +2684,8 @@ TEST_P(InstNeon, uminp) { )"); CHECK_NEON(2, uint8_t, - {0x00, 0x11, 0x22, 0x44, 0xEE, 0xCC, 0xAA, 0x88, 0x00, 0xAA, 0xBB, - 0xDD, 0x01, 0x03, 0x05, 0x07}); + {0x00, 0xAA, 0xBB, 0xDD, 0x01, 0x03, 0x05, 0x07, 0x00, 0x11, 0x22, + 0x44, 0xEE, 0xCC, 0xAA, 0x88}); } TEST_P(InstNeon, umaxp) { // umaxp vd.16b vn.16b vm.16b