mirror of
https://github.com/golang/go
synced 2024-11-22 03:44:39 -07:00
5g, 6g, 8g: flush modified globals aggressively
The alternative is to record enough information that the trap handler know which registers contain cached globals and can flush the registers back to their original locations. That's significantly more work. This only affects globals that have been written to. Code that reads from a global should continue to registerize as well as before. Fixes #1304. R=ken2 CC=golang-dev https://golang.org/cl/5687046
This commit is contained in:
parent
f274551f96
commit
8998835543
@ -1029,6 +1029,13 @@ prop(Reg *r, Bits ref, Bits cal)
|
||||
ref.b[z] = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Work around for issue 1304:
|
||||
// flush modified globals before each instruction.
|
||||
for(z=0; z<BITS; z++)
|
||||
cal.b[z] |= externs.b[z];
|
||||
break;
|
||||
}
|
||||
for(z=0; z<BITS; z++) {
|
||||
ref.b[z] = (ref.b[z] & ~r1->set.b[z]) |
|
||||
|
@ -1085,6 +1085,13 @@ prop(Reg *r, Bits ref, Bits cal)
|
||||
ref.b[z] = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Work around for issue 1304:
|
||||
// flush modified globals before each instruction.
|
||||
for(z=0; z<BITS; z++)
|
||||
cal.b[z] |= externs.b[z];
|
||||
break;
|
||||
}
|
||||
for(z=0; z<BITS; z++) {
|
||||
ref.b[z] = (ref.b[z] & ~r1->set.b[z]) |
|
||||
|
@ -968,6 +968,13 @@ prop(Reg *r, Bits ref, Bits cal)
|
||||
ref.b[z] = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Work around for issue 1304:
|
||||
// flush modified globals before each instruction.
|
||||
for(z=0; z<BITS; z++)
|
||||
cal.b[z] |= externs.b[z];
|
||||
break;
|
||||
}
|
||||
for(z=0; z<BITS; z++) {
|
||||
ref.b[z] = (ref.b[z] & ~r1->set.b[z]) |
|
||||
|
Loading…
Reference in New Issue
Block a user