Commit 093493c6 authored by Rob Pike's avatar Rob Pike

bugs in memmove:

	- has arguments (no stack split)
	- MOVL does not set condition

R=ken2, rsc
https://golang.org/cl/156086
parent 9be56adf
......@@ -23,11 +23,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
TEXT memmove(SB), $0
TEXT memmove(SB), 7, $0
MOVL to+0(FP), DI
MOVL fr+4(FP), SI
MOVL n+8(FP), BX
CMPL BX, $0
JLT fault
/*
......@@ -38,7 +39,7 @@
JLS back
/*
* foreward copy loop
* forward copy loop
*/
MOVL BX, CX
SHRL $2, CX
......
......@@ -23,11 +23,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
TEXT memmove(SB), $0
TEXT memmove(SB), 7, $0
MOVQ to+0(FP), DI
MOVQ fr+8(FP), SI
MOVLQSX n+16(FP), BX
CMPQ BX, $0
JLT fault
/*
......@@ -38,7 +39,7 @@
JLS back
/*
* foreward copy loop
* forward copy loop
*/
MOVQ BX, CX
SHRQ $3, CX
......
......@@ -30,8 +30,7 @@ N = 3
TMP = 3 /* N and TMP don't overlap */
TMP1 = 4
TEXT memcpy(SB), $0
TEXT memmove(SB), $-4
TEXT memmove(SB), 7, $-4
_memmove:
MOVW R(TS), to+0(FP) /* need to save for return value */
MOVW from+4(FP), R(FROM)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment