Skip to content

Commit

Permalink
runtime: fix asan asm on amd64
Browse files Browse the repository at this point in the history
On amd64, the 8-byte move instruction is MOVQ, not MOVD.

Change-Id: I48d9b6f5f9f6c7f2e3fe20fd017b816cfb3983a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/517635
Run-TryBot: Matthew Dempsky <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
mdempsky committed Aug 10, 2023
1 parent e6637f3 commit d9f7e1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/asan_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ TEXT runtime·asanpoison(SB), NOSPLIT, $0-16

// func runtime·asanregisterglobals(addr unsafe.Pointer, n uintptr)
TEXT runtime·asanregisterglobals(SB), NOSPLIT, $0-16
MOVD addr+0(FP), RARG0
MOVD size+8(FP), RARG1
MOVQ addr+0(FP), RARG0
MOVQ size+8(FP), RARG1
// void __asan_register_globals_go(void *addr, uintptr_t n);
MOVD $__asan_register_globals_go(SB), AX
MOVQ $__asan_register_globals_go(SB), AX
JMP asancall<>(SB)

// Switches SP to g0 stack and calls (AX). Arguments already set.
Expand Down

0 comments on commit d9f7e1d

Please sign in to comment.