mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: refactor stackmap dumping code
Also, fix a byte-ordering problem with stack maps for assembly function signatures on big-endian targets. Change-Id: I6e8698f5fbb04b31771a65f4a8f3f9c045ff3c98 Reviewed-on: https://go-review.googlesource.com/30816 Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
15817e409b
commit
943f5afe22
3 changed files with 17 additions and 17 deletions
|
|
@ -271,6 +271,19 @@ func duintptr(s *Sym, off int, v uint64) int {
|
|||
return duintxx(s, off, v, Widthptr)
|
||||
}
|
||||
|
||||
func dbvec(s *Sym, off int, bv bvec) int {
|
||||
for j := 0; int32(j) < bv.n; j += 32 {
|
||||
word := bv.b[j/32]
|
||||
|
||||
// Runtime reads the bitmaps as byte arrays. Oblige.
|
||||
off = duint8(s, off, uint8(word))
|
||||
off = duint8(s, off, uint8(word>>8))
|
||||
off = duint8(s, off, uint8(word>>16))
|
||||
off = duint8(s, off, uint8(word>>24))
|
||||
}
|
||||
return off
|
||||
}
|
||||
|
||||
// stringConstantSyms holds the pair of symbols we create for a
|
||||
// constant string.
|
||||
type stringConstantSyms struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue