mirror of
https://github.com/golang/go
synced 2024-11-12 09:20:22 -07:00
bugs in memmove:
- has arguments (no stack split) - MOVL does not set condition R=ken2, rsc https://golang.org/cl/156086
This commit is contained in:
parent
9be56adf3c
commit
093493c6a5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user