pcdata := Appendp(p, newprog)
pcdata.As = APCDATA
pcdata.From.Type = TYPE_CONST
- pcdata.From.Offset = objabi.PCDATA_StackMapIndex
+ pcdata.From.Offset = objabi.PCDATA_RegMapIndex
pcdata.To.Type = TYPE_CONST
pcdata.To.Offset = -2 // pcdata -2 marks unsafe point
- // TODO: register map?
-
return pcdata
}
pcdata := Appendp(p, newprog)
pcdata.As = APCDATA
pcdata.From.Type = TYPE_CONST
- pcdata.From.Offset = objabi.PCDATA_StackMapIndex
+ pcdata.From.Offset = objabi.PCDATA_RegMapIndex
pcdata.To.Type = TYPE_CONST
pcdata.To.Offset = oldval
prev := p0
oldval := int64(-1) // entry pcdata
for p := prev.Link; p != nil; p, prev = p.Link, p {
- if p.As == APCDATA && p.From.Offset == objabi.PCDATA_StackMapIndex {
+ if p.As == APCDATA && p.From.Offset == objabi.PCDATA_RegMapIndex {
oldval = p.To.Offset
continue
}
// use the LR for unwinding, which will be bad.
return false
}
- smi := pcdatavalue(f, _PCDATA_StackMapIndex, pc, nil)
+ smi := pcdatavalue(f, _PCDATA_RegMapIndex, pc, nil)
if smi == -2 {
// Unsafe-point marked by compiler. This includes
// atomic sequences (e.g., write barrier) and nosplit