aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-07-30 10:45:01 -0400
committerRuss Cox <rsc@golang.org>2015-07-30 16:14:05 +0000
commitb2dfacf35e162f7ddcc5b1ed4c1e8e87096e06a9 (patch)
tree7f788a758f50065664c7d7064aebcd773ade26a0 /src/encoding
parent7904946eeb35faece61bbf6f5b3cc8be2f519c17 (diff)
downloadgo-b2dfacf35e162f7ddcc5b1ed4c1e8e87096e06a9.tar.xz
runtime: change arm software div/mod call sequence not to modify stack
Instead of pushing the denominator argument on the stack, the denominator is now passed in m. This fixes a variety of bugs related to trying to take stack traces backwards from the middle of the software div/mod routines. Some of those bugs have been kludged around in the past, but others have not. Instead of trying to patch up after breaking the stack, this CL stops breaking the stack. This is an update of https://golang.org/cl/19810043, which was rolled back in https://golang.org/cl/20350043. The problem in the original CL was that there were divisions at bad times, when m was not available. These were divisions by constant denominators, either in C code or in assembly. The Go compiler knows how to generate division by multiplication for constant denominators, but the C compiler did not. There is no longer any C code, so that's taken care of. There was one problematic DIV in runtime.usleep (assembly) but https://golang.org/cl/12898 took care of that one. So now this approach is safe. Reject DIV/MOD in NOSPLIT functions to keep them from coming back. Fixes #6681. Fixes #6699. Fixes #10486. Change-Id: I09a13c76ad08ba75b3bd5d46a3eb78e66a84ab38 Reviewed-on: https://go-review.googlesource.com/12899 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions