From: Josh Bleecher Snyder Date: Mon, 13 Nov 2017 06:11:33 +0000 (-0800) Subject: runtime: simplify amd64 memmove of 3/4 bytes X-Git-Tag: go1.11beta1~1611 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=910d232a28bfddbb6efdf3a2381946c314517694;p=gostls13.git runtime: simplify amd64 memmove of 3/4 bytes Change-Id: I132d3627ae301b68bf87eacb5bf41fd1ba2dcd91 Reviewed-on: https://go-review.googlesource.com/94025 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/runtime/memmove_amd64.s b/src/runtime/memmove_amd64.s index 3462bc43fc..924b11b97b 100644 --- a/src/runtime/memmove_amd64.s +++ b/src/runtime/memmove_amd64.s @@ -48,7 +48,8 @@ tail: CMPQ BX, $2 JBE move_1or2 CMPQ BX, $4 - JBE move_3or4 + JB move_3 + JBE move_4 CMPQ BX, $8 JB move_5through7 JE move_8 @@ -145,9 +146,7 @@ move_1or2: RET move_0: RET -move_3or4: - CMPQ BX, $4 - JB move_3 +move_4: MOVL (SI), AX MOVL AX, (DI) RET