Commit e2103adb authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

crypto/*, runtime: nacl asm fixes

Found by vet.

Updates #11041

Change-Id: I5217b3e20c6af435d7500d6bb487b9895efe6605
Reviewed-on: https://go-review.googlesource.com/27493
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 5abfc97e
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
// Licence: I hereby disclaim the copyright on this code and place it // Licence: I hereby disclaim the copyright on this code and place it
// in the public domain. // in the public domain.
TEXT ·block(SB),NOSPLIT,$0-32 TEXT ·block(SB),NOSPLIT,$0-16
MOVL dig+0(FP), R11 MOVL dig+0(FP), R11
MOVL p+4(FP), SI MOVL p+4(FP), SI
MOVL p_len+8(FP), DX MOVL p_len+8(FP), DX
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
FUNC4(a, b, c, d, e); \ FUNC4(a, b, c, d, e); \
MIX(a, b, c, d, e, 0xCA62C1D6) MIX(a, b, c, d, e, 0xCA62C1D6)
TEXT ·block(SB),NOSPLIT,$64-32 TEXT ·block(SB),NOSPLIT,$64-16
MOVL dig+0(FP), R14 MOVL dig+0(FP), R14
MOVL p_base+4(FP), SI MOVL p_base+4(FP), SI
MOVL p_len+8(FP), DX MOVL p_len+8(FP), DX
......
...@@ -449,13 +449,13 @@ TEXT runtime·asmcgocall(SB),NOSPLIT,$0-12 ...@@ -449,13 +449,13 @@ TEXT runtime·asmcgocall(SB),NOSPLIT,$0-12
// cgocallback(void (*fn)(void*), void *frame, uintptr framesize) // cgocallback(void (*fn)(void*), void *frame, uintptr framesize)
// Not implemented. // Not implemented.
TEXT runtime·cgocallback(SB),NOSPLIT,$0-12 TEXT runtime·cgocallback(SB),NOSPLIT,$0-16
MOVL 0, AX MOVL 0, AX
RET RET
// cgocallback_gofunc(FuncVal*, void *frame, uintptr framesize) // cgocallback_gofunc(FuncVal*, void *frame, uintptr framesize)
// Not implemented. // Not implemented.
TEXT ·cgocallback_gofunc(SB),NOSPLIT,$0-12 TEXT ·cgocallback_gofunc(SB),NOSPLIT,$0-16
MOVL 0, AX MOVL 0, AX
RET RET
...@@ -561,20 +561,20 @@ TEXT runtime·aeshash(SB),NOSPLIT,$0-20 ...@@ -561,20 +561,20 @@ TEXT runtime·aeshash(SB),NOSPLIT,$0-20
MOVL AX, ret+16(FP) MOVL AX, ret+16(FP)
RET RET
TEXT runtime·aeshashstr(SB),NOSPLIT,$0-20 TEXT runtime·aeshashstr(SB),NOSPLIT,$0-12
MOVL AX, ret+16(FP) MOVL AX, ret+8(FP)
RET RET
TEXT runtime·aeshash32(SB),NOSPLIT,$0-20 TEXT runtime·aeshash32(SB),NOSPLIT,$0-12
MOVL AX, ret+16(FP) MOVL AX, ret+8(FP)
RET RET
TEXT runtime·aeshash64(SB),NOSPLIT,$0-20 TEXT runtime·aeshash64(SB),NOSPLIT,$0-12
MOVL AX, ret+16(FP) MOVL AX, ret+8(FP)
RET RET
// memequal(p, q unsafe.Pointer, size uintptr) bool // memequal(p, q unsafe.Pointer, size uintptr) bool
TEXT runtime·memequal(SB),NOSPLIT,$0-13 TEXT runtime·memequal(SB),NOSPLIT,$0-17
MOVL a+0(FP), SI MOVL a+0(FP), SI
MOVL b+4(FP), DI MOVL b+4(FP), DI
CMPL SI, DI CMPL SI, DI
...@@ -607,16 +607,16 @@ eq: ...@@ -607,16 +607,16 @@ eq:
// See runtime_test.go:eqstring_generic for // See runtime_test.go:eqstring_generic for
// equivalent Go code. // equivalent Go code.
TEXT runtime·eqstring(SB),NOSPLIT,$0-17 TEXT runtime·eqstring(SB),NOSPLIT,$0-17
MOVL s1str+0(FP), SI MOVL s1_base+0(FP), SI
MOVL s2str+8(FP), DI MOVL s2_base+8(FP), DI
CMPL SI, DI CMPL SI, DI
JEQ same JEQ same
MOVL s1len+4(FP), BX MOVL s1_len+4(FP), BX
CALL runtime·memeqbody(SB) CALL runtime·memeqbody(SB)
MOVB AX, v+16(FP) MOVB AX, ret+16(FP)
RET RET
same: same:
MOVB $1, v+16(FP) MOVB $1, ret+16(FP)
RET RET
// a in SI // a in SI
......
...@@ -414,8 +414,8 @@ MOVL $1, DI; NACL_SYSCALL(SYS_exit) ...@@ -414,8 +414,8 @@ MOVL $1, DI; NACL_SYSCALL(SYS_exit)
// func getRandomData([]byte) // func getRandomData([]byte)
TEXT runtime·getRandomData(SB),NOSPLIT,$0-12 TEXT runtime·getRandomData(SB),NOSPLIT,$0-12
MOVL buf+0(FP), DI MOVL arg_base+0(FP), DI
MOVL len+4(FP), SI MOVL arg_len+4(FP), SI
NACL_SYSCALL(SYS_get_random_bytes) NACL_SYSCALL(SYS_get_random_bytes)
RET RET
......
...@@ -303,8 +303,8 @@ TEXT runtime·nacl_sysinfo(SB),NOSPLIT,$16 ...@@ -303,8 +303,8 @@ TEXT runtime·nacl_sysinfo(SB),NOSPLIT,$16
// func getRandomData([]byte) // func getRandomData([]byte)
TEXT runtime·getRandomData(SB),NOSPLIT,$0-12 TEXT runtime·getRandomData(SB),NOSPLIT,$0-12
MOVW buf+0(FP), R0 MOVW arg_base+0(FP), R0
MOVW len+4(FP), R1 MOVW arg_len+4(FP), R1
NACL_SYSCALL(SYS_get_random_bytes) NACL_SYSCALL(SYS_get_random_bytes)
RET RET
......
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