Skip to content

Commit 4fdaeeb

Browse files
authored
Merge pull request #121 from tailscale/update-go1.24.1
Update go1.24.1
2 parents 1e81207 + 38248f8 commit 4fdaeeb

File tree

43 files changed

+21251
-147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+21251
-147
lines changed

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
go1.24.0
2-
time 2025-02-10T23:33:55Z
1+
go1.24.1
2+
time 2025-02-27T17:57:18Z

src/cmd/compile/internal/ssa/_gen/ARM64.rules

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,10 +1148,12 @@
11481148
(SUB a l:(MNEGW x y)) && v.Type.Size() <= 4 && l.Uses==1 && clobber(l) => (MADDW a x y)
11491149

11501150
// madd/msub can't take constant arguments, so do a bit of reordering if a non-constant is available.
1151-
(ADD a p:(ADDconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 => (ADDconst [c] (ADD <v.Type> a m))
1152-
(ADD a p:(SUBconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 => (SUBconst [c] (ADD <v.Type> a m))
1153-
(SUB a p:(ADDconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 => (SUBconst [c] (SUB <v.Type> a m))
1154-
(SUB a p:(SUBconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 => (ADDconst [c] (SUB <v.Type> a m))
1151+
// Note: don't reorder arithmetic concerning pointers, as we must ensure that
1152+
// no intermediate computations are invalid pointers.
1153+
(ADD <t> a p:(ADDconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 && !t.IsPtrShaped() => (ADDconst [c] (ADD <v.Type> a m))
1154+
(ADD <t> a p:(SUBconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 && !t.IsPtrShaped() => (SUBconst [c] (ADD <v.Type> a m))
1155+
(SUB <t> a p:(ADDconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 && !t.IsPtrShaped() => (SUBconst [c] (SUB <v.Type> a m))
1156+
(SUB <t> a p:(SUBconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 && !t.IsPtrShaped() => (ADDconst [c] (SUB <v.Type> a m))
11551157

11561158
// optimize ADCSflags, SBCSflags and friends
11571159
(ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c)))) => (ADCSflags x y c)

src/cmd/compile/internal/ssa/func.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ type Func struct {
4141
ABISelf *abi.ABIConfig // ABI for function being compiled
4242
ABIDefault *abi.ABIConfig // ABI for rtcall and other no-parsed-signature/pragma functions.
4343

44-
scheduled bool // Values in Blocks are in final order
45-
laidout bool // Blocks are ordered
46-
NoSplit bool // true if function is marked as nosplit. Used by schedule check pass.
47-
dumpFileSeq uint8 // the sequence numbers of dump file. (%s_%02d__%s.dump", funcname, dumpFileSeq, phaseName)
48-
IsPgoHot bool
44+
scheduled bool // Values in Blocks are in final order
45+
laidout bool // Blocks are ordered
46+
NoSplit bool // true if function is marked as nosplit. Used by schedule check pass.
47+
dumpFileSeq uint8 // the sequence numbers of dump file. (%s_%02d__%s.dump", funcname, dumpFileSeq, phaseName)
48+
IsPgoHot bool
49+
HasDeferRangeFunc bool // if true, needs a deferreturn so deferrangefunc can use it for recover() return PC
4950

5051
// when register allocation is done, maps value ids to locations
5152
RegAlloc []Location

src/cmd/compile/internal/ssa/prove.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,9 @@ func (ft *factsTable) newLimit(v *Value, newLim limit) bool {
552552
}
553553

554554
if lim.unsat() {
555+
r := !ft.unsat
555556
ft.unsat = true
556-
return true
557+
return r
557558
}
558559

559560
// Check for recursion. This normally happens because in unsatisfiable

src/cmd/compile/internal/ssa/regalloc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,6 +1670,7 @@ func (s *regAllocState) regalloc(f *Func) {
16701670
}
16711671
tmpReg = s.allocReg(m, &tmpVal)
16721672
s.nospill |= regMask(1) << tmpReg
1673+
s.tmpused |= regMask(1) << tmpReg
16731674
}
16741675

16751676
// Now that all args are in regs, we're ready to issue the value itself.

0 commit comments

Comments
 (0)