Update dependencies (#1929)

This commit is contained in:
Wim
2022-11-27 00:42:16 +01:00
committed by GitHub
parent 6da9d567dc
commit 4fd0a76727
1126 changed files with 1057766 additions and 1385139 deletions

View File

@@ -16,3 +16,4 @@ Steffen Butzer <steffen(dot)butzer@outlook.com>
Tommi Virtanen <tv@eagain.net>
Yasuhiro Matsumoto <mattn.jp@gmail.com>
Zvi Effron <zeffron@cs.hmc.edu>
Lucas Raab <tuftedocelot@fastmail.fm>

7
vendor/modernc.org/cc/v3/Makefile generated vendored
View File

@@ -63,14 +63,21 @@ build_all_targets:
GOOS=darwin GOARCH=arm64 go build -v ./...
GOOS=freebsd GOARCH=386 go build -v ./...
GOOS=freebsd GOARCH=amd64 go build -v ./...
GOOS=freebsd GOARCH=arm go build -v ./...
GOOS=freebsd GOARCH=arm64 go build -v ./...
GOOS=linux GOARCH=386 go build -v ./...
GOOS=linux GOARCH=amd64 go build -v ./...
GOOS=linux GOARCH=arm go build -v ./...
GOOS=linux GOARCH=arm64 go build -v ./...
GOOS=linux GOARCH=ppc64le go build -v ./...
GOOS=linux GOARCH=riscv64 go build -v ./...
GOOS=linux GOARCH=s390x go build -v ./...
GOOS=netbsd GOARCH=amd64 go build -v ./...
GOOS=netbsd GOARCH=arm go build -v ./...
GOOS=netbsd GOARCH=386 go build -v ./...
GOOS=openbsd GOARCH=amd64 go build -v ./...
GOOS=openbsd GOARCH=arm64 go build -v ./...
GOOS=openbsd GOARCH=386 go build -v ./...
GOOS=windows GOARCH=386 go build -v ./...
GOOS=windows GOARCH=amd64 go build -v ./...
GOOS=windows GOARCH=arm64 go build -v ./...

8
vendor/modernc.org/cc/v3/abi.go generated vendored
View File

@@ -395,8 +395,12 @@ func (a *ABI) layout(ctx *context, n Node, t *structType) *structType {
group += f.bitFieldWidth
default:
if n := group % 64; n != 0 {
group -= n
off += int64(normalizeBitFieldWidth(group) - group)
if ctx.cfg.FixBitfieldPadding {
off += int64(normalizeBitFieldWidth(group-n) - group)
} else {
group -= n
off += int64(normalizeBitFieldWidth(group) - group)
}
}
off0 := off
off = roundup(off, 8*int64(al))

View File

@@ -15,20 +15,26 @@ var (
}
abiSignedChar = map[[2]string]bool{
{"freebsd", "arm"}: false,
{"freebsd", "arm64"}: false,
{"linux", "arm"}: false,
{"linux", "arm64"}: false,
{"linux", "s390x"}: false,
{"linux", "ppc64le"}: false,
{"linux", "riscv64"}: false,
{"linux", "s390x"}: false,
{"netbsd", "arm"}: false,
{"darwin", "amd64"}: true,
{"darwin", "arm64"}: true,
{"freebsd", "amd64"}: true,
{"freebsd", "386"}: true,
{"freebsd", "amd64"}: true,
{"linux", "386"}: true,
{"linux", "amd64"}: true,
{"netbsd", "386"}: true,
{"netbsd", "amd64"}: true,
{"openbsd", "386"}: true,
{"openbsd", "amd64"}: true,
{"openbsd", "arm64"}: true,
{"windows", "386"}: true,
{"windows", "amd64"}: true,
{"windows", "arm64"}: true,
@@ -411,6 +417,38 @@ var abiTypes = map[[2]string]map[Kind]ABIType{
Int128: {16, 16, 16},
UInt128: {16, 16, 16},
},
// gcc (FreeBSD Ports Collection) 11.3.0
{"freebsd", "arm64"}: {
Void: {1, 1, 1},
Bool: {1, 1, 1},
Char: {1, 1, 1},
SChar: {1, 1, 1},
UChar: {1, 1, 1},
Short: {2, 2, 2},
UShort: {2, 2, 2},
Enum: {4, 4, 4},
Int: {4, 4, 4},
UInt: {4, 4, 4},
Long: {8, 8, 8},
ULong: {8, 8, 8},
LongLong: {8, 8, 8},
ULongLong: {8, 8, 8},
Ptr: {8, 8, 8},
Function: {8, 8, 8},
Float: {4, 4, 4},
Double: {8, 8, 8},
LongDouble: {16, 16, 16},
Int8: {1, 1, 1},
UInt8: {1, 1, 1},
Int16: {2, 2, 2},
UInt16: {2, 2, 2},
Int32: {4, 4, 4},
UInt32: {4, 4, 4},
Int64: {8, 8, 8},
UInt64: {8, 8, 8},
Int128: {16, 16, 16},
UInt128: {16, 16, 16},
},
// gcc (FreeBSD Ports Collection) 10.3.0
{"freebsd", "386"}: {
Void: {1, 1, 1},
@@ -446,6 +484,36 @@ var abiTypes = map[[2]string]map[Kind]ABIType{
Float64x: {16, 16, 16},
Float128: {16, 16, 16},
},
// gcc (FreeBSD Ports Collection) 11.3.0
{"freebsd", "arm"}: {
Void: {1, 1, 1},
Bool: {1, 1, 1},
Char: {1, 1, 1},
SChar: {1, 1, 1},
UChar: {1, 1, 1},
Short: {2, 2, 2},
UShort: {2, 2, 2},
Enum: {4, 4, 4},
Int: {4, 4, 4},
UInt: {4, 4, 4},
Long: {4, 4, 4},
ULong: {4, 4, 4},
LongLong: {8, 8, 8},
ULongLong: {8, 8, 8},
Ptr: {4, 4, 4},
Function: {4, 4, 4},
Float: {4, 4, 4},
Double: {8, 8, 8},
LongDouble: {8, 8, 8},
Int8: {1, 1, 1},
UInt8: {1, 1, 1},
Int16: {2, 2, 2},
UInt16: {2, 2, 2},
Int32: {4, 4, 4},
UInt32: {4, 4, 4},
Int64: {8, 8, 8},
UInt64: {8, 8, 8},
},
// gcc (GCC) 8.4.0
{"openbsd", "amd64"}: {
Void: {1, 1, 1},
@@ -483,6 +551,68 @@ var abiTypes = map[[2]string]map[Kind]ABIType{
Float64x: {16, 16, 16},
Float128: {16, 16, 16},
},
// OpenBSD clang version 13.0.0
{"openbsd", "arm64"}: {
Void: {1, 1, 1},
Bool: {1, 1, 1},
Char: {1, 1, 1},
SChar: {1, 1, 1},
UChar: {1, 1, 1},
Short: {2, 2, 2},
UShort: {2, 2, 2},
Enum: {4, 4, 4},
Int: {4, 4, 4},
UInt: {4, 4, 4},
Long: {8, 8, 8},
ULong: {8, 8, 8},
LongLong: {8, 8, 8},
ULongLong: {8, 8, 8},
Ptr: {8, 8, 8},
Function: {8, 8, 8},
Float: {4, 4, 4},
Double: {8, 8, 8},
LongDouble: {16, 16, 16},
Int8: {1, 1, 1},
UInt8: {1, 1, 1},
Int16: {2, 2, 2},
UInt16: {2, 2, 2},
Int32: {4, 4, 4},
UInt32: {4, 4, 4},
Int64: {8, 8, 8},
UInt64: {8, 8, 8},
Int128: {16, 16, 16},
UInt128: {16, 16, 16},
},
// OpenBSD clang version 13.0.0
{"openbsd", "386"}: {
Void: {1, 1, 1},
Bool: {1, 1, 1},
Char: {1, 1, 1},
SChar: {1, 1, 1},
UChar: {1, 1, 1},
Short: {2, 2, 2},
UShort: {2, 2, 2},
Enum: {4, 4, 4},
Int: {4, 4, 4},
UInt: {4, 4, 4},
Long: {4, 4, 4},
ULong: {4, 4, 4},
LongLong: {8, 4, 4},
ULongLong: {8, 4, 4},
Ptr: {4, 4, 4},
Function: {4, 4, 4},
Float: {4, 4, 4},
Double: {8, 4, 4},
LongDouble: {12, 4, 4},
Int8: {1, 1, 1},
UInt8: {1, 1, 1},
Int16: {2, 2, 2},
UInt16: {2, 2, 2},
Int32: {4, 4, 4},
UInt32: {4, 4, 4},
Int64: {8, 4, 4},
UInt64: {8, 4, 4},
},
// gcc (GCC) 10.3.0
{"netbsd", "amd64"}: {
Void: {1, 1, 1},
@@ -515,6 +645,71 @@ var abiTypes = map[[2]string]map[Kind]ABIType{
Int128: {16, 16, 16},
UInt128: {16, 16, 16},
},
// gcc (nb4 20200810) 7.5.0
{"netbsd", "arm"}: {
Void: {1, 1, 1},
Bool: {1, 1, 1},
Char: {1, 1, 1},
SChar: {1, 1, 1},
UChar: {1, 1, 1},
Short: {2, 2, 2},
UShort: {2, 2, 2},
Enum: {4, 4, 4},
Int: {4, 4, 4},
UInt: {4, 4, 4},
Long: {4, 4, 4},
ULong: {4, 4, 4},
LongLong: {8, 8, 8},
ULongLong: {8, 8, 8},
Ptr: {4, 4, 4},
Function: {4, 4, 4},
Float: {4, 4, 4},
Double: {8, 8, 8},
LongDouble: {8, 8, 8},
Int8: {1, 1, 1},
UInt8: {1, 1, 1},
Int16: {2, 2, 2},
UInt16: {2, 2, 2},
Int32: {4, 4, 4},
UInt32: {4, 4, 4},
Int64: {8, 8, 8},
UInt64: {8, 8, 8},
},
// gcc (nb4 20200810) 7.5.0
{"netbsd", "386"}: {
Void: {1, 1, 1},
Bool: {1, 1, 1},
Char: {1, 1, 1},
SChar: {1, 1, 1},
UChar: {1, 1, 1},
Short: {2, 2, 2},
UShort: {2, 2, 2},
Enum: {4, 4, 4},
Int: {4, 4, 4},
UInt: {4, 4, 4},
Long: {4, 4, 4},
ULong: {4, 4, 4},
LongLong: {8, 4, 4},
ULongLong: {8, 4, 4},
Ptr: {4, 4, 4},
Function: {4, 4, 4},
Float: {4, 4, 4},
Double: {8, 4, 4},
LongDouble: {12, 4, 4},
Int8: {1, 1, 1},
UInt8: {1, 1, 1},
Int16: {2, 2, 2},
UInt16: {2, 2, 2},
Int32: {4, 4, 4},
UInt32: {4, 4, 4},
Int64: {8, 4, 4},
UInt64: {8, 4, 4},
Float32: {4, 4, 4},
Float32x: {8, 4, 4},
Float64: {8, 4, 4},
Float64x: {12, 4, 4},
Float128: {16, 16, 16},
},
// gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
{"linux", "riscv64"}: {
Void: {1, 1, 1},

1
vendor/modernc.org/cc/v3/cc.go generated vendored
View File

@@ -528,6 +528,7 @@ type Config struct {
DebugWorkingDir bool // Output to stderr.
DoNotTypecheckAsm bool
EnableAssignmentCompatibilityChecking bool // No such checks performed up to v3.31.0. Currently only partially implemented.
FixBitfieldPadding bool // Fix a bug in calculating field positions after a bitfield.
InjectTracingCode bool // Output to stderr.
LongDoubleIsDouble bool
PreprocessOnly bool

8
vendor/modernc.org/cc/v3/check.go generated vendored
View File

@@ -1138,6 +1138,10 @@ func (n *UnaryExpression) check(ctx *context, isAsmArg bool) Operand {
case UnaryExpressionPlus: // '+' CastExpression
op := n.CastExpression.check(ctx, isAsmArg)
n.IsSideEffectsFree = n.CastExpression.IsSideEffectsFree
if op == nil {
//TODO report error
break
}
if !op.Type().IsArithmeticType() {
//TODO report error
break
@@ -1150,6 +1154,10 @@ func (n *UnaryExpression) check(ctx *context, isAsmArg bool) Operand {
case UnaryExpressionMinus: // '-' CastExpression
op := n.CastExpression.check(ctx, isAsmArg)
n.IsSideEffectsFree = n.CastExpression.IsSideEffectsFree
if op == nil {
//TODO report error
break
}
if op.Type().Kind() == Vector {
n.Operand = &operand{abi: &ctx.cfg.ABI, typ: op.Type()}
break

73
vendor/modernc.org/cc/v3/parser.go generated vendored
View File

@@ -3162,28 +3162,49 @@ func (p *parser) designator(acceptCol bool) (*Designator, bool) {
// iteration-statement
// jump-statement
// asm-statement
func (p *parser) statement() *Statement {
switch p.rune() {
case IDENTIFIER:
if p.peek(false) == ':' {
return &Statement{Case: StatementLabeled, LabeledStatement: p.labeledStatement()}
func (p *parser) statement() (r *Statement) {
var r0 *Statement
var prevLS, ls *LabeledStatement
defer func() {
if ls != nil {
ls.Statement = r
r = r0
}
}()
for {
switch p.rune() {
case IDENTIFIER:
switch {
case p.peek(false) == ':':
ls = p.labeledStatement()
default:
return &Statement{Case: StatementExpr, ExpressionStatement: p.expressionStatement()}
}
case '{':
return &Statement{Case: StatementCompound, CompoundStatement: p.compoundStatement(nil, nil)}
case IF, SWITCH:
return &Statement{Case: StatementSelection, SelectionStatement: p.selectionStatement()}
case WHILE, DO, FOR:
return &Statement{Case: StatementIteration, IterationStatement: p.iterationStatement()}
case GOTO, BREAK, CONTINUE, RETURN:
return &Statement{Case: StatementJump, JumpStatement: p.jumpStatement()}
case CASE, DEFAULT:
ls = p.labeledStatement()
case ASM:
return &Statement{Case: StatementAsm, AsmStatement: p.asmStatement()}
default:
return &Statement{Case: StatementExpr, ExpressionStatement: p.expressionStatement()}
}
return &Statement{Case: StatementExpr, ExpressionStatement: p.expressionStatement()}
case '{':
return &Statement{Case: StatementCompound, CompoundStatement: p.compoundStatement(nil, nil)}
case IF, SWITCH:
return &Statement{Case: StatementSelection, SelectionStatement: p.selectionStatement()}
case WHILE, DO, FOR:
return &Statement{Case: StatementIteration, IterationStatement: p.iterationStatement()}
case GOTO, BREAK, CONTINUE, RETURN:
return &Statement{Case: StatementJump, JumpStatement: p.jumpStatement()}
case CASE, DEFAULT:
return &Statement{Case: StatementLabeled, LabeledStatement: p.labeledStatement()}
case ASM:
return &Statement{Case: StatementAsm, AsmStatement: p.asmStatement()}
default:
return &Statement{Case: StatementExpr, ExpressionStatement: p.expressionStatement()}
switch {
case r0 == nil:
r0 = &Statement{Case: StatementLabeled, LabeledStatement: ls}
default:
prevLS.Statement = &Statement{Case: StatementLabeled, LabeledStatement: ls}
}
prevLS = ls
}
}
@@ -3220,7 +3241,7 @@ func (p *parser) labeledStatement() (r *LabeledStatement) {
p.block.hasLabel()
r = &LabeledStatement{
Case: LabeledStatementLabel, Token: t, Token2: t2, AttributeSpecifierList: attr,
Statement: p.statement(), lexicalScope: p.declScope, block: p.block,
lexicalScope: p.declScope, block: p.block,
}
p.declScope.declare(t.Value, r)
return r
@@ -3246,8 +3267,7 @@ func (p *parser) labeledStatement() (r *LabeledStatement) {
return &LabeledStatement{
Case: LabeledStatementRange, Token: t, ConstantExpression: e,
Token2: t2, ConstantExpression2: e2, Token3: t3,
Statement: p.statement(), lexicalScope: p.declScope,
block: p.block,
lexicalScope: p.declScope, block: p.block,
}
case ':':
t2 = p.shift()
@@ -3256,8 +3276,7 @@ func (p *parser) labeledStatement() (r *LabeledStatement) {
}
return &LabeledStatement{
Case: LabeledStatementCaseLabel, Token: t, ConstantExpression: e,
Token2: t2, Statement: p.statement(), lexicalScope: p.declScope,
block: p.block,
Token2: t2, lexicalScope: p.declScope, block: p.block,
}
case DEFAULT:
if p.switches == 0 {
@@ -3271,12 +3290,12 @@ func (p *parser) labeledStatement() (r *LabeledStatement) {
p.err("expected :")
}
return &LabeledStatement{
Case: LabeledStatementDefault, Token: t, Token2: t2, Statement: p.statement(),
Case: LabeledStatementDefault, Token: t, Token2: t2,
lexicalScope: p.declScope, block: p.block,
}
default:
p.err("expected labeled-statement")
return nil
return &LabeledStatement{}
}
}