From 73ff6d148038da77dd05b3dca3f0767db000a0f7 Mon Sep 17 00:00:00 2001 From: limeidan Date: Wed, 6 Aug 2025 14:57:39 +0800 Subject: cmd/internal/obj/loong64: change the immediate range of ALSL{W/WU/V} When executing the alsl.w/wu/d family of instructions, the actual shift amount is the immediate value in the instruction encoding plus one. Therefore, this change is made to align the immediate value in the assembly code with the programmer's intended shift amount, and to include the result of the immediate value minus one in the final encoding. Change-Id: Ic82249251878eabde8372e183d841a03f963f9f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/693475 Reviewed-by: Dmitri Shuralyov Reviewed-by: Mark Freeman LUCI-TryBot-Result: Go LUCI Reviewed-by: abner chenc Reviewed-by: sophie zhao --- src/cmd/asm/internal/asm/testdata/loong64enc1.s | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cmd/asm') diff --git a/src/cmd/asm/internal/asm/testdata/loong64enc1.s b/src/cmd/asm/internal/asm/testdata/loong64enc1.s index 8990a99557..72e6573466 100644 --- a/src/cmd/asm/internal/asm/testdata/loong64enc1.s +++ b/src/cmd/asm/internal/asm/testdata/loong64enc1.s @@ -1101,6 +1101,6 @@ lable2: XVBITREVV $63, X2, X1 // 41fc1977 // ALSL{W/WU/D} - ALSLW $3, R4, R5, R6 // 86940500 - ALSLWU $3, R4, R5, R6 // 86940700 - ALSLV $3, R4, R5, R6 // 86942d00 + ALSLW $4, R4, R5, R6 // 86940500 + ALSLWU $4, R4, R5, R6 // 86940700 + ALSLV $4, R4, R5, R6 // 86942d00 -- cgit v1.3-5-g45d5