From 5aaeda19c1876ecec85406726b544ac49c8f799b Mon Sep 17 00:00:00 2001 From: fanzha02 Date: Wed, 3 Jun 2020 10:33:03 +0800 Subject: [PATCH] cmd/internal/obj/arm64: fix typos in document The current document mismatches Go syntax loads a signed-byte instruction "MOVB" with GNU syntax loads an 64bit double-word instruction "ldr". This is just a typo in the document, the assembler has the correct encoding. This patch fix this error. Fixes #39367 Change-Id: Idb8f65ca540514ee5bc8f07073e756838710ba93 Reviewed-on: https://go-review.googlesource.com/c/go/+/236217 Reviewed-by: Cherry Zhang --- src/cmd/internal/obj/arm64/doc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/internal/obj/arm64/doc.go b/src/cmd/internal/obj/arm64/doc.go index d66e6f85e6..7515217544 100644 --- a/src/cmd/internal/obj/arm64/doc.go +++ b/src/cmd/internal/obj/arm64/doc.go @@ -22,7 +22,8 @@ using different register names. Examples: MOVD.P -8(R10), R8 <=> ldr x8, [x10],#-8 - MOVB.W 16(R16), R10 <=> ldr x10, [x16,#16]! + MOVB.W 16(R16), R10 <=> ldrsb x10, [x16,#16]! + MOVBU.W 16(R16), R10 <=> ldrb x10, [x16,#16]! 3. Go uses a series of MOV instructions as load and store. -- 2.48.1