mirror of
https://github.com/golang/go
synced 2024-11-21 19:14:44 -07:00
arm: work around reg allocator bug in 5g, in two parts.
1) hack regalloc to leave R9 (m) and R10 (g) alone. the real fix is tricker, but this gets us running 2) fix up the few places in the package sources that the shortage of registers affects, by simplifying some expressions. all of this should be reverted when the right fix is in. Fixes #1084. R=rsc CC=golang-dev https://golang.org/cl/2132046
This commit is contained in:
parent
b9988edbb6
commit
0aa2317096
@ -213,6 +213,9 @@ regalloc(Node *n, Type *t, Node *o)
|
||||
{
|
||||
int i, et, fixfree, floatfree;
|
||||
|
||||
// guarantee R9 and R10 (m and g) are left alone. BUG.
|
||||
reg[9] = 1;
|
||||
reg[10] = 1;
|
||||
if(debug['r']) {
|
||||
fixfree = 0;
|
||||
for(i=REGALLOC_R0; i<=REGALLOC_RMAX; i++)
|
||||
|
@ -110,8 +110,14 @@ func newHuffmanBitWriter(w io.Writer) *huffmanBitWriter {
|
||||
}
|
||||
|
||||
func (err WrongValueError) String() string {
|
||||
return "huffmanBitWriter: " + err.name + " should belong to [" + strconv.Itoa64(int64(err.from)) + ";" +
|
||||
strconv.Itoa64(int64(err.to)) + "] but actual value is " + strconv.Itoa64(int64(err.value))
|
||||
// BUG: work around bug in 5g by simplifying expression.
|
||||
// return "huffmanBitWriter: " + err.name + " should belong to [" + strconv.Itoa64(int64(err.from)) + ";" +
|
||||
// strconv.Itoa64(int64(err.to)) + "] but actual value is " + strconv.Itoa64(int64(err.value))
|
||||
str := "huffmanBitWriter: " + err.name + " should belong to ["
|
||||
str += strconv.Itoa64(int64(err.from)) + ";"
|
||||
str += strconv.Itoa64(int64(err.to)) + "] but actual value is "
|
||||
str += strconv.Itoa64(int64(err.value))
|
||||
return str
|
||||
}
|
||||
|
||||
func (w *huffmanBitWriter) flushBits() {
|
||||
|
@ -867,9 +867,14 @@ func (dec *Decoder) compileDec(remoteId typeId, rt reflect.Type) (engine *decEng
|
||||
continue
|
||||
}
|
||||
if !dec.compatibleType(localField.Type, wireField.id) {
|
||||
return nil, os.ErrorString("gob: wrong type (" +
|
||||
localField.Type.String() + ") for received field " +
|
||||
wireStruct.name + "." + wireField.name)
|
||||
// BUG: work around bug in 5g by simplifying expression.
|
||||
// return nil, os.ErrorString("gob: wrong type (" +
|
||||
// localField.Type.String() + ") for received field " +
|
||||
// wireStruct.name + "." + wireField.name)
|
||||
str := "gob: wrong type ("
|
||||
str += localField.Type.String() + ") for received field "
|
||||
str += wireStruct.name + "." + wireField.name
|
||||
return nil, os.ErrorString(str)
|
||||
}
|
||||
op, indir, err := dec.decOpFor(wireField.id, localField.Type, localField.Name)
|
||||
if err != nil {
|
||||
|
@ -86,7 +86,11 @@ func (l *Logger) formatHeader(ns int64, calldepth int) string {
|
||||
if l.flag&(Ldate|Ltime|Lmicroseconds) != 0 {
|
||||
t := time.SecondsToLocalTime(ns / 1e9)
|
||||
if l.flag&(Ldate) != 0 {
|
||||
h += itoa(int(t.Year), 4) + "/" + itoa(t.Month, 2) + "/" + itoa(t.Day, 2) + " "
|
||||
// BUG: work around bug in 5g by simplifying expression.
|
||||
// h += itoa(int(t.Year), 4) + "/" + itoa(t.Month, 2) + "/" + itoa(t.Day, 2) + " "
|
||||
h += itoa(int(t.Year), 4)
|
||||
h += "/" + itoa(t.Month, 2)
|
||||
h += "/" + itoa(t.Day, 2) + " "
|
||||
}
|
||||
if l.flag&(Ltime|Lmicroseconds) != 0 {
|
||||
h += itoa(t.Hour, 2) + ":" + itoa(t.Minute, 2) + ":" + itoa(t.Second, 2)
|
||||
|
@ -200,10 +200,16 @@ func (ip IP) String() string {
|
||||
|
||||
// If IPv4, use dotted notation.
|
||||
if p4 := p.To4(); len(p4) == 4 {
|
||||
return itod(uint(p4[0])) + "." +
|
||||
itod(uint(p4[1])) + "." +
|
||||
itod(uint(p4[2])) + "." +
|
||||
itod(uint(p4[3]))
|
||||
// BUG: work around bug in 5g by simplifying expression.
|
||||
// return itod(uint(p4[0])) + "." +
|
||||
// itod(uint(p4[1])) + "." +
|
||||
// itod(uint(p4[2])) + "." +
|
||||
// itod(uint(p4[3]))
|
||||
str := itod(uint(p4[0])) + "."
|
||||
str += itod(uint(p4[1])) + "."
|
||||
str += itod(uint(p4[2])) + "."
|
||||
str += itod(uint(p4[3]))
|
||||
return str
|
||||
}
|
||||
if len(p) != IPv6len {
|
||||
return "?"
|
||||
|
@ -356,11 +356,17 @@ type ParseError struct {
|
||||
// String is the string representation of a ParseError.
|
||||
func (e *ParseError) String() string {
|
||||
if e.Message == "" {
|
||||
return "parsing time " +
|
||||
strconv.Quote(e.Value) + " as " +
|
||||
strconv.Quote(e.Layout) + ": cannot parse " +
|
||||
strconv.Quote(e.ValueElem) + " as " +
|
||||
strconv.Quote(e.LayoutElem)
|
||||
// BUG: work around bug in 5g by simplifying expression.
|
||||
// return "parsing time " +
|
||||
// strconv.Quote(e.Value) + " as " +
|
||||
// strconv.Quote(e.Layout) + ": cannot parse " +
|
||||
// strconv.Quote(e.ValueElem) + " as " +
|
||||
// strconv.Quote(e.LayoutElem)
|
||||
str := "parsing time " + strconv.Quote(e.Value) + " as "
|
||||
str += strconv.Quote(e.Layout) + ": cannot parse "
|
||||
str += strconv.Quote(e.ValueElem) + " as "
|
||||
str += strconv.Quote(e.LayoutElem)
|
||||
return str
|
||||
}
|
||||
return "parsing time " +
|
||||
strconv.Quote(e.Value) + e.Message
|
||||
|
@ -371,8 +371,14 @@ func (p *Parser) popElement(t *EndElement) bool {
|
||||
p.err = p.syntaxError("element <" + s.name.Local + "> closed by </" + name.Local + ">")
|
||||
return false
|
||||
case s.name.Space != name.Space:
|
||||
p.err = p.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space +
|
||||
"closed by </" + name.Local + "> in space " + name.Space)
|
||||
// BUG: work around bug in 5g by simplifying expression.
|
||||
// p.err = p.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space +
|
||||
// "closed by </" + name.Local + "> in space " + name.Space)
|
||||
str := "element <" + s.name.Local
|
||||
str += "> in space " + s.name.Space
|
||||
str += "closed by </" + name.Local
|
||||
str += "> in space " + name.Space
|
||||
p.err = p.syntaxError(str)
|
||||
return false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user