diff options
| author | limeidan <limeidan@loongson.cn> | 2025-08-06 14:57:39 +0800 |
|---|---|---|
| committer | abner chenc <chenguoqi@loongson.cn> | 2025-08-07 19:04:41 -0700 |
| commit | 73ff6d148038da77dd05b3dca3f0767db000a0f7 (patch) | |
| tree | 3d8b69175ba4133bcdff62f6d1ecf61aec90196a /src/cmd/asm | |
| parent | f3606b0825c20e3f3ccdae00bb8d5d7d8dfd745e (diff) | |
| download | go-73ff6d148038da77dd05b3dca3f0767db000a0f7.tar.xz | |
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 <dmitshur@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
Diffstat (limited to 'src/cmd/asm')
| -rw-r--r-- | src/cmd/asm/internal/asm/testdata/loong64enc1.s | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
