1
0
mirror of https://github.com/golang/go synced 2024-11-15 08:20:30 -07:00

runtime: change the name of variables in asan-related assembly functions

Variables in functions implemented in assembly should have the
same names as when they were defined. The names of some variables
in asan-related assembly functions do not follow the above rule,
which will cause the runtime test to fail. This CL fixes this issue.

Updates #64257

Change-Id: I261f4db807d25e460513ef1c92cd1b707cdd1a16
Reviewed-on: https://go-review.googlesource.com/c/go/+/543837
Run-TryBot: Fannie Zhang <Fannie.Zhang@arm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
fanzha02 2023-11-21 06:52:54 +00:00 committed by Fannie Zhang
parent 29ca9cc458
commit 5f7a408563
3 changed files with 15 additions and 15 deletions

View File

@ -28,7 +28,7 @@
// func runtime·doasanread(addr unsafe.Pointer, sz, sp, pc uintptr) // func runtime·doasanread(addr unsafe.Pointer, sz, sp, pc uintptr)
TEXT runtime·doasanread(SB), NOSPLIT, $0-32 TEXT runtime·doasanread(SB), NOSPLIT, $0-32
MOVQ addr+0(FP), RARG0 MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1 MOVQ sz+8(FP), RARG1
MOVQ sp+16(FP), RARG2 MOVQ sp+16(FP), RARG2
MOVQ pc+24(FP), RARG3 MOVQ pc+24(FP), RARG3
// void __asan_read_go(void *addr, uintptr_t sz, void *sp, void *pc); // void __asan_read_go(void *addr, uintptr_t sz, void *sp, void *pc);
@ -38,7 +38,7 @@ TEXT runtime·doasanread(SB), NOSPLIT, $0-32
// func runtime·doasanwrite(addr unsafe.Pointer, sz, sp, pc uintptr) // func runtime·doasanwrite(addr unsafe.Pointer, sz, sp, pc uintptr)
TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32 TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32
MOVQ addr+0(FP), RARG0 MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1 MOVQ sz+8(FP), RARG1
MOVQ sp+16(FP), RARG2 MOVQ sp+16(FP), RARG2
MOVQ pc+24(FP), RARG3 MOVQ pc+24(FP), RARG3
// void __asan_write_go(void *addr, uintptr_t sz, void *sp, void *pc); // void __asan_write_go(void *addr, uintptr_t sz, void *sp, void *pc);
@ -48,7 +48,7 @@ TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32
// func runtime·asanunpoison(addr unsafe.Pointer, sz uintptr) // func runtime·asanunpoison(addr unsafe.Pointer, sz uintptr)
TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16 TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16
MOVQ addr+0(FP), RARG0 MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1 MOVQ sz+8(FP), RARG1
// void __asan_unpoison_go(void *addr, uintptr_t sz); // void __asan_unpoison_go(void *addr, uintptr_t sz);
MOVQ $__asan_unpoison_go(SB), AX MOVQ $__asan_unpoison_go(SB), AX
JMP asancall<>(SB) JMP asancall<>(SB)
@ -56,7 +56,7 @@ TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16
// func runtime·asanpoison(addr unsafe.Pointer, sz uintptr) // func runtime·asanpoison(addr unsafe.Pointer, sz uintptr)
TEXT runtime·asanpoison(SB), NOSPLIT, $0-16 TEXT runtime·asanpoison(SB), NOSPLIT, $0-16
MOVQ addr+0(FP), RARG0 MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1 MOVQ sz+8(FP), RARG1
// void __asan_poison_go(void *addr, uintptr_t sz); // void __asan_poison_go(void *addr, uintptr_t sz);
MOVQ $__asan_poison_go(SB), AX MOVQ $__asan_poison_go(SB), AX
JMP asancall<>(SB) JMP asancall<>(SB)
@ -64,7 +64,7 @@ TEXT runtime·asanpoison(SB), NOSPLIT, $0-16
// func runtime·asanregisterglobals(addr unsafe.Pointer, n uintptr) // func runtime·asanregisterglobals(addr unsafe.Pointer, n uintptr)
TEXT runtime·asanregisterglobals(SB), NOSPLIT, $0-16 TEXT runtime·asanregisterglobals(SB), NOSPLIT, $0-16
MOVQ addr+0(FP), RARG0 MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1 MOVQ n+8(FP), RARG1
// void __asan_register_globals_go(void *addr, uintptr_t n); // void __asan_register_globals_go(void *addr, uintptr_t n);
MOVQ $__asan_register_globals_go(SB), AX MOVQ $__asan_register_globals_go(SB), AX
JMP asancall<>(SB) JMP asancall<>(SB)

View File

@ -17,7 +17,7 @@
// func runtime·doasanread(addr unsafe.Pointer, sz, sp, pc uintptr) // func runtime·doasanread(addr unsafe.Pointer, sz, sp, pc uintptr)
TEXT runtime·doasanread(SB), NOSPLIT, $0-32 TEXT runtime·doasanread(SB), NOSPLIT, $0-32
MOVD addr+0(FP), RARG0 MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1 MOVD sz+8(FP), RARG1
MOVD sp+16(FP), RARG2 MOVD sp+16(FP), RARG2
MOVD pc+24(FP), RARG3 MOVD pc+24(FP), RARG3
// void __asan_read_go(void *addr, uintptr_t sz, void *sp, void *pc); // void __asan_read_go(void *addr, uintptr_t sz, void *sp, void *pc);
@ -27,7 +27,7 @@ TEXT runtime·doasanread(SB), NOSPLIT, $0-32
// func runtime·doasanwrite(addr unsafe.Pointer, sz, sp, pc uintptr) // func runtime·doasanwrite(addr unsafe.Pointer, sz, sp, pc uintptr)
TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32 TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32
MOVD addr+0(FP), RARG0 MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1 MOVD sz+8(FP), RARG1
MOVD sp+16(FP), RARG2 MOVD sp+16(FP), RARG2
MOVD pc+24(FP), RARG3 MOVD pc+24(FP), RARG3
// void __asan_write_go(void *addr, uintptr_t sz, void *sp, void *pc); // void __asan_write_go(void *addr, uintptr_t sz, void *sp, void *pc);
@ -37,7 +37,7 @@ TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32
// func runtime·asanunpoison(addr unsafe.Pointer, sz uintptr) // func runtime·asanunpoison(addr unsafe.Pointer, sz uintptr)
TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16 TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16
MOVD addr+0(FP), RARG0 MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1 MOVD sz+8(FP), RARG1
// void __asan_unpoison_go(void *addr, uintptr_t sz); // void __asan_unpoison_go(void *addr, uintptr_t sz);
MOVD $__asan_unpoison_go(SB), FARG MOVD $__asan_unpoison_go(SB), FARG
JMP asancall<>(SB) JMP asancall<>(SB)
@ -45,7 +45,7 @@ TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16
// func runtime·asanpoison(addr unsafe.Pointer, sz uintptr) // func runtime·asanpoison(addr unsafe.Pointer, sz uintptr)
TEXT runtime·asanpoison(SB), NOSPLIT, $0-16 TEXT runtime·asanpoison(SB), NOSPLIT, $0-16
MOVD addr+0(FP), RARG0 MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1 MOVD sz+8(FP), RARG1
// void __asan_poison_go(void *addr, uintptr_t sz); // void __asan_poison_go(void *addr, uintptr_t sz);
MOVD $__asan_poison_go(SB), FARG MOVD $__asan_poison_go(SB), FARG
JMP asancall<>(SB) JMP asancall<>(SB)
@ -53,7 +53,7 @@ TEXT runtime·asanpoison(SB), NOSPLIT, $0-16
// func runtime·asanregisterglobals(addr unsafe.Pointer, n uintptr) // func runtime·asanregisterglobals(addr unsafe.Pointer, n uintptr)
TEXT runtime·asanregisterglobals(SB), NOSPLIT, $0-16 TEXT runtime·asanregisterglobals(SB), NOSPLIT, $0-16
MOVD addr+0(FP), RARG0 MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1 MOVD n+8(FP), RARG1
// void __asan_register_globals_go(void *addr, uintptr_t n); // void __asan_register_globals_go(void *addr, uintptr_t n);
MOVD $__asan_register_globals_go(SB), FARG MOVD $__asan_register_globals_go(SB), FARG
JMP asancall<>(SB) JMP asancall<>(SB)

View File

@ -17,7 +17,7 @@
// func runtime·doasanread(addr unsafe.Pointer, sz, sp, pc uintptr) // func runtime·doasanread(addr unsafe.Pointer, sz, sp, pc uintptr)
TEXT runtime·doasanread(SB), NOSPLIT, $0-32 TEXT runtime·doasanread(SB), NOSPLIT, $0-32
MOVV addr+0(FP), RARG0 MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1 MOVV sz+8(FP), RARG1
MOVV sp+16(FP), RARG2 MOVV sp+16(FP), RARG2
MOVV pc+24(FP), RARG3 MOVV pc+24(FP), RARG3
// void __asan_read_go(void *addr, uintptr_t sz, void *sp, void *pc); // void __asan_read_go(void *addr, uintptr_t sz, void *sp, void *pc);
@ -27,7 +27,7 @@ TEXT runtime·doasanread(SB), NOSPLIT, $0-32
// func runtime·doasanwrite(addr unsafe.Pointer, sz, sp, pc uintptr) // func runtime·doasanwrite(addr unsafe.Pointer, sz, sp, pc uintptr)
TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32 TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32
MOVV addr+0(FP), RARG0 MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1 MOVV sz+8(FP), RARG1
MOVV sp+16(FP), RARG2 MOVV sp+16(FP), RARG2
MOVV pc+24(FP), RARG3 MOVV pc+24(FP), RARG3
// void __asan_write_go(void *addr, uintptr_t sz, void *sp, void *pc); // void __asan_write_go(void *addr, uintptr_t sz, void *sp, void *pc);
@ -37,7 +37,7 @@ TEXT runtime·doasanwrite(SB), NOSPLIT, $0-32
// func runtime·asanunpoison(addr unsafe.Pointer, sz uintptr) // func runtime·asanunpoison(addr unsafe.Pointer, sz uintptr)
TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16 TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16
MOVV addr+0(FP), RARG0 MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1 MOVV sz+8(FP), RARG1
// void __asan_unpoison_go(void *addr, uintptr_t sz); // void __asan_unpoison_go(void *addr, uintptr_t sz);
MOVV $__asan_unpoison_go(SB), FARG MOVV $__asan_unpoison_go(SB), FARG
JMP asancall<>(SB) JMP asancall<>(SB)
@ -45,7 +45,7 @@ TEXT runtime·asanunpoison(SB), NOSPLIT, $0-16
// func runtime·asanpoison(addr unsafe.Pointer, sz uintptr) // func runtime·asanpoison(addr unsafe.Pointer, sz uintptr)
TEXT runtime·asanpoison(SB), NOSPLIT, $0-16 TEXT runtime·asanpoison(SB), NOSPLIT, $0-16
MOVV addr+0(FP), RARG0 MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1 MOVV sz+8(FP), RARG1
// void __asan_poison_go(void *addr, uintptr_t sz); // void __asan_poison_go(void *addr, uintptr_t sz);
MOVV $__asan_poison_go(SB), FARG MOVV $__asan_poison_go(SB), FARG
JMP asancall<>(SB) JMP asancall<>(SB)
@ -53,7 +53,7 @@ TEXT runtime·asanpoison(SB), NOSPLIT, $0-16
// func runtime·asanregisterglobals(addr unsafe.Pointer, n uintptr) // func runtime·asanregisterglobals(addr unsafe.Pointer, n uintptr)
TEXT runtime·asanregisterglobals(SB), NOSPLIT, $0-16 TEXT runtime·asanregisterglobals(SB), NOSPLIT, $0-16
MOVV addr+0(FP), RARG0 MOVV addr+0(FP), RARG0
MOVV size+8(FP), RARG1 MOVV n+8(FP), RARG1
// void __asan_register_globals_go(void *addr, uintptr_t n); // void __asan_register_globals_go(void *addr, uintptr_t n);
MOVV $__asan_register_globals_go(SB), FARG MOVV $__asan_register_globals_go(SB), FARG
JMP asancall<>(SB) JMP asancall<>(SB)