From owner-svn-src-projects@freebsd.org Sun Feb 10 12:45:37 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF35A14C58AF for ; Sun, 10 Feb 2019 12:45:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DEC876185; Sun, 10 Feb 2019 12:45:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F96E18AC7; Sun, 10 Feb 2019 12:45:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1ACjajk081843; Sun, 10 Feb 2019 12:45:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1ACjYib081831; Sun, 10 Feb 2019 12:45:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902101245.x1ACjYib081831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 10 Feb 2019 12:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r343955 - in projects/clang800-import/contrib/llvm: lib/Target/X86 lib/Target/X86/AsmParser lib/Target/X86/InstPrinter utils/TableGen X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang800-import/contrib/llvm: lib/Target/X86 lib/Target/X86/AsmParser lib/Target/X86/InstPrinter utils/TableGen X-SVN-Commit-Revision: 343955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9DEC876185 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2019 12:45:37 -0000 Author: dim Date: Sun Feb 10 12:45:33 2019 New Revision: 343955 URL: https://svnweb.freebsd.org/changeset/base/343955 Log: Pull in r352607 from upstream llvm trunk (by Craig Topper): [X86] Add FPSW as a Def on some FP instructions that were missing it. Pull in r352608 from upstream llvm trunk (by Craig Topper): [X86] Remove a couple places where we unnecessarily pass 0 to the EmitPriority of some FP instruction aliases. NFC As far as I can tell we already won't emit these aliases due to an operand count check in the tablegen code. Removing these because I couldn't make sense of the inconsistency between fadd and fmul from reading the code. I checked the AsmMatcher and AsmWriter files before and after this change and there were no differences. Pull in r353015 from upstream llvm trunk (by Craig Topper): [X86] Print %st(0) as %st when its implicit to the instruction. Continue printing it as %st(0) when its encoded in the instruction. This is a step back from the change I made in r352985. This appears to be more consistent with gcc and objdump behavior. Pull in r353061 from upstream llvm trunk (by Craig Topper): [X86] Print all register forms of x87 fadd/fsub/fdiv/fmul as having two arguments where on is %st. All of these instructions consume one encoded register and the other register is %st. They either write the result to %st or the encoded register. Previously we printed both arguments when the encoded register was written. And we printed one argument when the result was written to %st. For the stack popping forms the encoded register is always the destination and we didn't print both operands. This was inconsistent with gcc and objdump and just makes the output assembly code harder to read. This patch changes things to always print both operands making us consistent with gcc and objdump. The parser should still be able to handle the single register forms just as it did before. This also matches the GNU assembler behavior. Pull in r353141 from upstream llvm trunk (by Craig Topper): [X86] Connect the default fpsr and dirflag clobbers in inline assembly to the registers we have defined for them. Summary: We don't currently map these constraints to physical register numbers so they don't make it to the MachineIR representation of inline assembly. This could have problems for proper dependency tracking in the machine schedulers though I don't have a test case that shows that. Reviewers: rnk Reviewed By: rnk Subscribers: eraman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57641 Pull in r353489 from upstream llvm trunk (by Craig Topper): [X86] Add FPCW as a register and start using it as an implicit use on floating point instructions. Summary: FPCW contains the rounding mode control which we manipulate to implement fp to integer conversion by changing the roudning mode, storing the value to the stack, and then changing the rounding mode back. Because we didn't model FPCW and its dependency chain, other instructions could be scheduled into the middle of the sequence. This patch introduces the register and adds it as an implciit def of FLDCW and implicit use of the FP binary arithmetic instructions and store instructions. There are more instructions that need to be updated, but this is a good start. I believe this fixes at least the reduced test case from PR40529. Reviewers: RKSimon, spatel, rnk, efriedma, andrew.w.kaylor Subscribers: dim, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57735 These should fix a problem in clang 7.0 where it would sometimes emit long double floating point instructions in a slightly wrong order, leading to failures in our libm tests. In particular, the cbrt_test test case 'cbrtl_powl' and the trig_test test case 'reduction'. Reported by: lwhsu PR: 234040 Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=40206 Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h projects/clang800-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/clang800-import/contrib/llvm/lib/Target/X86/X86InstrFPStack.td projects/clang800-import/contrib/llvm/lib/Target/X86/X86InstrInfo.td projects/clang800-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp projects/clang800-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.td projects/clang800-import/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp Sun Feb 10 12:45:33 2019 (r343955) @@ -1115,8 +1115,7 @@ bool X86AsmParser::ParseRegister(unsigned &RegNo, } // Parse "%st" as "%st(0)" and "%st(1)", which is multiple tokens. - if (RegNo == 0 && (Tok.getString() == "st" || Tok.getString() == "ST")) { - RegNo = X86::ST0; + if (RegNo == X86::ST0) { Parser.Lex(); // Eat 'st' // Check to see if we have '(4)' after %st. Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp Sun Feb 10 12:45:33 2019 (r343955) @@ -200,3 +200,14 @@ void X86ATTInstPrinter::printU8Imm(const MCInst *MI, u O << markup("getOperand(Op).getImm() & 0xff) << markup(">"); } + +void X86ATTInstPrinter::printSTiRegOperand(const MCInst *MI, unsigned OpNo, + raw_ostream &OS) { + const MCOperand &Op = MI->getOperand(OpNo); + unsigned Reg = Op.getReg(); + // Override the default printing to print st(0) instead st. + if (Reg == X86::ST0) + OS << markup(""); + else + printRegName(OS, Reg); +} Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h Sun Feb 10 12:45:33 2019 (r343955) @@ -44,6 +44,7 @@ class X86ATTInstPrinter final : public X86InstPrinterC void printSrcIdx(const MCInst *MI, unsigned Op, raw_ostream &O); void printDstIdx(const MCInst *MI, unsigned Op, raw_ostream &O); void printU8Imm(const MCInst *MI, unsigned Op, raw_ostream &OS); + void printSTiRegOperand(const MCInst *MI, unsigned OpNo, raw_ostream &OS); void printanymem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { printMemReference(MI, OpNo, O); Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp Sun Feb 10 12:45:33 2019 (r343955) @@ -160,3 +160,14 @@ void X86IntelInstPrinter::printU8Imm(const MCInst *MI, O << formatImm(MI->getOperand(Op).getImm() & 0xff); } + +void X86IntelInstPrinter::printSTiRegOperand(const MCInst *MI, unsigned OpNo, + raw_ostream &OS) { + const MCOperand &Op = MI->getOperand(OpNo); + unsigned Reg = Op.getReg(); + // Override the default printing to print st(0) instead st. + if (Reg == X86::ST0) + OS << "st(0)"; + else + printRegName(OS, Reg); +} Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h Sun Feb 10 12:45:33 2019 (r343955) @@ -39,6 +39,7 @@ class X86IntelInstPrinter final : public X86InstPrinte void printSrcIdx(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printDstIdx(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printU8Imm(const MCInst *MI, unsigned Op, raw_ostream &O); + void printSTiRegOperand(const MCInst *MI, unsigned OpNo, raw_ostream &OS); void printanymem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { printMemReference(MI, OpNo, O); Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sun Feb 10 12:45:33 2019 (r343955) @@ -42507,6 +42507,14 @@ X86TargetLowering::getRegForInlineAsmConstraint(const if (StringRef("{flags}").equals_lower(Constraint)) return std::make_pair(X86::EFLAGS, &X86::CCRRegClass); + // dirflag -> DF + if (StringRef("{dirflag}").equals_lower(Constraint)) + return std::make_pair(X86::DF, &X86::DFCCRRegClass); + + // fpsr -> FPSW + if (StringRef("{fpsr}").equals_lower(Constraint)) + return std::make_pair(X86::FPSW, &X86::FPCCRRegClass); + // 'A' means [ER]AX + [ER]DX. if (Constraint == "A") { if (Subtarget.is64Bit()) Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/X86InstrFPStack.td ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/X86InstrFPStack.td Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/X86InstrFPStack.td Sun Feb 10 12:45:33 2019 (r343955) @@ -230,7 +230,7 @@ def _FI32m : FPI<0xDA, fp, (outs), (ins i32mem:$src), } // mayLoad = 1, hasSideEffects = 1 } -let Defs = [FPSW] in { +let Defs = [FPSW], Uses = [FPCW] in { // FPBinary_rr just defines pseudo-instructions, no need to set a scheduling // resources. let hasNoSchedulingInfo = 1 in { @@ -258,42 +258,42 @@ defm DIVR: FPBinary; } // Defs = [FPSW] class FPST0rInst - : FPI<0xD8, fp, (outs), (ins RST:$op), asm>; + : FPI<0xD8, fp, (outs), (ins RSTi:$op), asm>; class FPrST0Inst - : FPI<0xDC, fp, (outs), (ins RST:$op), asm>; + : FPI<0xDC, fp, (outs), (ins RSTi:$op), asm>; class FPrST0PInst - : FPI<0xDE, fp, (outs), (ins RST:$op), asm>; + : FPI<0xDE, fp, (outs), (ins RSTi:$op), asm>; // NOTE: GAS and apparently all other AT&T style assemblers have a broken notion // of some of the 'reverse' forms of the fsub and fdiv instructions. As such, // we have to put some 'r's in and take them out of weird places. -let SchedRW = [WriteFAdd] in { -def ADD_FST0r : FPST0rInst ; -def ADD_FrST0 : FPrST0Inst ; -def ADD_FPrST0 : FPrST0PInst; -def SUBR_FST0r : FPST0rInst ; -def SUB_FrST0 : FPrST0Inst ; -def SUB_FPrST0 : FPrST0PInst; -def SUB_FST0r : FPST0rInst ; -def SUBR_FrST0 : FPrST0Inst ; -def SUBR_FPrST0 : FPrST0PInst; +let SchedRW = [WriteFAdd], Defs = [FPSW], Uses = [FPCW] in { +def ADD_FST0r : FPST0rInst ; +def ADD_FrST0 : FPrST0Inst ; +def ADD_FPrST0 : FPrST0PInst; +def SUBR_FST0r : FPST0rInst ; +def SUB_FrST0 : FPrST0Inst ; +def SUB_FPrST0 : FPrST0PInst; +def SUB_FST0r : FPST0rInst ; +def SUBR_FrST0 : FPrST0Inst ; +def SUBR_FPrST0 : FPrST0PInst; } // SchedRW -let SchedRW = [WriteFCom] in { +let SchedRW = [WriteFCom], Defs = [FPSW], Uses = [FPCW] in { def COM_FST0r : FPST0rInst ; def COMP_FST0r : FPST0rInst ; } // SchedRW -let SchedRW = [WriteFMul] in { -def MUL_FST0r : FPST0rInst ; -def MUL_FrST0 : FPrST0Inst ; -def MUL_FPrST0 : FPrST0PInst; +let SchedRW = [WriteFMul], Defs = [FPSW], Uses = [FPCW] in { +def MUL_FST0r : FPST0rInst ; +def MUL_FrST0 : FPrST0Inst ; +def MUL_FPrST0 : FPrST0PInst; } // SchedRW -let SchedRW = [WriteFDiv] in { -def DIVR_FST0r : FPST0rInst ; -def DIV_FrST0 : FPrST0Inst ; -def DIV_FPrST0 : FPrST0PInst; -def DIV_FST0r : FPST0rInst ; -def DIVR_FrST0 : FPrST0Inst ; -def DIVR_FPrST0 : FPrST0PInst; +let SchedRW = [WriteFDiv], Defs = [FPSW], Uses = [FPCW] in { +def DIVR_FST0r : FPST0rInst ; +def DIV_FrST0 : FPrST0Inst ; +def DIV_FPrST0 : FPrST0PInst; +def DIV_FST0r : FPST0rInst ; +def DIVR_FrST0 : FPrST0Inst ; +def DIVR_FPrST0 : FPrST0PInst; } // SchedRW // Unary operations. @@ -307,7 +307,7 @@ def _Fp80 : FpI_<(outs RFP80:$dst), (ins RFP80:$src), def _F : FPI<0xD9, fp, (outs), (ins), asmstring>; } -let Defs = [FPSW] in { +let Defs = [FPSW], Uses = [FPCW] in { let SchedRW = [WriteFSign] in { defm CHS : FPUnary; @@ -335,7 +335,7 @@ def TST_F : FPI<0xD9, MRM_E4, (outs), (ins), "ftst">; // Versions of FP instructions that take a single memory operand. Added for the // disassembler; remove as they are included with patterns elsewhere. -let SchedRW = [WriteFComLd] in { +let SchedRW = [WriteFComLd], Defs = [FPSW], Uses = [FPCW] in { def FCOM32m : FPI<0xD8, MRM2m, (outs), (ins f32mem:$src), "fcom{s}\t$src">; def FCOMP32m : FPI<0xD8, MRM3m, (outs), (ins f32mem:$src), "fcomp{s}\t$src">; @@ -398,22 +398,22 @@ defm CMOVNP : FPCMov; let Predicates = [HasCMov] in { // These are not factored because there's no clean way to pass DA/DB. -def CMOVB_F : FPI<0xDA, MRM0r, (outs), (ins RST:$op), - "fcmovb\t{$op, %st(0)|st(0), $op}">; -def CMOVBE_F : FPI<0xDA, MRM2r, (outs), (ins RST:$op), - "fcmovbe\t{$op, %st(0)|st(0), $op}">; -def CMOVE_F : FPI<0xDA, MRM1r, (outs), (ins RST:$op), - "fcmove\t{$op, %st(0)|st(0), $op}">; -def CMOVP_F : FPI<0xDA, MRM3r, (outs), (ins RST:$op), - "fcmovu\t{$op, %st(0)|st(0), $op}">; -def CMOVNB_F : FPI<0xDB, MRM0r, (outs), (ins RST:$op), - "fcmovnb\t{$op, %st(0)|st(0), $op}">; -def CMOVNBE_F: FPI<0xDB, MRM2r, (outs), (ins RST:$op), - "fcmovnbe\t{$op, %st(0)|st(0), $op}">; -def CMOVNE_F : FPI<0xDB, MRM1r, (outs), (ins RST:$op), - "fcmovne\t{$op, %st(0)|st(0), $op}">; -def CMOVNP_F : FPI<0xDB, MRM3r, (outs), (ins RST:$op), - "fcmovnu\t{$op, %st(0)|st(0), $op}">; +def CMOVB_F : FPI<0xDA, MRM0r, (outs), (ins RSTi:$op), + "fcmovb\t{$op, %st|st, $op}">; +def CMOVBE_F : FPI<0xDA, MRM2r, (outs), (ins RSTi:$op), + "fcmovbe\t{$op, %st|st, $op}">; +def CMOVE_F : FPI<0xDA, MRM1r, (outs), (ins RSTi:$op), + "fcmove\t{$op, %st|st, $op}">; +def CMOVP_F : FPI<0xDA, MRM3r, (outs), (ins RSTi:$op), + "fcmovu\t{$op, %st|st, $op}">; +def CMOVNB_F : FPI<0xDB, MRM0r, (outs), (ins RSTi:$op), + "fcmovnb\t{$op, %st|st, $op}">; +def CMOVNBE_F: FPI<0xDB, MRM2r, (outs), (ins RSTi:$op), + "fcmovnbe\t{$op, %st|st, $op}">; +def CMOVNE_F : FPI<0xDB, MRM1r, (outs), (ins RSTi:$op), + "fcmovne\t{$op, %st|st, $op}">; +def CMOVNP_F : FPI<0xDB, MRM3r, (outs), (ins RSTi:$op), + "fcmovnu\t{$op, %st|st, $op}">; } // Predicates = [HasCMov] } // SchedRW @@ -454,7 +454,7 @@ def ILD_Fp64m80: FpI_<(outs RFP80:$dst), (ins i64mem:$ [(set RFP80:$dst, (X86fild addr:$src, i64))]>; } // SchedRW -let SchedRW = [WriteStore] in { +let SchedRW = [WriteStore], Uses = [FPCW] in { def ST_Fp32m : FpIf32<(outs), (ins f32mem:$op, RFP32:$src), OneArgFP, [(store RFP32:$src, addr:$op)]>; def ST_Fp64m32 : FpIf64<(outs), (ins f32mem:$op, RFP64:$src), OneArgFP, @@ -489,7 +489,7 @@ def IST_Fp16m80 : FpI_<(outs), (ins i16mem:$op, RFP80 def IST_Fp32m80 : FpI_<(outs), (ins i32mem:$op, RFP80:$src), OneArgFP, []>; def IST_Fp64m80 : FpI_<(outs), (ins i64mem:$op, RFP80:$src), OneArgFP, []>; } // mayStore -} // SchedRW +} // SchedRW, Uses = [FPCW] let mayLoad = 1, SchedRW = [WriteLoad] in { def LD_F32m : FPI<0xD9, MRM0m, (outs), (ins f32mem:$src), "fld{s}\t$src">; @@ -499,7 +499,7 @@ def ILD_F16m : FPI<0xDF, MRM0m, (outs), (ins i16mem:$ def ILD_F32m : FPI<0xDB, MRM0m, (outs), (ins i32mem:$src), "fild{l}\t$src">; def ILD_F64m : FPI<0xDF, MRM5m, (outs), (ins i64mem:$src), "fild{ll}\t$src">; } -let mayStore = 1, SchedRW = [WriteStore] in { +let mayStore = 1, SchedRW = [WriteStore], Uses = [FPCW] in { def ST_F32m : FPI<0xD9, MRM2m, (outs), (ins f32mem:$dst), "fst{s}\t$dst">; def ST_F64m : FPI<0xDD, MRM2m, (outs), (ins f64mem:$dst), "fst{l}\t$dst">; def ST_FP32m : FPI<0xD9, MRM3m, (outs), (ins f32mem:$dst), "fstp{s}\t$dst">; @@ -513,7 +513,7 @@ def IST_FP64m : FPI<0xDF, MRM7m, (outs), (ins i64mem:$ } // FISTTP requires SSE3 even though it's a FPStack op. -let Predicates = [HasSSE3], SchedRW = [WriteStore] in { +let Predicates = [HasSSE3], SchedRW = [WriteStore], Uses = [FPCW] in { def ISTT_Fp16m32 : FpI_<(outs), (ins i16mem:$op, RFP32:$src), OneArgFP, [(X86fp_to_i16mem RFP32:$src, addr:$op)]>; def ISTT_Fp32m32 : FpI_<(outs), (ins i32mem:$op, RFP32:$src), OneArgFP, @@ -534,7 +534,7 @@ def ISTT_Fp64m80 : FpI_<(outs), (ins i64mem:$op, RFP80 [(X86fp_to_i64mem RFP80:$src, addr:$op)]>; } // Predicates = [HasSSE3] -let mayStore = 1, SchedRW = [WriteStore] in { +let mayStore = 1, SchedRW = [WriteStore], Uses = [FPCW] in { def ISTT_FP16m : FPI<0xDF, MRM1m, (outs), (ins i16mem:$dst), "fisttp{s}\t$dst">; def ISTT_FP32m : FPI<0xDB, MRM1m, (outs), (ins i32mem:$dst), "fisttp{l}\t$dst">; def ISTT_FP64m : FPI<0xDD, MRM1m, (outs), (ins i64mem:$dst), "fisttp{ll}\t$dst">; @@ -542,10 +542,10 @@ def ISTT_FP64m : FPI<0xDD, MRM1m, (outs), (ins i64mem: // FP Stack manipulation instructions. let SchedRW = [WriteMove] in { -def LD_Frr : FPI<0xD9, MRM0r, (outs), (ins RST:$op), "fld\t$op">; -def ST_Frr : FPI<0xDD, MRM2r, (outs), (ins RST:$op), "fst\t$op">; -def ST_FPrr : FPI<0xDD, MRM3r, (outs), (ins RST:$op), "fstp\t$op">; -def XCH_F : FPI<0xD9, MRM1r, (outs), (ins RST:$op), "fxch\t$op">; +def LD_Frr : FPI<0xD9, MRM0r, (outs), (ins RSTi:$op), "fld\t$op">; +def ST_Frr : FPI<0xDD, MRM2r, (outs), (ins RSTi:$op), "fst\t$op">; +def ST_FPrr : FPI<0xDD, MRM3r, (outs), (ins RSTi:$op), "fstp\t$op">; +def XCH_F : FPI<0xD9, MRM1r, (outs), (ins RSTi:$op), "fxch\t$op">; } // Floating point constant loads. @@ -570,7 +570,7 @@ def LD_F0 : FPI<0xD9, MRM_EE, (outs), (ins), "fldz">; let SchedRW = [WriteFLD1] in def LD_F1 : FPI<0xD9, MRM_E8, (outs), (ins), "fld1">; -let SchedRW = [WriteFLDC], Defs = [FPSW] in { +let SchedRW = [WriteFLDC] in { def FLDL2T : I<0xD9, MRM_E9, (outs), (ins), "fldl2t", []>; def FLDL2E : I<0xD9, MRM_EA, (outs), (ins), "fldl2e", []>; def FLDPI : I<0xD9, MRM_EB, (outs), (ins), "fldpi", []>; @@ -579,7 +579,7 @@ def FLDLN2 : I<0xD9, MRM_ED, (outs), (ins), "fldln2", } // SchedRW // Floating point compares. -let SchedRW = [WriteFCom] in { +let SchedRW = [WriteFCom], Uses = [FPCW] in { def UCOM_Fpr32 : FpIf32<(outs), (ins RFP32:$lhs, RFP32:$rhs), CompareFP, [(set FPSW, (trunc (X86cmp RFP32:$lhs, RFP32:$rhs)))]>; def UCOM_Fpr64 : FpIf64<(outs), (ins RFP64:$lhs, RFP64:$rhs), CompareFP, @@ -591,37 +591,37 @@ def UCOM_Fpr80 : FpI_ <(outs), (ins RFP80:$lhs, RFP80 let SchedRW = [WriteFCom] in { // CC = ST(0) cmp ST(i) -let Defs = [EFLAGS, FPSW] in { -let Predicates = [FPStackf32, HasCMov] in -def UCOM_FpIr32: FpIf32<(outs), (ins RFP32:$lhs, RFP32:$rhs), CompareFP, - [(set EFLAGS, (X86cmp RFP32:$lhs, RFP32:$rhs))]>; -let Predicates = [FPStackf64, HasCMov] in -def UCOM_FpIr64: FpIf64<(outs), (ins RFP64:$lhs, RFP64:$rhs), CompareFP, - [(set EFLAGS, (X86cmp RFP64:$lhs, RFP64:$rhs))]>; -let Predicates = [HasCMov] in +let Defs = [EFLAGS, FPSW], Uses = [FPCW] in { +def UCOM_FpIr32: FpI_<(outs), (ins RFP32:$lhs, RFP32:$rhs), CompareFP, + [(set EFLAGS, (X86cmp RFP32:$lhs, RFP32:$rhs))]>, + Requires<[FPStackf32, HasCMov]>; +def UCOM_FpIr64: FpI_<(outs), (ins RFP64:$lhs, RFP64:$rhs), CompareFP, + [(set EFLAGS, (X86cmp RFP64:$lhs, RFP64:$rhs))]>, + Requires<[FPStackf64, HasCMov]>; def UCOM_FpIr80: FpI_<(outs), (ins RFP80:$lhs, RFP80:$rhs), CompareFP, - [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>; + [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>, + Requires<[HasCMov]>; } -let Defs = [FPSW], Uses = [ST0] in { +let Defs = [FPSW], Uses = [ST0, FPCW] in { def UCOM_Fr : FPI<0xDD, MRM4r, // FPSW = cmp ST(0) with ST(i) - (outs), (ins RST:$reg), "fucom\t$reg">; + (outs), (ins RSTi:$reg), "fucom\t$reg">; def UCOM_FPr : FPI<0xDD, MRM5r, // FPSW = cmp ST(0) with ST(i), pop - (outs), (ins RST:$reg), "fucomp\t$reg">; + (outs), (ins RSTi:$reg), "fucomp\t$reg">; def UCOM_FPPr : FPI<0xDA, MRM_E9, // cmp ST(0) with ST(1), pop, pop (outs), (ins), "fucompp">; } -let Defs = [EFLAGS, FPSW], Uses = [ST0] in { +let Defs = [EFLAGS, FPSW], Uses = [ST0, FPCW] in { def UCOM_FIr : FPI<0xDB, MRM5r, // CC = cmp ST(0) with ST(i) - (outs), (ins RST:$reg), "fucomi\t$reg">; + (outs), (ins RSTi:$reg), "fucomi\t{$reg, %st|st, $reg}">; def UCOM_FIPr : FPI<0xDF, MRM5r, // CC = cmp ST(0) with ST(i), pop - (outs), (ins RST:$reg), "fucompi\t$reg">; -} + (outs), (ins RSTi:$reg), "fucompi\t{$reg, %st|st, $reg}">; -let Defs = [EFLAGS, FPSW] in { -def COM_FIr : FPI<0xDB, MRM6r, (outs), (ins RST:$reg), "fcomi\t$reg">; -def COM_FIPr : FPI<0xDF, MRM6r, (outs), (ins RST:$reg), "fcompi\t$reg">; +def COM_FIr : FPI<0xDB, MRM6r, (outs), (ins RSTi:$reg), + "fcomi\t{$reg, %st|st, $reg}">; +def COM_FIPr : FPI<0xDF, MRM6r, (outs), (ins RSTi:$reg), + "fcompi\t{$reg, %st|st, $reg}">; } } // SchedRW @@ -631,12 +631,12 @@ let Defs = [AX], Uses = [FPSW] in def FNSTSW16r : I<0xDF, MRM_E0, // AX = fp flags (outs), (ins), "fnstsw\t{%ax|ax}", [(set AX, (X86fp_stsw FPSW))]>; -let Defs = [FPSW] in +let Defs = [FPSW], Uses = [FPCW] in def FNSTCW16m : I<0xD9, MRM7m, // [mem16] = X87 control world (outs), (ins i16mem:$dst), "fnstcw\t$dst", [(X86fp_cwd_get16 addr:$dst)]>; } // SchedRW -let Defs = [FPSW], mayLoad = 1 in +let Defs = [FPSW,FPCW], mayLoad = 1 in def FLDCW16m : I<0xD9, MRM5m, // X87 control world = [mem16] (outs), (ins i16mem:$dst), "fldcw\t$dst", []>, Sched<[WriteLoad]>; @@ -645,8 +645,8 @@ def FLDCW16m : I<0xD9, MRM5m, // X8 let SchedRW = [WriteMicrocoded] in { let Defs = [FPSW] in { def FNINIT : I<0xDB, MRM_E3, (outs), (ins), "fninit", []>; -def FFREE : FPI<0xDD, MRM0r, (outs), (ins RST:$reg), "ffree\t$reg">; -def FFREEP : FPI<0xDF, MRM0r, (outs), (ins RST:$reg), "ffreep\t$reg">; +def FFREE : FPI<0xDD, MRM0r, (outs), (ins RSTi:$reg), "ffree\t$reg">; +def FFREEP : FPI<0xDF, MRM0r, (outs), (ins RSTi:$reg), "ffreep\t$reg">; // Clear exceptions def FNCLEX : I<0xDB, MRM_E2, (outs), (ins), "fnclex", []>; Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/X86InstrInfo.td ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/X86InstrInfo.td Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/X86InstrInfo.td Sun Feb 10 12:45:33 2019 (r343955) @@ -3231,39 +3231,39 @@ def : InstAlias<"fucompi", (UCOM_FIPr ST1), 0>; // instructions like "fadd %st(0), %st(0)" as "fadd %st(0)" for consistency with // gas. multiclass FpUnaryAlias { - def : InstAlias; - def : InstAlias; + def : InstAlias; } -defm : FpUnaryAlias<"fadd", ADD_FST0r>; +defm : FpUnaryAlias<"fadd", ADD_FST0r, 0>; defm : FpUnaryAlias<"faddp", ADD_FPrST0, 0>; -defm : FpUnaryAlias<"fsub", SUB_FST0r>; -defm : FpUnaryAlias<"fsub{|r}p", SUBR_FPrST0>; -defm : FpUnaryAlias<"fsubr", SUBR_FST0r>; -defm : FpUnaryAlias<"fsub{r|}p", SUB_FPrST0>; -defm : FpUnaryAlias<"fmul", MUL_FST0r>; -defm : FpUnaryAlias<"fmulp", MUL_FPrST0>; -defm : FpUnaryAlias<"fdiv", DIV_FST0r>; -defm : FpUnaryAlias<"fdiv{|r}p", DIVR_FPrST0>; -defm : FpUnaryAlias<"fdivr", DIVR_FST0r>; -defm : FpUnaryAlias<"fdiv{r|}p", DIV_FPrST0>; +defm : FpUnaryAlias<"fsub", SUB_FST0r, 0>; +defm : FpUnaryAlias<"fsub{|r}p", SUBR_FPrST0, 0>; +defm : FpUnaryAlias<"fsubr", SUBR_FST0r, 0>; +defm : FpUnaryAlias<"fsub{r|}p", SUB_FPrST0, 0>; +defm : FpUnaryAlias<"fmul", MUL_FST0r, 0>; +defm : FpUnaryAlias<"fmulp", MUL_FPrST0, 0>; +defm : FpUnaryAlias<"fdiv", DIV_FST0r, 0>; +defm : FpUnaryAlias<"fdiv{|r}p", DIVR_FPrST0, 0>; +defm : FpUnaryAlias<"fdivr", DIVR_FST0r, 0>; +defm : FpUnaryAlias<"fdiv{r|}p", DIV_FPrST0, 0>; defm : FpUnaryAlias<"fcomi", COM_FIr, 0>; defm : FpUnaryAlias<"fucomi", UCOM_FIr, 0>; -defm : FpUnaryAlias<"fcompi", COM_FIPr>; -defm : FpUnaryAlias<"fucompi", UCOM_FIPr>; +defm : FpUnaryAlias<"fcompi", COM_FIPr, 0>; +defm : FpUnaryAlias<"fucompi", UCOM_FIPr, 0>; -// Handle "f{mulp,addp} st(0), $op" the same as "f{mulp,addp} $op", since they +// Handle "f{mulp,addp} $op, %st(0)" the same as "f{mulp,addp} $op", since they // commute. We also allow fdiv[r]p/fsubrp even though they don't commute, // solely because gas supports it. -def : InstAlias<"faddp\t{%st(0), $op|$op, st(0)}", (ADD_FPrST0 RST:$op), 0>; -def : InstAlias<"fmulp\t{%st(0), $op|$op, st(0)}", (MUL_FPrST0 RST:$op)>; -def : InstAlias<"fsub{|r}p\t{%st(0), $op|$op, st(0)}", (SUBR_FPrST0 RST:$op)>; -def : InstAlias<"fsub{r|}p\t{%st(0), $op|$op, st(0)}", (SUB_FPrST0 RST:$op)>; -def : InstAlias<"fdiv{|r}p\t{%st(0), $op|$op, st(0)}", (DIVR_FPrST0 RST:$op)>; -def : InstAlias<"fdiv{r|}p\t{%st(0), $op|$op, st(0)}", (DIV_FPrST0 RST:$op)>; +def : InstAlias<"faddp\t{$op, %st|st, $op}", (ADD_FPrST0 RSTi:$op), 0>; +def : InstAlias<"fmulp\t{$op, %st|st, $op}", (MUL_FPrST0 RSTi:$op), 0>; +def : InstAlias<"fsub{|r}p\t{$op, %st|st, $op}", (SUBR_FPrST0 RSTi:$op), 0>; +def : InstAlias<"fsub{r|}p\t{$op, %st|st, $op}", (SUB_FPrST0 RSTi:$op), 0>; +def : InstAlias<"fdiv{|r}p\t{$op, %st|st, $op}", (DIVR_FPrST0 RSTi:$op), 0>; +def : InstAlias<"fdiv{r|}p\t{$op, %st|st, $op}", (DIV_FPrST0 RSTi:$op), 0>; def : InstAlias<"fnstsw" , (FNSTSW16r), 0>; Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp Sun Feb 10 12:45:33 2019 (r343955) @@ -497,6 +497,9 @@ BitVector X86RegisterInfo::getReservedRegs(const Machi BitVector Reserved(getNumRegs()); const X86FrameLowering *TFI = getFrameLowering(MF); + // Set the floating point control register as reserved. + Reserved.set(X86::FPCW); + // Set the stack-pointer register and its aliases as reserved. for (MCSubRegIterator I(X86::RSP, this, /*IncludeSelf=*/true); I.isValid(); ++I) Modified: projects/clang800-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.td ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.td Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/lib/Target/X86/X86RegisterInfo.td Sun Feb 10 12:45:33 2019 (r343955) @@ -278,7 +278,7 @@ def K7 : X86Reg<"k7", 7>, DwarfRegNum<[125, 100, 100]> // pseudo registers, but we still mark them as aliasing FP registers. That // way both kinds can be live without exceeding the stack depth. ST registers // are only live around inline assembly. -def ST0 : X86Reg<"st(0)", 0>, DwarfRegNum<[33, 12, 11]>; +def ST0 : X86Reg<"st", 0>, DwarfRegNum<[33, 12, 11]>; def ST1 : X86Reg<"st(1)", 1>, DwarfRegNum<[34, 13, 12]>; def ST2 : X86Reg<"st(2)", 2>, DwarfRegNum<[35, 14, 13]>; def ST3 : X86Reg<"st(3)", 3>, DwarfRegNum<[36, 15, 14]>; @@ -288,8 +288,11 @@ def ST6 : X86Reg<"st(6)", 6>, DwarfRegNum<[39, 18, 17] def ST7 : X86Reg<"st(7)", 7>, DwarfRegNum<[40, 19, 18]>; // Floating-point status word -def FPSW : X86Reg<"fpsw", 0>; +def FPSW : X86Reg<"fpsr", 0>; +// Floating-point control word +def FPCW : X86Reg<"fpcr", 0>; + // Status flags register. // // Note that some flags that are commonly thought of as part of the status @@ -538,6 +541,9 @@ def RFP80_7 : RegisterClass<"X86",[f80], 32, (add FP7) def RST : RegisterClass<"X86", [f80, f64, f32], 32, (sequence "ST%u", 0, 7)> { let isAllocatable = 0; } + +// Helper to allow %st to print as %st(0) when its encoded in the instruction. +def RSTi : RegisterOperand; // Generic vector registers: VR64 and VR128. // Ensure that float types are declared first - only float is legal on SSE1. Modified: projects/clang800-import/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp Sun Feb 10 10:42:16 2019 (r343954) +++ projects/clang800-import/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp Sun Feb 10 12:45:33 2019 (r343955) @@ -842,6 +842,7 @@ OperandType RecognizableInstr::typeFromString(const st TYPE("f32mem", TYPE_M) TYPE("ssmem", TYPE_M) TYPE("RST", TYPE_ST) + TYPE("RSTi", TYPE_ST) TYPE("i128mem", TYPE_M) TYPE("i256mem", TYPE_M) TYPE("i512mem", TYPE_M) @@ -964,6 +965,7 @@ OperandEncoding RecognizableInstr::rmRegisterEncodingFromString(const std::string &s, uint8_t OpSize) { ENCODING("RST", ENCODING_FP) + ENCODING("RSTi", ENCODING_FP) ENCODING("GR16", ENCODING_RM) ENCODING("GR32", ENCODING_RM) ENCODING("GR32orGR64", ENCODING_RM) From owner-svn-src-projects@freebsd.org Sun Feb 10 12:49:43 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FF8214C5D8D for ; Sun, 10 Feb 2019 12:49:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E09AF76536; Sun, 10 Feb 2019 12:49:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7C5D18ACC; Sun, 10 Feb 2019 12:49:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1ACngxs082097; Sun, 10 Feb 2019 12:49:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1ACnZZ5082061; Sun, 10 Feb 2019 12:49:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902101249.x1ACnZZ5082061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 10 Feb 2019 12:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r343956 - in projects/clang800-import: . contrib/netbsd-tests/lib/libm etc/mtree lib/libc/stdio lib/libc/sys lib/libc/x86/sys lib/libcasper/services/cap_syslog lib/libutil lib/msun/src ... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang800-import: . contrib/netbsd-tests/lib/libm etc/mtree lib/libc/stdio lib/libc/sys lib/libc/x86/sys lib/libcasper/services/cap_syslog lib/libutil lib/msun/src lib/msun/tests libexec/rc... X-SVN-Commit-Revision: 343956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E09AF76536 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2019 12:49:43 -0000 Author: dim Date: Sun Feb 10 12:49:34 2019 New Revision: 343956 URL: https://svnweb.freebsd.org/changeset/base/343956 Log: Merge ^/head r343807 through r343955. Added: projects/clang800-import/sys/arm64/acpica/acpi_iort.c - copied unchanged from r343955, head/sys/arm64/acpica/acpi_iort.c Deleted: projects/clang800-import/sys/dev/usb/controller/ohci_s3c24x0.c Modified: projects/clang800-import/UPDATING projects/clang800-import/contrib/netbsd-tests/lib/libm/t_cbrt.c projects/clang800-import/etc/mtree/BSD.root.dist projects/clang800-import/lib/libc/stdio/fgetln.c projects/clang800-import/lib/libc/sys/getsockopt.2 projects/clang800-import/lib/libc/x86/sys/__vdso_gettc.c projects/clang800-import/lib/libcasper/services/cap_syslog/cap_syslog.c projects/clang800-import/lib/libutil/quotafile.c projects/clang800-import/lib/msun/src/e_j0.c projects/clang800-import/lib/msun/src/e_j0f.c projects/clang800-import/lib/msun/src/e_j1.c projects/clang800-import/lib/msun/src/e_j1f.c projects/clang800-import/lib/msun/src/e_jn.c projects/clang800-import/lib/msun/tests/trig_test.c projects/clang800-import/libexec/rc/rc.d/growfs projects/clang800-import/libexec/talkd/extern.h projects/clang800-import/sbin/dhclient/dhclient.c projects/clang800-import/sbin/ipfw/tables.c projects/clang800-import/sbin/recoverdisk/recoverdisk.c projects/clang800-import/sbin/sysctl/sysctl.8 projects/clang800-import/share/man/man4/ng_iface.4 projects/clang800-import/share/man/man9/bus_space.9 projects/clang800-import/share/man/man9/config_intrhook.9 projects/clang800-import/share/man/man9/pwm.9 projects/clang800-import/share/misc/bsd-family-tree projects/clang800-import/share/misc/committers-ports.dot projects/clang800-import/share/misc/committers-src.dot projects/clang800-import/share/mk/bsd.cpu.mk projects/clang800-import/share/mk/src.opts.mk projects/clang800-import/share/mk/suite.test.mk projects/clang800-import/stand/efi/libefi/efienv.c projects/clang800-import/sys/amd64/conf/GENERIC projects/clang800-import/sys/amd64/conf/NOTES projects/clang800-import/sys/arm/allwinner/axp81x.c projects/clang800-import/sys/arm64/arm64/cpufunc_asm.S projects/clang800-import/sys/arm64/arm64/gic_v3_acpi.c projects/clang800-import/sys/arm64/arm64/gic_v3_var.h projects/clang800-import/sys/arm64/arm64/gicv3_its.c projects/clang800-import/sys/arm64/arm64/pmap.c projects/clang800-import/sys/arm64/conf/GENERIC projects/clang800-import/sys/cam/ata/ata_da.c projects/clang800-import/sys/cam/scsi/scsi_da.c projects/clang800-import/sys/compat/freebsd32/freebsd32_misc.c projects/clang800-import/sys/conf/files.arm64 projects/clang800-import/sys/conf/options projects/clang800-import/sys/ddb/db_ps.c projects/clang800-import/sys/dev/acpica/acpivar.h projects/clang800-import/sys/dev/cardbus/cardbus.c projects/clang800-import/sys/dev/cxgbe/adapter.h projects/clang800-import/sys/dev/cxgbe/common/t4_hw.c projects/clang800-import/sys/dev/cxgbe/t4_main.c projects/clang800-import/sys/dev/cxgbe/t4_vf.c projects/clang800-import/sys/dev/e1000/if_em.c projects/clang800-import/sys/dev/e1000/if_em.h projects/clang800-import/sys/dev/flash/mx25l.c projects/clang800-import/sys/dev/flash/n25q.c projects/clang800-import/sys/dev/iwn/if_iwn.c projects/clang800-import/sys/dev/mmc/bridge.h projects/clang800-import/sys/dev/mmc/mmc.c projects/clang800-import/sys/dev/mmc/mmc_private.h projects/clang800-import/sys/dev/mmc/mmc_subr.c projects/clang800-import/sys/dev/mmc/mmc_subr.h projects/clang800-import/sys/dev/mmc/mmcbrvar.h projects/clang800-import/sys/dev/mmc/mmcreg.h projects/clang800-import/sys/dev/mmc/mmcsd.c projects/clang800-import/sys/dev/mmc/mmcvar.h projects/clang800-import/sys/dev/netmap/netmap.c projects/clang800-import/sys/dev/pccbb/pccbbdevid.h projects/clang800-import/sys/dev/pci/pci_host_generic_acpi.c projects/clang800-import/sys/dev/pms/freebsd/driver/common/lxutil.c projects/clang800-import/sys/dev/puc/puc_pci.c projects/clang800-import/sys/dev/sio/sio_isa.c projects/clang800-import/sys/dev/sio/sio_pccard.c projects/clang800-import/sys/dev/sio/sio_pci.c projects/clang800-import/sys/dev/sio/sio_puc.c projects/clang800-import/sys/dev/uart/uart_bus_acpi.c projects/clang800-import/sys/dev/uart/uart_bus_pccard.c projects/clang800-import/sys/dev/uart/uart_bus_puc.c projects/clang800-import/sys/dev/usb/controller/generic_ohci.c projects/clang800-import/sys/dev/usb/net/if_ure.c projects/clang800-import/sys/dev/usb/usbdevs projects/clang800-import/sys/dev/wi/if_wivar.h projects/clang800-import/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts projects/clang800-import/sys/fs/nullfs/null_vfsops.c projects/clang800-import/sys/fs/nullfs/null_vnops.c projects/clang800-import/sys/i386/acpica/acpi_wakecode.S projects/clang800-import/sys/i386/conf/NOTES projects/clang800-import/sys/i386/i386/pmap.c projects/clang800-import/sys/i386/i386/pmap_base.c projects/clang800-import/sys/kern/imgact_elf.c projects/clang800-import/sys/kern/kern_exec.c projects/clang800-import/sys/kern/kern_kcov.c projects/clang800-import/sys/kern/vfs_lookup.c projects/clang800-import/sys/kern/vfs_syscalls.c projects/clang800-import/sys/mips/include/elf.h projects/clang800-import/sys/modules/dtb/allwinner/Makefile projects/clang800-import/sys/net80211/ieee80211_ioctl.c projects/clang800-import/sys/netgraph/ng_iface.c projects/clang800-import/sys/netgraph/ng_ipfw.c projects/clang800-import/sys/netinet/cc/cc_cdg.c projects/clang800-import/sys/netinet/sctp_usrreq.c projects/clang800-import/sys/powerpc/include/openpicvar.h projects/clang800-import/sys/powerpc/ofw/openpic_ofw.c projects/clang800-import/sys/powerpc/powerpc/cpu.c projects/clang800-import/sys/powerpc/powerpc/mem.c projects/clang800-import/sys/powerpc/powerpc/openpic.c projects/clang800-import/sys/riscv/riscv/elf_machdep.c projects/clang800-import/sys/sys/namei.h projects/clang800-import/sys/sys/sysent.h projects/clang800-import/sys/vm/uma_core.c projects/clang800-import/sys/vm/uma_int.h projects/clang800-import/sys/vm/vm_kern.c projects/clang800-import/sys/vm/vm_mmap.c projects/clang800-import/sys/vm/vm_unix.c projects/clang800-import/sys/x86/acpica/acpi_wakeup.c projects/clang800-import/sys/x86/include/x86_var.h projects/clang800-import/tools/build/mk/OptionalObsoleteFiles.inc projects/clang800-import/tools/build/options/WITH_CLANG_EXTRAS projects/clang800-import/usr.bin/calendar/calendars/calendar.freebsd projects/clang800-import/usr.bin/ipcs/ipcs.c projects/clang800-import/usr.bin/newkey/update.c projects/clang800-import/usr.bin/vtfontcvt/vtfontcvt.c projects/clang800-import/usr.sbin/bluetooth/sdpd/ssar.c projects/clang800-import/usr.sbin/dumpcis/main.c projects/clang800-import/usr.sbin/newsyslog/newsyslog.c projects/clang800-import/usr.sbin/pw/pw.8 projects/clang800-import/usr.sbin/pwm/pwm.8 Directory Properties: projects/clang800-import/ (props changed) projects/clang800-import/contrib/llvm/ (props changed) projects/clang800-import/contrib/netbsd-tests/ (props changed) Modified: projects/clang800-import/UPDATING ============================================================================== --- projects/clang800-import/UPDATING Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/UPDATING Sun Feb 10 12:49:34 2019 (r343956) @@ -1942,7 +1942,7 @@ to fetch an UPDATING file from an older FreeBSD releas Copyright information: -Copyright 1998-2009 M. Warner Losh. All Rights Reserved. +Copyright 1998-2009 M. Warner Losh. Redistribution, publication, translation and use, with or without modification, in full or in part, in any form or format of this Modified: projects/clang800-import/contrib/netbsd-tests/lib/libm/t_cbrt.c ============================================================================== --- projects/clang800-import/contrib/netbsd-tests/lib/libm/t_cbrt.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/contrib/netbsd-tests/lib/libm/t_cbrt.c Sun Feb 10 12:49:34 2019 (r343956) @@ -268,7 +268,8 @@ ATF_TC_BODY(cbrtl_powl, tc) long double y, z; size_t i; -#if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 +#if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 && \ + __FreeBSD_cc_version < 1300002 atf_tc_expect_fail("test fails with clang 7+ - bug 234040"); #endif Modified: projects/clang800-import/etc/mtree/BSD.root.dist ============================================================================== --- projects/clang800-import/etc/mtree/BSD.root.dist Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/etc/mtree/BSD.root.dist Sun Feb 10 12:49:34 2019 (r343956) @@ -11,7 +11,11 @@ defaults .. dtb + allwinner tags=package=runtime + .. overlays tags=package=runtime + .. + rockchip tags=package=runtime .. .. firmware Modified: projects/clang800-import/lib/libc/stdio/fgetln.c ============================================================================== --- projects/clang800-import/lib/libc/stdio/fgetln.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/libc/stdio/fgetln.c Sun Feb 10 12:49:34 2019 (r343956) @@ -50,19 +50,12 @@ __FBSDID("$FreeBSD$"); /* * Expand the line buffer. Return -1 on error. -#ifdef notdef - * The `new size' does not account for a terminating '\0', - * so we add 1 here. -#endif */ int __slbexpand(FILE *fp, size_t newsize) { void *p; -#ifdef notdef - ++newsize; -#endif if (fp->_lb._size >= newsize) return (0); if (newsize > INT_MAX) { @@ -160,9 +153,6 @@ fgetln(FILE *fp, size_t *lenp) break; } *lenp = len; -#ifdef notdef - fp->_lb._base[len] = '\0'; -#endif ret = (char *)fp->_lb._base; end: FUNLOCKFILE_CANCELSAFE(); Modified: projects/clang800-import/lib/libc/sys/getsockopt.2 ============================================================================== --- projects/clang800-import/lib/libc/sys/getsockopt.2 Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/libc/sys/getsockopt.2 Sun Feb 10 12:49:34 2019 (r343956) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd August 21, 2018 +.Dd February 10, 2019 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -534,7 +534,11 @@ transfer rate to the given unsigned 32-bit value in by .Sh RETURN VALUES .Rv -std .Sh ERRORS -The call succeeds unless: +The +.Fn getsockopt +and +.Fn setsockopt +system calls succeed unless: .Bl -tag -width Er .It Bq Er EBADF The argument @@ -561,6 +565,15 @@ Installing an on a non-listening socket was attempted. .It Bq Er ENOMEM A memory allocation failed that was required to service the request. +.El +.Pp +The +.Fn setsockopt +system call may also return the following error: +.Bl -tag -width Er +.It Bq Er ENOBUFS +Insufficient resources were available in the system +to perform the operation. .El .Sh SEE ALSO .Xr ioctl 2 , Modified: projects/clang800-import/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- projects/clang800-import/lib/libc/x86/sys/__vdso_gettc.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/libc/x86/sys/__vdso_gettc.c Sun Feb 10 12:49:34 2019 (r343956) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2012 Konstantin Belousov - * Copyright (c) 2016, 2017 The FreeBSD Foundation + * Copyright (c) 2016, 2017, 2019 The FreeBSD Foundation * All rights reserved. * * Portions of this software were developed by Konstantin Belousov @@ -50,15 +50,9 @@ __FBSDID("$FreeBSD$"); #ifdef WANT_HYPERV #include #endif +#include #include "libc_private.h" -static enum LMB { - LMB_UNKNOWN, - LMB_NONE, - LMB_MFENCE, - LMB_LFENCE -} lfence_works = LMB_UNKNOWN; - static void cpuidp(u_int leaf, u_int p[4]) { @@ -84,68 +78,36 @@ cpuidp(u_int leaf, u_int p[4]) : "0" (leaf)); } -static enum LMB -select_lmb(void) +static void +rdtsc_mb_lfence(void) { - u_int p[4]; - static const char intel_id[] = "GenuntelineI"; - cpuidp(0, p); - return (memcmp(p + 1, intel_id, sizeof(intel_id) - 1) == 0 ? - LMB_LFENCE : LMB_MFENCE); + lfence(); } static void -init_fence(void) +rdtsc_mb_mfence(void) { -#if defined(__i386__) - u_int cpuid_supported, p[4]; - lfence_works = LMB_NONE; - __asm __volatile( - " pushfl\n" - " popl %%eax\n" - " movl %%eax,%%ecx\n" - " xorl $0x200000,%%eax\n" - " pushl %%eax\n" - " popfl\n" - " pushfl\n" - " popl %%eax\n" - " xorl %%eax,%%ecx\n" - " je 1f\n" - " movl $1,%0\n" - " jmp 2f\n" - "1: movl $0,%0\n" - "2:\n" - : "=r" (cpuid_supported) : : "eax", "ecx", "cc"); - if (cpuid_supported) { - cpuidp(0x1, p); - if ((p[3] & CPUID_SSE2) != 0) - lfence_works = select_lmb(); - } -#elif defined(__amd64__) - lfence_works = select_lmb(); -#else -#error "Arch" -#endif + mfence(); } static void -rdtsc_mb(void) +rdtsc_mb_none(void) { +} -again: - if (__predict_true(lfence_works == LMB_LFENCE)) { - lfence(); - return; - } else if (lfence_works == LMB_MFENCE) { - mfence(); - return; - } else if (lfence_works == LMB_NONE) { - return; - } - init_fence(); - goto again; +DEFINE_UIFUNC(static, void, rdtsc_mb, (void), static) +{ + u_int p[4]; + /* Not a typo, string matches our cpuidp() registers use. */ + static const char intel_id[] = "GenuntelineI"; + + if ((cpu_feature & CPUID_SSE2) == 0) + return (rdtsc_mb_none); + cpuidp(0, p); + return (memcmp(p + 1, intel_id, sizeof(intel_id) - 1) == 0 ? + rdtsc_mb_lfence : rdtsc_mb_mfence); } static u_int Modified: projects/clang800-import/lib/libcasper/services/cap_syslog/cap_syslog.c ============================================================================== --- projects/clang800-import/lib/libcasper/services/cap_syslog/cap_syslog.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/libcasper/services/cap_syslog/cap_syslog.c Sun Feb 10 12:49:34 2019 (r343956) @@ -88,6 +88,9 @@ cap_openlog(cap_channel_t *chan, const char *ident, in } nvlist_add_number(nvl, "logopt", logopt); nvlist_add_number(nvl, "facility", facility); + if (logopt & LOG_PERROR) { + nvlist_add_descriptor(nvl, "stderr", STDERR_FILENO); + } nvl = cap_xfer_nvlist(chan, nvl); if (nvl == NULL) { return; @@ -131,6 +134,7 @@ cap_setlogmask(cap_channel_t *chan, int maskpri) */ static char *LogTag; +static int prev_stderr = -1; static void slog_vsyslog(const nvlist_t *limits __unused, const nvlist_t *nvlin, @@ -146,6 +150,8 @@ slog_openlog(const nvlist_t *limits __unused, const nv nvlist_t *nvlout __unused) { const char *ident; + uint64_t logopt; + int stderr_fd; ident = dnvlist_get_string(nvlin, "ident", NULL); if (ident != NULL) { @@ -153,8 +159,19 @@ slog_openlog(const nvlist_t *limits __unused, const nv LogTag = strdup(ident); } - openlog(LogTag, nvlist_get_number(nvlin, "logopt"), - nvlist_get_number(nvlin, "facility")); + logopt = nvlist_get_number(nvlin, "logopt"); + if (logopt & LOG_PERROR) { + stderr_fd = dnvlist_get_descriptor(nvlin, "stderr", -1); + if (prev_stderr == -1) + prev_stderr = dup(STDERR_FILENO); + if (prev_stderr != -1) + (void)dup2(stderr_fd, STDERR_FILENO); + } else if (prev_stderr != -1) { + (void)dup2(prev_stderr, STDERR_FILENO); + close(prev_stderr); + prev_stderr = -1; + } + openlog(LogTag, logopt, nvlist_get_number(nvlin, "facility")); } static void @@ -166,6 +183,12 @@ slog_closelog(const nvlist_t *limits __unused, const n free(LogTag); LogTag = NULL; + + if (prev_stderr != -1) { + (void)dup2(prev_stderr, STDERR_FILENO); + close(prev_stderr); + prev_stderr = -1; + } } static void @@ -198,4 +221,4 @@ syslog_command(const char *cmd, const nvlist_t *limits return (0); } -CREATE_SERVICE("system.syslog", NULL, syslog_command, CASPER_SERVICE_STDIO); +CREATE_SERVICE("system.syslog", NULL, syslog_command, 0); Modified: projects/clang800-import/lib/libutil/quotafile.c ============================================================================== --- projects/clang800-import/lib/libutil/quotafile.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/libutil/quotafile.c Sun Feb 10 12:49:34 2019 (r343956) @@ -118,7 +118,8 @@ quota_open(struct fstab *fs, int quotatype, int openfl struct dqhdr64 dqh; struct group *grp; struct stat st; - int qcmd, serrno; + int qcmd, serrno = 0; + int ufs; if ((qf = calloc(1, sizeof(*qf))) == NULL) return (NULL); @@ -129,15 +130,21 @@ quota_open(struct fstab *fs, int quotatype, int openfl goto error; qf->dev = st.st_dev; qcmd = QCMD(Q_GETQUOTASIZE, quotatype); + ufs = strcmp(fs->fs_vfstype, "ufs") == 0; + /* + * On UFS, hasquota() fills in qf->qfname. But we only care about + * this for UFS. So we need to call hasquota() for UFS, first. + */ + if (ufs) { + serrno = hasquota(fs, quotatype, qf->qfname, + sizeof(qf->qfname)); + } if (quotactl(qf->fsname, qcmd, 0, &qf->wordsize) == 0) return (qf); - /* We only check the quota file for ufs */ - if (strcmp(fs->fs_vfstype, "ufs")) { + if (!ufs) { errno = 0; goto error; - } - serrno = hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname)); - if (serrno == 0) { + } else if (serrno == 0) { errno = EOPNOTSUPP; goto error; } Modified: projects/clang800-import/lib/msun/src/e_j0.c ============================================================================== --- projects/clang800-import/lib/msun/src/e_j0.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/msun/src/e_j0.c Sun Feb 10 12:49:34 2019 (r343956) @@ -93,8 +93,7 @@ __ieee754_j0(double x) if(ix>=0x7ff00000) return one/(x*x); x = fabs(x); if(ix >= 0x40000000) { /* |x| >= 2.0 */ - s = sin(x); - c = cos(x); + sincos(x, &s, &c); ss = s-c; cc = s+c; if(ix<0x7fe00000) { /* Make sure x+x does not overflow. */ @@ -173,8 +172,7 @@ __ieee754_y0(double x) * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) * to compute the worse one. */ - s = sin(x); - c = cos(x); + sincos(x, &s, &c); ss = s-c; cc = s+c; /* Modified: projects/clang800-import/lib/msun/src/e_j0f.c ============================================================================== --- projects/clang800-import/lib/msun/src/e_j0f.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/msun/src/e_j0f.c Sun Feb 10 12:49:34 2019 (r343956) @@ -55,8 +55,7 @@ __ieee754_j0f(float x) if(ix>=0x7f800000) return one/(x*x); x = fabsf(x); if(ix >= 0x40000000) { /* |x| >= 2.0 */ - s = sinf(x); - c = cosf(x); + sincosf(x, &s, &c); ss = s-c; cc = s+c; if(ix<0x7f000000) { /* Make sure x+x does not overflow. */ @@ -128,8 +127,7 @@ __ieee754_y0f(float x) * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) * to compute the worse one. */ - s = sinf(x); - c = cosf(x); + sincosf(x, &s, &c); ss = s-c; cc = s+c; /* Modified: projects/clang800-import/lib/msun/src/e_j1.c ============================================================================== --- projects/clang800-import/lib/msun/src/e_j1.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/msun/src/e_j1.c Sun Feb 10 12:49:34 2019 (r343956) @@ -94,8 +94,7 @@ __ieee754_j1(double x) if(ix>=0x7ff00000) return one/x; y = fabs(x); if(ix >= 0x40000000) { /* |x| >= 2.0 */ - s = sin(y); - c = cos(y); + sincos(y, &s, &c); ss = -s-c; cc = s-c; if(ix<0x7fe00000) { /* make sure y+y not overflow */ @@ -159,8 +158,7 @@ __ieee754_y1(double x) /* y1(x<0) = NaN and raise invalid exception. */ if(hx<0) return vzero/vzero; if(ix >= 0x40000000) { /* |x| >= 2.0 */ - s = sin(x); - c = cos(x); + sincos(x, &s, &c); ss = -s-c; cc = s-c; if(ix<0x7fe00000) { /* make sure x+x not overflow */ Modified: projects/clang800-import/lib/msun/src/e_j1f.c ============================================================================== --- projects/clang800-import/lib/msun/src/e_j1f.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/msun/src/e_j1f.c Sun Feb 10 12:49:34 2019 (r343956) @@ -56,8 +56,7 @@ __ieee754_j1f(float x) if(ix>=0x7f800000) return one/x; y = fabsf(x); if(ix >= 0x40000000) { /* |x| >= 2.0 */ - s = sinf(y); - c = cosf(y); + sincosf(y, &s, &c); ss = -s-c; cc = s-c; if(ix<0x7f000000) { /* make sure y+y not overflow */ @@ -114,8 +113,7 @@ __ieee754_y1f(float x) if(ix==0) return -one/vzero; if(hx<0) return vzero/vzero; if(ix >= 0x40000000) { /* |x| >= 2.0 */ - s = sinf(x); - c = cosf(x); + sincosf(x, &s, &c); ss = -s-c; cc = s-c; if(ix<0x7f000000) { /* make sure x+x not overflow */ Modified: projects/clang800-import/lib/msun/src/e_jn.c ============================================================================== --- projects/clang800-import/lib/msun/src/e_jn.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/msun/src/e_jn.c Sun Feb 10 12:49:34 2019 (r343956) @@ -54,7 +54,7 @@ double __ieee754_jn(int n, double x) { int32_t i,hx,ix,lx, sgn; - double a, b, temp, di; + double a, b, c, s, temp, di; double z, w; /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x) @@ -91,11 +91,12 @@ __ieee754_jn(int n, double x) * 2 -s+c -c-s * 3 s+c c-s */ + sincos(x, &s, &c); switch(n&3) { - case 0: temp = cos(x)+sin(x); break; - case 1: temp = -cos(x)+sin(x); break; - case 2: temp = -cos(x)-sin(x); break; - case 3: temp = cos(x)-sin(x); break; + case 0: temp = c+s; break; + case 1: temp = -c+s; break; + case 2: temp = -c-s; break; + case 3: temp = c-s; break; } b = invsqrtpi*temp/sqrt(x); } else { @@ -216,7 +217,7 @@ __ieee754_yn(int n, double x) { int32_t i,hx,ix,lx; int32_t sign; - double a, b, temp; + double a, b, c, s, temp; EXTRACT_WORDS(hx,lx,x); ix = 0x7fffffff&hx; @@ -248,11 +249,12 @@ __ieee754_yn(int n, double x) * 2 -s+c -c-s * 3 s+c c-s */ + sincos(x, &s, &c); switch(n&3) { - case 0: temp = sin(x)-cos(x); break; - case 1: temp = -sin(x)-cos(x); break; - case 2: temp = -sin(x)+cos(x); break; - case 3: temp = sin(x)+cos(x); break; + case 0: temp = s-c; break; + case 1: temp = -s-c; break; + case 2: temp = -s+c; break; + case 3: temp = s+c; break; } b = invsqrtpi*temp/sqrt(x); } else { Modified: projects/clang800-import/lib/msun/tests/trig_test.c ============================================================================== --- projects/clang800-import/lib/msun/tests/trig_test.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/lib/msun/tests/trig_test.c Sun Feb 10 12:49:34 2019 (r343956) @@ -160,7 +160,8 @@ ATF_TC_BODY(reduction, tc) unsigned i; -#if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 +#if defined(__amd64__) && defined(__clang__) && __clang_major__ >= 7 && \ + __FreeBSD_cc_version < 1300002 atf_tc_expect_fail("test fails with clang 7+ - bug 234040"); #endif Modified: projects/clang800-import/libexec/rc/rc.d/growfs ============================================================================== --- projects/clang800-import/libexec/rc/rc.d/growfs Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/libexec/rc/rc.d/growfs Sun Feb 10 12:49:34 2019 (r343956) @@ -49,7 +49,20 @@ rcvar="growfs_enable" growfs_start () { echo "Growing root partition to fill device" - rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') + FSTYPE=$(mount -p | awk '{ if ( $2 == "/") { print $3 }}') + FSDEV=$(mount -p | awk '{ if ( $2 == "/") { print $1 }}') + case "$FSTYPE" in + ufs) + rootdev=${FSDEV#/dev/} + ;; + zfs) + pool=${FSDEV%%/*} + rootdev=$(zpool list -v $pool | tail -n 1 | awk '{ print $1 }') + ;; + *) + echo "Don't know how to grow root filesystem type: $FSTYPE" + return + esac if [ x"$rootdev" = x"${rootdev%/*}" ]; then # raw device rawdev="$rootdev" @@ -91,7 +104,14 @@ growfs_start () } }' dev="$rawdev" gpart commit "$rootdev" - growfs -y /dev/"$rootdev" + case "$FSTYPE" in + ufs) + growfs -y /dev/"$rootdev" + ;; + zfs) + zpool online -e $pool $rootdev + ;; + esac } load_rc_config $name Modified: projects/clang800-import/libexec/talkd/extern.h ============================================================================== --- projects/clang800-import/libexec/talkd/extern.h Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/libexec/talkd/extern.h Sun Feb 10 12:49:34 2019 (r343956) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2002 M. Warner Losh. All rights reserved. + * Copyright (c) 2002 M. Warner Losh. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: projects/clang800-import/sbin/dhclient/dhclient.c ============================================================================== --- projects/clang800-import/sbin/dhclient/dhclient.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/sbin/dhclient/dhclient.c Sun Feb 10 12:49:34 2019 (r343956) @@ -2348,7 +2348,8 @@ priv_script_go(void) if (ip) script_flush_env(ip->client); - return (wstatus & 0xff); + return (WIFEXITED(wstatus) ? + WEXITSTATUS(wstatus) : 128 + WTERMSIG(wstatus)); } void Modified: projects/clang800-import/sbin/ipfw/tables.c ============================================================================== --- projects/clang800-import/sbin/ipfw/tables.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/sbin/ipfw/tables.c Sun Feb 10 12:49:34 2019 (r343956) @@ -282,13 +282,14 @@ ipfw_table_handler(int ac, char *av[]) } break; case TOK_LIST: + arg = is_all ? (void*)1 : NULL; if (is_all == 0) { ipfw_xtable_info i; if ((error = table_get_info(&oh, &i)) != 0) err(EX_OSERR, "failed to request table info"); - table_show_one(&i, NULL); + table_show_one(&i, arg); } else { - error = tables_foreach(table_show_one, NULL, 1); + error = tables_foreach(table_show_one, arg, 1); if (error != 0) err(EX_OSERR, "failed to request tables list"); } @@ -821,13 +822,16 @@ table_show_one(ipfw_xtable_info *i, void *arg) { ipfw_obj_header *oh; int error; + int is_all; + is_all = arg == NULL ? 0 : 1; + if ((error = table_do_get_list(i, &oh)) != 0) { err(EX_OSERR, "Error requesting table %s list", i->tablename); return (error); } - table_show_list(oh, 1); + table_show_list(oh, is_all); free(oh); return (0); Modified: projects/clang800-import/sbin/recoverdisk/recoverdisk.c ============================================================================== --- projects/clang800-import/sbin/recoverdisk/recoverdisk.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/sbin/recoverdisk/recoverdisk.c Sun Feb 10 12:49:34 2019 (r343956) @@ -125,6 +125,7 @@ read_worklist(off_t t) new_lump(s, l, state); d -= l; } + fclose(file); (void)fprintf(stderr, " done.\n"); /* * Return the number of bytes already read Modified: projects/clang800-import/sbin/sysctl/sysctl.8 ============================================================================== --- projects/clang800-import/sbin/sysctl/sysctl.8 Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/sbin/sysctl/sysctl.8 Sun Feb 10 12:49:34 2019 (r343956) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd September 24, 2018 +.Dd February 8, 2019 .Dt SYSCTL 8 .Os .Sh NAME @@ -36,13 +36,13 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehiNnoRTtqx +.Op Fl bdehiNnoTtqWx .Op Fl B Ar bufsize .Op Fl f Ar filename .Ar name Ns Op = Ns Ar value Ns Op , Ns Ar value .Ar ... .Nm -.Op Fl bdehNnoRTtqx +.Op Fl bdehNnoTtqWx .Op Fl B Ar bufsize .Fl a .Sh DESCRIPTION Modified: projects/clang800-import/share/man/man4/ng_iface.4 ============================================================================== --- projects/clang800-import/share/man/man4/ng_iface.4 Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/man/man4/ng_iface.4 Sun Feb 10 12:49:34 2019 (r343956) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $ .\" -.Dd January 12, 2015 +.Dd February 6, 2019 .Dt NG_IFACE 4 .Os .Sh NAME @@ -144,6 +144,17 @@ In case when your graph ends up with some kind of seri synchronous or modem, the .Nm is the right place to turn ALTQ on. +.Sh Nesting +.Nm +supports nesting, a configuration when traffic of one +.Nm +interface flows through the other. +The default maximum allowed nesting level is 2. +It can be changed at runtime setting +.Xr sysctl 8 +variable +.Va net.graph.iface.max_nesting +to the desired level of nesting. .Sh SEE ALSO .Xr altq 4 , .Xr bpf 4 , @@ -151,6 +162,7 @@ is the right place to turn ALTQ on. .Xr ng_cisco 4 , .Xr ifconfig 8 , .Xr ngctl 8 +.Xr sysctl .Sh HISTORY The .Nm iface Modified: projects/clang800-import/share/man/man9/bus_space.9 ============================================================================== --- projects/clang800-import/share/man/man9/bus_space.9 Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/man/man9/bus_space.9 Sun Feb 10 12:49:34 2019 (r343956) @@ -1,6 +1,7 @@ .\" $NetBSD: bus_space.9,v 1.9 1999/03/06 22:09:29 mycroft Exp $ .\" -.\" Copyright (c) 2005 M. Warner Losh. All Rights Reserved. +.\" Copyright (c) 2005 M. Warner Losh. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: Modified: projects/clang800-import/share/man/man9/config_intrhook.9 ============================================================================== --- projects/clang800-import/share/man/man9/config_intrhook.9 Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/man/man9/config_intrhook.9 Sun Feb 10 12:49:34 2019 (r343956) @@ -1,5 +1,5 @@ .\" -.\" Copyright (C) 2006 M. Warner Losh . All rights reserved. +.\" Copyright (C) 2006 M. Warner Losh . .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: projects/clang800-import/share/man/man9/pwm.9 ============================================================================== --- projects/clang800-import/share/man/man9/pwm.9 Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/man/man9/pwm.9 Sun Feb 10 12:49:34 2019 (r343956) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2018 +.Dd January 12, 2019 .Dt PWM 9 .Os .Sh NAME @@ -79,7 +79,7 @@ Get the current flags for the channel. Enable the PWM channel. .It Fn PWM_CHANNEL_ISENABLED "device_t dev" "int channel" "bool *enable" Test if the PWM channel is enabled. -.It PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel" +.It Fn PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel" Get the maximum number of channels supported by the controller. .El .Sh HISTORY Modified: projects/clang800-import/share/misc/bsd-family-tree ============================================================================== --- projects/clang800-import/share/misc/bsd-family-tree Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/misc/bsd-family-tree Sun Feb 10 12:49:34 2019 (r343956) @@ -374,8 +374,8 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | DragonFly 5.2.2 | FreeBSD | | NetBSD 7.2 | | - | 11.2 | | | | | - | | | | OpenBSD 6.4 | + | 11.2 macOS | | | | + | 10.14 | | OpenBSD 6.4 | | | | | | DragonFly 5.4.0 *--FreeBSD | | v | | | 12.0 | | | DragonFly 5.4.1 @@ -756,6 +756,7 @@ DragonFly 5.2.2 2018-06-18 [DFB] FreeBSD 11.2 2018-06-27 [FBD] NetBSD 8.0 2018-07-17 [NBD] NetBSD 7.2 2018-08-29 [NBD] +macOS 10.14 2018-09-24 [APL] OpenBSD 6.4 2018-10-18 [OBD] DragonFly 5.4.0 2018-12-03 [DFB] FreeBSD 12.0 2018-12-11 [FBD] Modified: projects/clang800-import/share/misc/committers-ports.dot ============================================================================== --- projects/clang800-import/share/misc/committers-ports.dot Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/misc/committers-ports.dot Sun Feb 10 12:49:34 2019 (r343956) @@ -150,6 +150,7 @@ jsa [label="Joseph S. Atkinson\njsa@FreeBSD.org\n2010/ jsm [label="Jesper Schmitz Mouridsen\njsm@FreeBSD.org\n2018/06/30"] junovitch [label="Jason Unovitch\njunovitch@FreeBSD.org\n2015/07/27"] jylefort [label="Jean-Yves Lefort\njylefort@FreeBSD.org\n2005/04/12"] +kai [label="Kai Knoblich\nkai@FreeBSD.org\n2019/02/01"] kami [label="Dominic Fandrey\nkami@FreeBSD.org\n2014/09/09"] kbowling [label="Kevin Bowling\nkbowling@FreeBSD.org\n2018/09/02"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2003/02/21"] @@ -476,6 +477,8 @@ jadawin -> wen joerg -> netchild +joneum -> kai + jrm -> dch jrm -> jwb @@ -573,6 +576,7 @@ miwi -> gahr miwi -> jhixson miwi -> joneum miwi -> jsm +miwi -> kai miwi -> kmoore miwi -> lme miwi -> makc @@ -714,6 +718,7 @@ tcberner -> yuri tcberner -> fernape tcberner -> arrowd tcberner -> rigoletto +tcberner -> kai thierry -> jadawin thierry -> riggs Modified: projects/clang800-import/share/misc/committers-src.dot ============================================================================== --- projects/clang800-import/share/misc/committers-src.dot Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/misc/committers-src.dot Sun Feb 10 12:49:34 2019 (r343956) @@ -216,6 +216,7 @@ jmcneill [label="Jared McNeill\njmcneill@FreeBSD.org\n jmg [label="John-Mark Gurney\njmg@FreeBSD.org\n1997/02/13"] jmmv [label="Julio Merino\njmmv@FreeBSD.org\n2013/11/02"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] +johalun [label="Johannes Lundberg\njohalun@FreeBSD.org\n2019/01/19"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2011/01/21"] @@ -558,6 +559,7 @@ imp -> dmlb imp -> emax imp -> furuta imp -> joe +imp -> johalun imp -> jon imp -> keichii imp -> kibab Modified: projects/clang800-import/share/mk/bsd.cpu.mk ============================================================================== --- projects/clang800-import/share/mk/bsd.cpu.mk Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/mk/bsd.cpu.mk Sun Feb 10 12:49:34 2019 (r343956) @@ -135,7 +135,7 @@ _CPUCFLAGS = -Wa,-me500 -msoft-float _CPUCFLAGS = -mcpu=${CPUTYPE} -mno-powerpc64 . endif . elif ${MACHINE_ARCH} == "powerpcspe" -_CPUCFLAGS = -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double +_CPUCFLAGS = -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double -mcpu=8548 . elif ${MACHINE_ARCH} == "powerpc64" _CPUCFLAGS = -mcpu=${CPUTYPE} . elif ${MACHINE_CPUARCH} == "mips" @@ -362,7 +362,7 @@ CFLAGS += -mfloat-abi=softfp .endif .if ${MACHINE_ARCH} == "powerpcspe" -CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double +CFLAGS += -mcpu=8548 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double .endif .if ${MACHINE_CPUARCH} == "riscv" Modified: projects/clang800-import/share/mk/src.opts.mk ============================================================================== --- projects/clang800-import/share/mk/src.opts.mk Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/mk/src.opts.mk Sun Feb 10 12:49:34 2019 (r343956) @@ -83,7 +83,6 @@ __DEFAULT_YES_OPTIONS = \ CPP \ CROSS_COMPILER \ CRYPT \ - CTM \ CUSE \ CXX \ CXGBETOOL \ Modified: projects/clang800-import/share/mk/suite.test.mk ============================================================================== --- projects/clang800-import/share/mk/suite.test.mk Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/share/mk/suite.test.mk Sun Feb 10 12:49:34 2019 (r343956) @@ -120,5 +120,7 @@ beforecheck: # etc. aftercheck: @cd ${.CURDIR} && ${MAKE} clean + @chflags -R 0 "${DESTDIR}" + @rm -Rf "${DESTDIR}" .endif Modified: projects/clang800-import/stand/efi/libefi/efienv.c ============================================================================== --- projects/clang800-import/stand/efi/libefi/efienv.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/stand/efi/libefi/efienv.c Sun Feb 10 12:49:34 2019 (r343956) @@ -48,7 +48,7 @@ efi_getenv(EFI_GUID *g, const char *v, void *data, siz return (EFI_OUT_OF_RESOURCES); dl = *len; rv = RS->GetVariable(uv, g, &attr, &dl, data); - if (rv == EFI_SUCCESS) + if (rv == EFI_SUCCESS || rv == EFI_BUFFER_TOO_SMALL) *len = dl; free(uv); return (rv); Modified: projects/clang800-import/sys/amd64/conf/GENERIC ============================================================================== --- projects/clang800-import/sys/amd64/conf/GENERIC Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/sys/amd64/conf/GENERIC Sun Feb 10 12:49:34 2019 (r343956) @@ -102,8 +102,8 @@ options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel Sanitizers -options COVERAGE # Generic kernel coverage. Used by KCOV -options KCOV # Kernel Coverage Sanitizer +#options COVERAGE # Generic kernel coverage. Used by KCOV +#options KCOV # Kernel Coverage Sanitizer # Warning: KUBSAN can result in a kernel too large for loader to load #options KUBSAN # Kernel Undefined Behavior Sanitizer Modified: projects/clang800-import/sys/amd64/conf/NOTES ============================================================================== --- projects/clang800-import/sys/amd64/conf/NOTES Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/sys/amd64/conf/NOTES Sun Feb 10 12:49:34 2019 (r343956) @@ -612,9 +612,6 @@ options EFIRT # Enable 32-bit runtime support for FreeBSD/i386 binaries. options COMPAT_FREEBSD32 -# Emulate spx device for client side of SVR3 local X interface -#XXX#options SPX_HACK - # Enable (32-bit) a.out binary support options COMPAT_AOUT Modified: projects/clang800-import/sys/arm/allwinner/axp81x.c ============================================================================== --- projects/clang800-import/sys/arm/allwinner/axp81x.c Sun Feb 10 12:45:33 2019 (r343955) +++ projects/clang800-import/sys/arm/allwinner/axp81x.c Sun Feb 10 12:49:34 2019 (r343956) @@ -65,9 +65,13 @@ MALLOC_DEFINE(M_AXP8XX_REG, "AXP8xx regulator", "AXP8x #define AXP_POWERSRC_ACIN (1 << 7) #define AXP_POWERSRC_VBUS (1 << 5) #define AXP_POWERSRC_VBAT (1 << 3) -#define AXP_POWERSRC_CHARING (1 << 2) +#define AXP_POWERSRC_CHARING (1 << 2) /* Charging Direction */ #define AXP_POWERSRC_SHORTED (1 << 1) #define AXP_POWERSRC_STARTUP (1 << 0) +#define AXP_POWERMODE 0x01 +#define AXP_POWERMODE_BAT_CHARGING (1 << 6) +#define AXP_POWERMODE_BAT_PRESENT (1 << 5) +#define AXP_POWERMODE_BAT_VALID (1 << 4) #define AXP_ICTYPE 0x03 #define AXP_POWERCTL1 0x10 #define AXP_POWERCTL1_DCDC7 (1 << 6) /* AXP813/818 only */ @@ -117,14 +121,47 @@ MALLOC_DEFINE(M_AXP8XX_REG, "AXP8xx regulator", "AXP8x #define AXP_POWERBAT 0x32 #define AXP_POWERBAT_SHUTDOWN (1 << 7) #define AXP_IRQEN1 0x40 +#define AXP_IRQEN1_ACIN_HI (1 << 6) +#define AXP_IRQEN1_ACIN_LO (1 << 5) +#define AXP_IRQEN1_VBUS_HI (1 << 3) +#define AXP_IRQEN1_VBUS_LO (1 << 2) #define AXP_IRQEN2 0x41 +#define AXP_IRQEN2_BAT_IN (1 << 7) +#define AXP_IRQEN2_BAT_NO (1 << 6) +#define AXP_IRQEN2_BATCHGC (1 << 3) +#define AXP_IRQEN2_BATCHGD (1 << 2) #define AXP_IRQEN3 0x42 #define AXP_IRQEN4 0x43 +#define AXP_IRQEN4_BATLVL_LO1 (1 << 1) +#define AXP_IRQEN4_BATLVL_LO0 (1 << 0) #define AXP_IRQEN5 0x44 #define AXP_IRQEN5_POKSIRQ (1 << 4) +#define AXP_IRQEN5_POKLIRQ (1 << 3) #define AXP_IRQEN6 0x45 +#define AXP_IRQSTAT1 0x48 +#define AXP_IRQSTAT1_ACIN_HI (1 << 6) +#define AXP_IRQSTAT1_ACIN_LO (1 << 5) +#define AXP_IRQSTAT1_VBUS_HI (1 << 3) +#define AXP_IRQSTAT1_VBUS_LO (1 << 2) +#define AXP_IRQSTAT2 0x49 +#define AXP_IRQSTAT2_BAT_IN (1 << 7) +#define AXP_IRQSTAT2_BAT_NO (1 << 6) +#define AXP_IRQSTAT2_BATCHGC (1 << 3) +#define AXP_IRQSTAT2_BATCHGD (1 << 2) +#define AXP_IRQSTAT3 0x4a +#define AXP_IRQSTAT4 0x4b +#define AXP_IRQSTAT4_BATLVL_LO1 (1 << 1) +#define AXP_IRQSTAT4_BATLVL_LO0 (1 << 0) #define AXP_IRQSTAT5 0x4c #define AXP_IRQSTAT5_POKSIRQ (1 << 4) +#define AXP_IRQEN5_POKLIRQ (1 << 3) +#define AXP_IRQSTAT6 0x4d +#define AXP_BATSENSE_HI 0x78 +#define AXP_BATSENSE_LO 0x79 +#define AXP_BATCHG_HI 0x7a +#define AXP_BATCHG_LO 0x7b +#define AXP_BATDISCHG_HI 0x7c +#define AXP_BATDISCHG_LO 0x7d #define AXP_GPIO0_CTRL 0x90 #define AXP_GPIO0LDO_CTRL 0x91 #define AXP_GPIO1_CTRL 0x92 @@ -138,7 +175,25 @@ MALLOC_DEFINE(M_AXP8XX_REG, "AXP8xx regulator", "AXP8x #define AXP_GPIO_FUNC_LDO_OFF 4 #define AXP_GPIO_SIGBIT 0x94 #define AXP_GPIO_PD 0x97 +#define AXP_FUEL_GAUGECTL 0xb8 +#define AXP_FUEL_GAUGECTL_EN (1 << 7) +#define AXP_BAT_CAP 0xb9 +#define AXP_BAT_CAP_VALID (1 << 7) +#define AXP_BAT_CAP_PERCENT 0x7f + +#define AXP_BAT_MAX_CAP_HI 0xe0 +#define AXP_BAT_MAX_CAP_VALID (1 << 7) +#define AXP_BAT_MAX_CAP_LO 0xe1 + +#define AXP_BAT_COULOMB_HI 0xe2 +#define AXP_BAT_COULOMB_VALID (1 << 7) +#define AXP_BAT_COULOMB_LO 0xe3 + +#define AXP_BAT_CAP_WARN 0xe6 +#define AXP_BAT_CAP_WARN_LV1 0xf0 /* Bits 4, 5, 6, 7 */ +#define AXP_BAT_CAP_WARN_LV2 0xf /* Bits 0, 1, 2, 3 */ + static const struct { const char *name; uint8_t ctrl_reg; @@ -710,6 +765,68 @@ axp8xx_intr(void *arg) dev = arg; + error = axp8xx_read(dev, AXP_IRQSTAT1, &val, 1); + if (error != 0) + return; + + if (val) { + if (bootverbose) + device_printf(dev, "AXP_IRQSTAT1 val: %x\n", val); + if (val & AXP_IRQSTAT1_ACIN_HI) + devctl_notify("PMU", "AC", "plugged", NULL); + if (val & AXP_IRQSTAT1_ACIN_LO) + devctl_notify("PMU", "AC", "unplugged", NULL); + if (val & AXP_IRQSTAT1_VBUS_HI) + devctl_notify("PMU", "USB", "plugged", NULL); + if (val & AXP_IRQSTAT1_VBUS_LO) + devctl_notify("PMU", "USB", "unplugged", NULL); + /* Acknowledge */ + axp8xx_write(dev, AXP_IRQSTAT1, val); + } + + error = axp8xx_read(dev, AXP_IRQSTAT2, &val, 1); + if (error != 0) + return; + + if (val) { + if (bootverbose) + device_printf(dev, "AXP_IRQSTAT2 val: %x\n", val); + if (val & AXP_IRQSTAT2_BATCHGD) + devctl_notify("PMU", "Battery", "charged", NULL); + if (val & AXP_IRQSTAT2_BATCHGC) + devctl_notify("PMU", "Battery", "charging", NULL); + if (val & AXP_IRQSTAT2_BAT_NO) + devctl_notify("PMU", "Battery", "absent", NULL); + if (val & AXP_IRQSTAT2_BAT_IN) + devctl_notify("PMU", "Battery", "plugged", NULL); + /* Acknowledge */ + axp8xx_write(dev, AXP_IRQSTAT2, val); + } + + error = axp8xx_read(dev, AXP_IRQSTAT3, &val, 1); + if (error != 0) + return; + + if (val) { + /* Acknowledge */ + axp8xx_write(dev, AXP_IRQSTAT3, val); + } + + error = axp8xx_read(dev, AXP_IRQSTAT4, &val, 1); + if (error != 0) + return; + + if (val) { + if (bootverbose) + device_printf(dev, "AXP_IRQSTAT4 val: %x\n", val); + if (val & AXP_IRQSTAT4_BATLVL_LO0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Wed Feb 13 02:29:30 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD63614E0ABC for ; Wed, 13 Feb 2019 02:29:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 637006C0BB; Wed, 13 Feb 2019 02:29:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5618020DA7; Wed, 13 Feb 2019 02:29:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1D2TUvV054574; Wed, 13 Feb 2019 02:29:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1D2TUjP054573; Wed, 13 Feb 2019 02:29:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201902130229.x1D2TUjP054573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 13 Feb 2019 02:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r344081 - projects/import-googletest-1.8.1 X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/import-googletest-1.8.1 X-SVN-Commit-Revision: 344081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 637006C0BB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 02:29:30 -0000 Author: ngie Date: Wed Feb 13 02:29:29 2019 New Revision: 344081 URL: https://svnweb.freebsd.org/changeset/base/344081 Log: Create a project branch for importing googletest 1.8.1 This test framework will serve as an alternative for expressing C++ testcases. See r344078 for more rationale about the set of changes. Added: - copied from r344080, head/ Directory Properties: projects/import-googletest-1.8.1/ (props changed) From owner-svn-src-projects@freebsd.org Wed Feb 13 02:46:47 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80FD514E1101 for ; Wed, 13 Feb 2019 02:46:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26E086CC4D; Wed, 13 Feb 2019 02:46:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED1AB210EB; Wed, 13 Feb 2019 02:46:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1D2kkxT064995; Wed, 13 Feb 2019 02:46:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1D2kkBp064994; Wed, 13 Feb 2019 02:46:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201902130246.x1D2kkBp064994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 13 Feb 2019 02:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r344082 - projects/import-googletest-1.8.1/contrib/googletest X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/import-googletest-1.8.1/contrib/googletest X-SVN-Commit-Revision: 344082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 26E086CC4D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 02:46:47 -0000 Author: ngie Date: Wed Feb 13 02:46:46 2019 New Revision: 344082 URL: https://svnweb.freebsd.org/changeset/base/344082 Log: Copy googletest 1.8.1 from ^/vendor/google/googletest/1.8.1 to .../contrib/googletest Added: projects/import-googletest-1.8.1/contrib/googletest/ - copied from r344081, vendor/google/googletest/1.8.1/ From owner-svn-src-projects@freebsd.org Wed Feb 13 04:58:19 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9284B14E3ABC for ; Wed, 13 Feb 2019 04:58:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 400CE70B15; Wed, 13 Feb 2019 04:58:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3111E22760; Wed, 13 Feb 2019 04:58:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1D4wJF3033542; Wed, 13 Feb 2019 04:58:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1D4wF0Y033523; Wed, 13 Feb 2019 04:58:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201902130458.x1D4wF0Y033523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 13 Feb 2019 04:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r344086 - in projects/import-googletest-1.8.1: etc/mtree lib lib/googletest lib/googletest/gmock lib/googletest/gmock/tests lib/googletest/gmock_main lib/googletest/gmock_main/tests lib... X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in projects/import-googletest-1.8.1: etc/mtree lib lib/googletest lib/googletest/gmock lib/googletest/gmock/tests lib/googletest/gmock_main lib/googletest/gmock_main/tests lib/googletest/gtest lib/goo... X-SVN-Commit-Revision: 344086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 400CE70B15 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 04:58:19 -0000 Author: ngie Date: Wed Feb 13 04:58:15 2019 New Revision: 344086 URL: https://svnweb.freebsd.org/changeset/base/344086 Log: Merge build glue for libraries and tests done on github I need to doublecheck my work vs the port, but I believe that this covers the initial integration of all upstream tests. Ref: https://github.com/ngie-eign/freebsd/tree/googletest-integration Added: projects/import-googletest-1.8.1/lib/googletest/ projects/import-googletest-1.8.1/lib/googletest/Makefile (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/Makefile.inc (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gmock/ projects/import-googletest-1.8.1/lib/googletest/gmock/Makefile (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gmock/tests/ projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gmock_main/ projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile.inc (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gmock_main/tests/ projects/import-googletest-1.8.1/lib/googletest/gmock_main/tests/Makefile (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gtest/ projects/import-googletest-1.8.1/lib/googletest/gtest/Makefile (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gtest/Makefile.inc (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gtest/tests/ projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gtest_main/ projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile.inc (contents, props changed) projects/import-googletest-1.8.1/lib/googletest/gtest_main/tests/ projects/import-googletest-1.8.1/lib/googletest/gtest_main/tests/Makefile (contents, props changed) Modified: projects/import-googletest-1.8.1/etc/mtree/BSD.include.dist projects/import-googletest-1.8.1/lib/Makefile projects/import-googletest-1.8.1/share/mk/src.libnames.mk Modified: projects/import-googletest-1.8.1/etc/mtree/BSD.include.dist ============================================================================== --- projects/import-googletest-1.8.1/etc/mtree/BSD.include.dist Wed Feb 13 04:52:01 2019 (r344085) +++ projects/import-googletest-1.8.1/etc/mtree/BSD.include.dist Wed Feb 13 04:58:15 2019 (r344086) @@ -231,6 +231,18 @@ virstor .. .. + gmock + internal + custom + .. + .. + .. + gtest + internal + custom + .. + .. + .. gnu posix .. Modified: projects/import-googletest-1.8.1/lib/Makefile ============================================================================== --- projects/import-googletest-1.8.1/lib/Makefile Wed Feb 13 04:52:01 2019 (r344085) +++ projects/import-googletest-1.8.1/lib/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -200,6 +200,7 @@ SUBDIR.${MK_RADIUS_SUPPORT}+= libradius SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil SUBDIR.${MK_TELNET}+= libtelnet SUBDIR.${MK_TESTS_SUPPORT}+= atf +SUBDIR.${MK_TESTS_SUPPORT}+= googletest SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_UNBOUND}+= libunbound SUBDIR.${MK_USB}+= libusbhid libusb Added: projects/import-googletest-1.8.1/lib/googletest/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +SUBDIR+= gtest +SUBDIR+= .WAIT +SUBDIR+= gmock +SUBDIR.${MK_TESTS}+= .WAIT +SUBDIR.${MK_TESTS}+= gmock_main +SUBDIR.${MK_TESTS}+= gtest_main + +.include Added: projects/import-googletest-1.8.1/lib/googletest/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/Makefile.inc Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +CXXFLAGS+= -DGTEST_HAS_PTHREAD=1 + +GTEST_DIR= ${SRCTOP}/contrib/googletest +GOOGLEMOCK_SRCROOT= ${GTEST_DIR}/googlemock +GOOGLETEST_SRCROOT= ${GTEST_DIR}/googletest + +NO_WTHREAD_SAFETY= + +WARNS?= 6 Added: projects/import-googletest-1.8.1/lib/googletest/gmock/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gmock/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,43 @@ +# $FreeBSD$ + +.include + +.PATH: ${GOOGLEMOCK_SRCROOT}/include ${GOOGLEMOCK_SRCROOT}/src + +LIB_CXX= gmock +SHLIB_MAJOR= 0 +PRIVATELIB= true + +CXXFLAGS+= -I${GOOGLEMOCK_SRCROOT}/include +CXXFLAGS+= -I${GOOGLEMOCK_SRCROOT} +CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include + +LIBADD+= gtest +LDFLAGS+= -L${.OBJDIR:H}/gtest + +MAIN_INCSDIR= ${INCLUDEDIR}/gmock +MAIN_INCS+= gmock/gmock-matchers.h +MAIN_INCS+= gmock/gmock-more-actions.h +MAIN_INCS+= gmock/gmock-generated-actions.h +MAIN_INCS+= gmock/gmock-generated-matchers.h +MAIN_INCS+= gmock/gmock-generated-nice-strict.h +MAIN_INCS+= gmock/gmock-more-matchers.h +MAIN_INCS+= gmock/gmock-generated-function-mockers.h +MAIN_INCS+= gmock/gmock-cardinalities.h +MAIN_INCS+= gmock/gmock-spec-builders.h +MAIN_INCS+= gmock/gmock.h +MAIN_INCS+= gmock/gmock-actions.h + +INTERNAL_INCSDIR= ${INCLUDEDIR}/gmock/internal +INTERNAL_INCS+= gmock/internal/gmock-port.h +INTERNAL_INCS+= gmock/internal/gmock-internal-utils.h +INTERNAL_INCS+= gmock/internal/gmock-generated-internal-utils.h + +INTERNAL_CUSTOM_INCSDIR= ${INCLUDEDIR}/gmock/internal/custom +INTERNAL_CUSTOM_INCS+= gmock/internal/custom/gmock-port.h +INTERNAL_CUSTOM_INCS+= gmock/internal/custom/gmock-matchers.h +INTERNAL_CUSTOM_INCS+= gmock/internal/custom/gmock-generated-actions.h + +SRCS+= gmock-all.cc + +.include Added: projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PLAIN_TESTS_CXX+= gmock_stress_test + +LIBADD+= gmock + +.include Added: projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include + +.PATH: ${GOOGLEMOCK_SRCROOT}/include ${GOOGLEMOCK_SRCROOT}/src + +LIB_CXX= gmock_main +SHLIB_MAJOR= 0 +PRIVATELIB= true + +CXXFLAGS+= -I${GOOGLEMOCK_SRCROOT}/include +CXXFLAGS+= -I${GOOGLEMOCK_SRCROOT} +CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include + +LIBADD= gmock +SRCS+= gmock_main.cc + +SUBDIR.${MK_TESTS}+= tests + +.include Added: projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile.inc Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +include ../Makefile.inc Added: projects/import-googletest-1.8.1/lib/googletest/gmock_main/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gmock_main/tests/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +.include + +.PATH: ${GOOGLEMOCK_SRCROOT}/src ${GOOGLEMOCK_SRCROOT}/test + +PLAIN_TESTS_CXX+= gmock-actions_test +PLAIN_TESTS_CXX+= gmock-cardinalities_test +PLAIN_TESTS_CXX+= gmock-ex_test +PLAIN_TESTS_CXX+= gmock-generated-actions_test +PLAIN_TESTS_CXX+= gmock-generated-function-mockers_test +PLAIN_TESTS_CXX+= gmock-generated-internal-utils_test +PLAIN_TESTS_CXX+= gmock-generated-matchers_test +PLAIN_TESTS_CXX+= gmock-internal-utils_test +PLAIN_TESTS_CXX+= gmock-matchers_test +PLAIN_TESTS_CXX+= gmock-more-actions_test +PLAIN_TESTS_CXX+= gmock-nice-strict_test +PLAIN_TESTS_CXX+= gmock-port_test +PLAIN_TESTS_CXX+= gmock-spec-builders_test +PLAIN_TESTS_CXX+= gmock_link_test +PLAIN_TESTS_CXX+= gmock_test + +CXXFLAGS+= -I${GOOGLEMOCK_SRCROOT}/include +CXXFLAGS+= -I${GOOGLEMOCK_SRCROOT} + +.for test in ${PLAIN_TESTS_CXX} +SRCS.${test}= gmock_main.cc +.endfor + +SRCS.gmock_link_test+= gmock_link2_test.cc + +LIBADD= gmock + +.include Added: projects/import-googletest-1.8.1/lib/googletest/gtest/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gtest/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,52 @@ +# $FreeBSD$ + +.include + +.PATH: ${GOOGLETEST_SRCROOT}/include ${GOOGLETEST_SRCROOT}/src + +LIB_CXX= gtest +SHLIB_MAJOR= 0 +PRIVATELIB= true + +CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include +CXXFLAGS+= -I${GOOGLETEST_SRCROOT} + +INCSGROUPS= MAIN_INCS INTERNAL_INCS INTERNAL_CUSTOM_INCS + +MAIN_INCSDIR= ${INCLUDEDIR}/gtest +MAIN_INCS+= gtest/gtest-death-test.h +MAIN_INCS+= gtest/gtest-message.h +MAIN_INCS+= gtest/gtest-param-test.h +MAIN_INCS+= gtest/gtest-printers.h +MAIN_INCS+= gtest/gtest-spi.h +MAIN_INCS+= gtest/gtest-test-part.h +MAIN_INCS+= gtest/gtest-typed-test.h +MAIN_INCS+= gtest/gtest.h +MAIN_INCS+= gtest/gtest_pred_impl.h +MAIN_INCS+= gtest/gtest_prod.h + +INTERNAL_INCSDIR= ${INCLUDEDIR}/gtest/internal +INTERNAL_INCS+= gtest/internal/gtest-death-test-internal.h +INTERNAL_INCS+= gtest/internal/gtest-filepath.h +INTERNAL_INCS+= gtest/internal/gtest-internal.h +INTERNAL_INCS+= gtest/internal/gtest-linked_ptr.h +INTERNAL_INCS+= gtest/internal/gtest-param-util-generated.h +INTERNAL_INCS+= gtest/internal/gtest-param-util.h +INTERNAL_INCS+= gtest/internal/gtest-port-arch.h +INTERNAL_INCS+= gtest/internal/gtest-port.h +INTERNAL_INCS+= gtest/internal/gtest-string.h +INTERNAL_INCS+= gtest/internal/gtest-tuple.h +INTERNAL_INCS+= gtest/internal/gtest-type-util.h + +INTERNAL_CUSTOM_INCSDIR= ${INCLUDEDIR}/gtest/internal/custom +INTERNAL_CUSTOM_INCS+= gtest/internal/custom/gtest-port.h +INTERNAL_CUSTOM_INCS+= gtest/internal/custom/gtest-printers.h +INTERNAL_CUSTOM_INCS+= gtest/internal/custom/gtest.h + +SRCS+= gtest-all.cc + +LIBADD+= pthread + +SUBDIR.${MK_TESTS}+= tests + +.include Added: projects/import-googletest-1.8.1/lib/googletest/gtest/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gtest/Makefile.inc Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +include ../Makefile.inc Added: projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +.include + +.PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test + +PLAIN_TESTS_CXX+= gtest_environment_test +PLAIN_TESTS_CXX+= gtest_no_test_unittest +PLAIN_TESTS_CXX+= googletest-param-test-test +PLAIN_TESTS_CXX+= gtest_premature_exit_test +PLAIN_TESTS_CXX+= gtest_repeat_test +PLAIN_TESTS_CXX+= gtest_stress_test +PLAIN_TESTS_CXX+= gtest_throw_on_failure_ex_test +PLAIN_TESTS_CXX+= gtest-unittest-api_test + +SRCS.googletest-param-test-test+= googletest-param-test-test.cc +SRCS.googletest-param-test-test+= googletest-param-test2-test.cc +SRCS.gtest_premature_exit_test+= gtest_premature_exit_test.cc + +.for test in ${PLAIN_TESTS_CXX} +# XXX: linker error; no main(..) +#SRCS.${test}= gtest-all.cc +SRCS.${test}?= gtest_main.cc +.endfor + +CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include +CXXFLAGS+= -I${GOOGLETEST_SRCROOT} + +LIBADD= gtest + +.include Added: projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.include + +.PATH: ${GOOGLETEST_SRCROOT}/include ${GOOGLETEST_SRCROOT}/src + +LIB_CXX= gtest_main +SHLIB_MAJOR= 0 +PRIVATELIB= true + +CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include +CXXFLAGS+= -I${GOOGLETEST_SRCROOT} + +SRCS+= gtest_main.cc + +SUBDIR.${MK_TESTS}+= tests + +.include Added: projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile.inc Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +include ../Makefile.inc Added: projects/import-googletest-1.8.1/lib/googletest/gtest_main/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/import-googletest-1.8.1/lib/googletest/gtest_main/tests/Makefile Wed Feb 13 04:58:15 2019 (r344086) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +.include + +.PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test + +PLAIN_TESTS_CXX+= googletest-death-test-test +PLAIN_TESTS_CXX+= googletest-filepath-test +PLAIN_TESTS_CXX+= googletest-linked-ptr-test +PLAIN_TESTS_CXX+= googletest-listener-test +PLAIN_TESTS_CXX+= gtest_main_unittest +PLAIN_TESTS_CXX+= googletest-message-test +PLAIN_TESTS_CXX+= googletest-options-test +PLAIN_TESTS_CXX+= googletest-port-test +PLAIN_TESTS_CXX+= gtest_pred_impl_unittest +PLAIN_TESTS_CXX+= googletest-printers-test +PLAIN_TESTS_CXX+= gtest_prod_test +PLAIN_TESTS_CXX+= gtest_sole_header_test +PLAIN_TESTS_CXX+= googletest-test-part-test +PLAIN_TESTS_CXX+= gtest-typed-test_test +PLAIN_TESTS_CXX+= gtest_unittest + +.for test in ${PLAIN_TESTS_CXX} +SRCS.${test}= gtest_main.cc +.endfor + +CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include +CXXFLAGS+= -I${GOOGLETEST_SRCROOT} + +SRCS.gtest-typed-test_test+= gtest-typed-test2_test.cc + +LIBADD= gtest + +.include Modified: projects/import-googletest-1.8.1/share/mk/src.libnames.mk ============================================================================== --- projects/import-googletest-1.8.1/share/mk/src.libnames.mk Wed Feb 13 04:52:01 2019 (r344085) +++ projects/import-googletest-1.8.1/share/mk/src.libnames.mk Wed Feb 13 04:58:15 2019 (r344086) @@ -18,6 +18,10 @@ _PRIVATELIBS= \ bsdstat \ devdctl \ event \ + gmock \ + gtest \ + gmock_main \ + gtest_main \ heimipcc \ heimipcs \ ifconfig \ @@ -287,6 +291,10 @@ _DP_dpv= dialog figpar util ncursesw _DP_dialog= ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c +_DP_gtest= pthread +_DP_gmock= gtest +_DP_gmock_main= gmock +_DP_gtest_main= gtest _DP_devstat= kvm _DP_pam= radius tacplus opie md util .if ${MK_KERBEROS} != "no" @@ -364,6 +372,15 @@ LIBATF_CXX= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf- LDADD_atf_c= -lprivateatf-c LDADD_atf_cxx= -lprivateatf-c++ +LIBGMOCK= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock.a +LIBGTEST= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest.a +LIBGMOCKMAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmockmain.a +LIBGTESTMAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtestmain.a +LDADD_gmock= -lprivategmock +LDADD_gtest= -lprivategtest +LDADD_gmock_main= -lprivategmock_main +LDADD_gtest_main= -lprivategtest_main + .for _l in ${_PRIVATELIBS} LIB${_l:tu}?= ${LIBDESTDIR}${LIBDIR_BASE}/libprivate${_l}.a .endfor @@ -400,6 +417,15 @@ LDADD_${_l}+= ${LDADD_${_d}} DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} +DPADD_gmock+= ${DPADD_gtest} +LDADD_gmock+= ${LDADD_gtest} + +DPADD_gmock_main+= ${DPADD_gmock} +LDADD_gmock_main+= ${LDADD_gmock} + +DPADD_gtest_main+= ${DPADD_gtest} +LDADD_gtest_main+= ${LDADD_gtest} + # Detect LDADD/DPADD that should be LIBADD, before modifying LDADD here. _BADLDADD= .for _l in ${LDADD:M-l*:N-l*/*:C,^-l,,} @@ -538,6 +564,10 @@ LIBROKENDIR= ${OBJTOP}/kerberos5/lib/libroken LIBWINDDIR= ${OBJTOP}/kerberos5/lib/libwind LIBATF_CDIR= ${OBJTOP}/lib/atf/libatf-c LIBATF_CXXDIR= ${OBJTOP}/lib/atf/libatf-c++ +LIBGMOCKDIR= ${OBJTOP}/lib/googletest/gmock +LIBGMOCK_MAINDIR= ${OBJTOP}/lib/googletest/gmock_main +LIBGTESTDIR= ${OBJTOP}/lib/googletest/gtest +LIBGTEST_MAINDIR= ${OBJTOP}/lib/googletest/gtest_main LIBALIASDIR= ${OBJTOP}/lib/libalias/libalias LIBBLACKLISTDIR= ${OBJTOP}/lib/libblacklist LIBBLOCKSRUNTIMEDIR= ${OBJTOP}/lib/libblocksruntime From owner-svn-src-projects@freebsd.org Wed Feb 13 05:41:05 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A57214E498A for ; Wed, 13 Feb 2019 05:41:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B89F271A60; Wed, 13 Feb 2019 05:41:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAB6A22E35; Wed, 13 Feb 2019 05:41:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1D5f4VX055411; Wed, 13 Feb 2019 05:41:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1D5f4CV055409; Wed, 13 Feb 2019 05:41:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201902130541.x1D5f4CV055409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 13 Feb 2019 05:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r344087 - in projects/import-googletest-1.8.1/lib/googletest: gmock/tests gtest/tests X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in projects/import-googletest-1.8.1/lib/googletest: gmock/tests gtest/tests X-SVN-Commit-Revision: 344087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B89F271A60 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 05:41:05 -0000 Author: ngie Date: Wed Feb 13 05:41:04 2019 New Revision: 344087 URL: https://svnweb.freebsd.org/changeset/base/344087 Log: Compile the tests without -Werror for now I'm working on resolving the issue upstream on github Modified: projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Modified: projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile ============================================================================== --- projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile Wed Feb 13 04:58:15 2019 (r344086) +++ projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile Wed Feb 13 05:41:04 2019 (r344087) @@ -4,4 +4,7 @@ PLAIN_TESTS_CXX+= gmock_stress_test LIBADD+= gmock +# XXX: https://github.com/google/googletest/pull/2119 +NO_WERROR= + .include Modified: projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile ============================================================================== --- projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Wed Feb 13 04:58:15 2019 (r344086) +++ projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Wed Feb 13 05:41:04 2019 (r344087) @@ -28,4 +28,7 @@ CXXFLAGS+= -I${GOOGLETEST_SRCROOT} LIBADD= gtest +# XXX: https://github.com/google/googletest/pull/2119 +NO_WERROR= + .include From owner-svn-src-projects@freebsd.org Wed Feb 13 14:26:10 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6C3C14F0D89 for ; Wed, 13 Feb 2019 14:26:09 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 578DA8BF30; Wed, 13 Feb 2019 14:26:09 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x1DEQ6mb081626; Wed, 13 Feb 2019 06:26:07 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x1DEQ6xk081625; Wed, 13 Feb 2019 06:26:06 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201902131426.x1DEQ6xk081625@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r344087 - in projects/import-googletest-1.8.1/lib/googletest: gmock/tests gtest/tests In-Reply-To: <201902130541.x1D5f4CV055409@repo.freebsd.org> To: Enji Cooper Date: Wed, 13 Feb 2019 06:26:06 -0800 (PST) CC: src-committers@freebsd.org, svn-src-projects@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 578DA8BF30 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 14:26:10 -0000 > Author: ngie > Date: Wed Feb 13 05:41:04 2019 > New Revision: 344087 > URL: https://svnweb.freebsd.org/changeset/base/344087 > > Log: > Compile the tests without -Werror for now > > I'm working on resolving the issue upstream on github > > Modified: > projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile > projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Are we going to have to live with this project name of import-googletest-1.8.1 long term, or is this just a stepping stone? > Modified: projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile > ============================================================================== > --- projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile Wed Feb 13 04:58:15 2019 (r344086) > +++ projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile Wed Feb 13 05:41:04 2019 (r344087) > @@ -4,4 +4,7 @@ PLAIN_TESTS_CXX+= gmock_stress_test > > LIBADD+= gmock > > +# XXX: https://github.com/google/googletest/pull/2119 > +NO_WERROR= > + > .include > > Modified: projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile > ============================================================================== > --- projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Wed Feb 13 04:58:15 2019 (r344086) > +++ projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Wed Feb 13 05:41:04 2019 (r344087) > @@ -28,4 +28,7 @@ CXXFLAGS+= -I${GOOGLETEST_SRCROOT} > > LIBADD= gtest > > +# XXX: https://github.com/google/googletest/pull/2119 > +NO_WERROR= > + > .include > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-projects@freebsd.org Wed Feb 13 14:36:16 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D612A14F1118 for ; Wed, 13 Feb 2019 14:36:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5081D8C724; Wed, 13 Feb 2019 14:36:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x62b.google.com with SMTP id 101so1249099pld.6; Wed, 13 Feb 2019 06:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UVyKR0YOYoNw/Pq4PPkBKACfw3C5mW84oC85AtQAUAU=; b=Edmvrn+Dv1UvzwLx8rahZxypB2eEhGjlv2dfrxrGJfdJO92GSpE/AUfYCjLhBb8rej rp+NBEfXJGF/vCY8UIInD68l/ua6DkQAjiNejksRB2inDgt3tDriFB/q0sRvGgjds1+Z v6OMiColsRPbfZ09Lf0HMACCxHi/3uxNRhSS6MxR0eJTIyKnliW23aDW5zGdPaS83hJD sAl96Dy3xBdImxGMN1XWFlcy3eLn0+ktyvoiJtUX2cUyEPMEhI8IvA8Mp3gKMV/pJD+w JRVDbNzvMNvOvOX1irAQsEWm0YQxfkqxtwl9cMe0LATOAq1404Xq+DCCfcNe3NO5OLy7 7P7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UVyKR0YOYoNw/Pq4PPkBKACfw3C5mW84oC85AtQAUAU=; b=fV5M5wXDKulPbThpGwyRct8pHP4zDqYWqXwr5G1EzRMx6L5oDg+jYBtlB0DdEzJl7j 5vHPFvBaNJz0Iju2LEES427JeQjkjeCVtuqlncE5vTsb6q7l3GZAHubIin1D0xUjFpLZ JpPuxhw3zWIWsfhjbasqGa/buT1Cz/BpDQgg7EoxfTnWzSz3YBporJdw/Pp9irbrpd9i eod4iw6e3XRS2GqYkzI2UkAyL0BiVU3eTCU416icV4FH2zCz6KCISE/arVcaJulT9aBV Fb5USpvjU2jeMcyabt5LBpk+HcbQQ4lc96LMLyzArJ+cX0fB17OOQyequIoBYwjx3huC 6bQw== X-Gm-Message-State: AHQUAubqFQH//JALoDrOPbZWdqY44AGsBDYOtS1EgJ1MoOwdQJU1Iybl FigXdkEAr9bzqVBdFWoPPBBlDVQ3 X-Google-Smtp-Source: AHgI3IbIWGfo+UKx5uOqeB3uno9qyR2mnxSY7eibJ5ogJ6DYrI7jmTwjA//yWo0kPLPmlIUYBJcMug== X-Received: by 2002:a17:902:8f8d:: with SMTP id z13mr817888plo.95.1550068573464; Wed, 13 Feb 2019 06:36:13 -0800 (PST) Received: from ?IPv6:2607:fb90:a695:22c1:409c:1f73:a1ae:a38e? ([2607:fb90:a695:22c1:409c:1f73:a1ae:a38e]) by smtp.gmail.com with ESMTPSA id a90sm30560298pfj.109.2019.02.13.06.36.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 06:36:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r344087 - in projects/import-googletest-1.8.1/lib/googletest: gmock/tests gtest/tests From: Enji Cooper X-Mailer: iPhone Mail (16C104) In-Reply-To: <201902131426.x1DEQ6xk081625@pdx.rh.CN85.dnsmgr.net> Date: Wed, 13 Feb 2019 06:36:11 -0800 Cc: Enji Cooper , src-committers@freebsd.org, svn-src-projects@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201902131426.x1DEQ6xk081625@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-Rspamd-Queue-Id: 5081D8C724 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.92)[-0.922,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 14:36:16 -0000 On Feb 13, 2019, at 06:26, Rodney W. Grimes = wrote: >> Author: ngie >> Date: Wed Feb 13 05:41:04 2019 >> New Revision: 344087 >> URL: https://svnweb.freebsd.org/changeset/base/344087 >>=20 >> Log: >> Compile the tests without -Werror for now >>=20 >> I'm working on resolving the issue upstream on github >>=20 >> Modified: >> projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile >> projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile >=20 > Are we going to have to live with this project name of > import-googletest-1.8.1 long term, or is this just a > stepping stone? It=E2=80=99s a short lived project. I didn=E2=80=99t realize in the last yea= r and a half that branch names had formalized into something else, especiall= y since GUIDELINES.txt doesn=E2=80=99t state a naming convention. I could move the project to another name, but that seems like a waste of a c= ommit and like it would make it more difficult to track the project history.= -Enji= From owner-svn-src-projects@freebsd.org Wed Feb 13 14:42:41 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55C4B14F1566 for ; Wed, 13 Feb 2019 14:42:41 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C24E88CFA5; Wed, 13 Feb 2019 14:42:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x1DEgcGw081704; Wed, 13 Feb 2019 06:42:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x1DEgcsa081703; Wed, 13 Feb 2019 06:42:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201902131442.x1DEgcsa081703@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r344087 - in projects/import-googletest-1.8.1/lib/googletest: gmock/tests gtest/tests In-Reply-To: To: Enji Cooper Date: Wed, 13 Feb 2019 06:42:38 -0800 (PST) CC: rgrimes@freebsd.org, Enji Cooper , src-committers@freebsd.org, svn-src-projects@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: C24E88CFA5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 14:42:41 -0000 > On Feb 13, 2019, at 06:26, Rodney W. Grimes wrote: > > >> Author: ngie > >> Date: Wed Feb 13 05:41:04 2019 > >> New Revision: 344087 > >> URL: https://svnweb.freebsd.org/changeset/base/344087 > >> > >> Log: > >> Compile the tests without -Werror for now > >> > >> I'm working on resolving the issue upstream on github > >> > >> Modified: > >> projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile > >> projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile > > > > Are we going to have to live with this project name of > > import-googletest-1.8.1 long term, or is this just a > > stepping stone? > > It?s a short lived project. I didn?t realize in the last year and a > half that branch names had formalized into something else, especially > since GUIDELINES.txt doesn?t state a naming convention. I do not know that they have formalized in any way. But as long as it is shorted lived it really does not matter much. Please do be careful when choosing a vendor/ directory name if that is where this is headed, 'import' and '1.8.1' are probably not wanted there at all, just googletest. > I could move the project to another name, > but that seems like a waste of a commit > and like it would make it more difficult to track the project history. I Agree. > -Enji -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-projects@freebsd.org Wed Feb 13 15:09:02 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C121514F1F2F for ; Wed, 13 Feb 2019 15:09:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C40E8E40F; Wed, 13 Feb 2019 15:09:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf1-x441.google.com with SMTP id h1so1265042pfo.7; Wed, 13 Feb 2019 07:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f2I7oUW51OM6c652LpojxrAjS/S37aslLbs3+usZvzg=; b=mv1EsmmQmiCpsdGv/+xwYUToeommhPbyuCw9iQ7Vk9M4gYVCKdI1s9E9cOymMrY3NO emm5HEVOdtbNGY56jtWE6fysR71S/Czb3PDFoIzx+9BZJGK1S9nXP3oPcgn4JiKt8DLR xIOG+xODvZC6zl1edIGtB6nZD7MQ5uqE30ycfMzgYlVcecAV4YAjRDhw/z0YK4oH9DVV ORIT1J8vdNo4BuITEgGslVED5TI/J+5epuXs3nXFaLGQLJ+5wupnBgKQ+cpxDs+JPgQu VNwSYKtj9oscj7Afq+MkPuO2BwDBuTxRejoDrSIGiBILIswJ3s2nszA2xteot4TciWa+ CKtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f2I7oUW51OM6c652LpojxrAjS/S37aslLbs3+usZvzg=; b=fvbzJGxBeOlSv11RLBExEBbxbXsyudZ3So/zCoLUsvTrK9x8dRugJQNkwo/0/zPWQG CWrC3abpJLUFCfuLzvAulv2cXPEToe+/J0TzZJqCuO/d9pm1De40RQEYySLkitHHuQJ7 4YF9QZQMAOt6hiaSz/UKhmi5GGnAFCvnhDOlRR+arRVlj9+kysMd4AfiO3d4WpiE3yji ILT8xDxZrCWXZCNB4Ex3GBzBCGDp/BchnKUaBrwN+PJeS2eNSRgJ/3GjBPui1bCibDHR RQiPwyGyZFYxGgol8GAtoptN5Kx9GDxSiRWnsERUigjZQGZbuOlqWc+3ozRCdVqwL9wu jddQ== X-Gm-Message-State: AHQUAuZXNlK+zV7BGX/ZqM+3Zkni0gA183DvDAvS1UU8zhTbqJ2a5iOo ahXEvBWDyoLPAesZNnXMYZUzLl41 X-Google-Smtp-Source: AHgI3IbNzB69tx5wcbFu5HXjXHq+lRelkh1owfTSlyNN7CjEZH3YyB9GowjP5NYgQR+oxr8PerNftQ== X-Received: by 2002:a62:b286:: with SMTP id z6mr978033pfl.106.1550070540627; Wed, 13 Feb 2019 07:09:00 -0800 (PST) Received: from ?IPv6:2607:fb90:a695:22c1:409c:1f73:a1ae:a38e? ([2607:fb90:a695:22c1:409c:1f73:a1ae:a38e]) by smtp.gmail.com with ESMTPSA id h8sm19489608pgv.27.2019.02.13.07.08.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 07:08:59 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r344087 - in projects/import-googletest-1.8.1/lib/googletest: gmock/tests gtest/tests From: Enji Cooper X-Mailer: iPhone Mail (16C104) In-Reply-To: <201902131442.x1DEgcsa081703@pdx.rh.CN85.dnsmgr.net> Date: Wed, 13 Feb 2019 07:08:58 -0800 Cc: Enji Cooper , src-committers@freebsd.org, svn-src-projects@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7F4DB347-CD49-4A09-A360-7DBAB33EEBC6@gmail.com> References: <201902131442.x1DEgcsa081703@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-Rspamd-Queue-Id: 2C40E8E40F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.92)[-0.924,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 15:09:03 -0000 On Feb 13, 2019, at 06:42, Rodney W. Grimes = wrote: >> On Feb 13, 2019, at 06:26, Rodney W. Grimes wrote: >>=20 >>>> Author: ngie >>>> Date: Wed Feb 13 05:41:04 2019 >>>> New Revision: 344087 >>>> URL: https://svnweb.freebsd.org/changeset/base/344087 >>>>=20 >>>> Log: >>>> Compile the tests without -Werror for now >>>>=20 >>>> I'm working on resolving the issue upstream on github >>>>=20 >>>> Modified: >>>> projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile >>>> projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile >>>=20 >>> Are we going to have to live with this project name of >>> import-googletest-1.8.1 long term, or is this just a >>> stepping stone? >>=20 >> It?s a short lived project. I didn?t realize in the last year and a >> half that branch names had formalized into something else, especially >> since GUIDELINES.txt doesn?t state a naming convention. >=20 > I do not know that they have formalized in any way. But as long > as it is shorted lived it really does not matter much. >=20 > Please do be careful when choosing a vendor/ directory name > if that is where this is headed, 'import' and '1.8.1' are > probably not wanted there at all, just googletest. brooks reviewed my initial import into vendor to ensure that the naming/stru= cture was correct: ^/vendor/google/googletest/dist -> ^/vendor/google/google= test/1.8.1 (for the release branch, given that the initial import was 1.8.1)= . I=E2=80=99ve been following similar conventions before in the past other pro= jects I=E2=80=99ve imported. Given that this is the first of a handful of go= ogle projects that will be imported, I don=E2=80=99t understand why there=E2= =80=99s an issue with this naming convention. -Enji= From owner-svn-src-projects@freebsd.org Wed Feb 13 15:21:24 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DB9214CE9B2 for ; Wed, 13 Feb 2019 15:21:24 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E6A18F1EE; Wed, 13 Feb 2019 15:21:22 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x1DFLJMW082037; Wed, 13 Feb 2019 07:21:19 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x1DFLJqT082036; Wed, 13 Feb 2019 07:21:19 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201902131521.x1DFLJqT082036@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r344087 - in projects/import-googletest-1.8.1/lib/googletest: gmock/tests gtest/tests In-Reply-To: <7F4DB347-CD49-4A09-A360-7DBAB33EEBC6@gmail.com> To: Enji Cooper Date: Wed, 13 Feb 2019 07:21:19 -0800 (PST) CC: rgrimes@freebsd.org, Enji Cooper , src-committers@freebsd.org, svn-src-projects@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 9E6A18F1EE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 15:21:24 -0000 > On Feb 13, 2019, at 06:42, Rodney W. Grimes wrote: > > >> On Feb 13, 2019, at 06:26, Rodney W. Grimes wrote: > >> > >>>> Author: ngie > >>>> Date: Wed Feb 13 05:41:04 2019 > >>>> New Revision: 344087 > >>>> URL: https://svnweb.freebsd.org/changeset/base/344087 > >>>> > >>>> Log: > >>>> Compile the tests without -Werror for now > >>>> > >>>> I'm working on resolving the issue upstream on github > >>>> > >>>> Modified: > >>>> projects/import-googletest-1.8.1/lib/googletest/gmock/tests/Makefile > >>>> projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile > >>> > >>> Are we going to have to live with this project name of > >>> import-googletest-1.8.1 long term, or is this just a > >>> stepping stone? > >> > >> It?s a short lived project. I didn?t realize in the last year and a > >> half that branch names had formalized into something else, especially > >> since GUIDELINES.txt doesn?t state a naming convention. > > > > I do not know that they have formalized in any way. But as long > > as it is shorted lived it really does not matter much. > > > > Please do be careful when choosing a vendor/ directory name > > if that is where this is headed, 'import' and '1.8.1' are > > probably not wanted there at all, just googletest. > > brooks reviewed my initial import into vendor to ensure that the > naming/structure was correct: ^/vendor/google/googletest/dist -> > ^/vendor/google/googletest/1.8.1 (for the release branch, given > that the initial import was 1.8.1). > > I?ve been following similar conventions before in the past > other projects I?ve imported. Given that this is the first of a > handful of google projects that will be imported, I don?t > understand why there?s an issue with this naming convention. There is no issue here, I did not raise an issue, I just asked if that project was a short term thing, and wanted to make sure that the long name was not copied into the vendor area, which you have not, you have broken the long name up into its components as directories as is the norm. > -Enji -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-projects@freebsd.org Fri Feb 15 21:44:48 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55B8F14EAEFA for ; Fri, 15 Feb 2019 21:44:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0009A87110; Fri, 15 Feb 2019 21:44:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D888A248EB; Fri, 15 Feb 2019 21:44:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1FLilRJ081442; Fri, 15 Feb 2019 21:44:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1FLiggV081419; Fri, 15 Feb 2019 21:44:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902152144.x1FLiggV081419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 15 Feb 2019 21:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r344177 - in projects/clang800-import: contrib/compiler-rt/lib/sanitizer_common contrib/llvm/include/llvm/BinaryFormat contrib/llvm/include/llvm/MC contrib/llvm/lib/Analysis contrib/llv... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang800-import: contrib/compiler-rt/lib/sanitizer_common contrib/llvm/include/llvm/BinaryFormat contrib/llvm/include/llvm/MC contrib/llvm/lib/Analysis contrib/llvm/lib/MC contrib/llvm/lib... X-SVN-Commit-Revision: 344177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0009A87110 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2019 21:44:48 -0000 Author: dim Date: Fri Feb 15 21:44:42 2019 New Revision: 344177 URL: https://svnweb.freebsd.org/changeset/base/344177 Log: Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branch r354130, resolve conflicts, and bump version numbers. Modified: projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h projects/clang800-import/contrib/llvm/include/llvm/BinaryFormat/Wasm.h projects/clang800-import/contrib/llvm/include/llvm/MC/MCSymbolWasm.h projects/clang800-import/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp projects/clang800-import/contrib/llvm/lib/MC/MCExpr.cpp projects/clang800-import/contrib/llvm/lib/MC/MCParser/AsmParser.cpp projects/clang800-import/contrib/llvm/lib/MC/WasmObjectWriter.cpp projects/clang800-import/contrib/llvm/lib/Object/WasmObjectFile.cpp projects/clang800-import/contrib/llvm/lib/Support/Unix/Threading.inc projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td projects/clang800-import/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp projects/clang800-import/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp projects/clang800-import/contrib/llvm/tools/clang/include/clang/Basic/Attr.td projects/clang800-import/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td projects/clang800-import/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def projects/clang800-import/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td projects/clang800-import/contrib/llvm/tools/clang/include/clang/Basic/OpenCLOptions.h projects/clang800-import/contrib/llvm/tools/clang/include/clang/Driver/Options.td projects/clang800-import/contrib/llvm/tools/clang/include/clang/Parse/Parser.h projects/clang800-import/contrib/llvm/tools/clang/include/clang/Sema/Sema.h projects/clang800-import/contrib/llvm/tools/clang/lib/Basic/Targets/PPC.h projects/clang800-import/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Driver/ToolChains/MSVC.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Headers/intrin.h projects/clang800-import/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Parse/ParseStmtAsm.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/Sema.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaCoroutine.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp projects/clang800-import/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h projects/clang800-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp projects/clang800-import/contrib/llvm/tools/lld/COFF/PDB.cpp projects/clang800-import/contrib/llvm/tools/lld/ELF/Driver.cpp projects/clang800-import/contrib/llvm/tools/lld/ELF/ScriptParser.cpp projects/clang800-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst projects/clang800-import/contrib/llvm/tools/lld/docs/index.rst projects/clang800-import/contrib/llvm/tools/lld/docs/missingkeyfunction.rst projects/clang800-import/lib/clang/freebsd_cc_version.h projects/clang800-import/lib/clang/include/clang/Basic/Version.inc projects/clang800-import/lib/clang/include/lld/Common/Version.inc projects/clang800-import/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: projects/clang800-import/contrib/compiler-rt/ (props changed) projects/clang800-import/contrib/libc++/ (props changed) projects/clang800-import/contrib/llvm/ (props changed) projects/clang800-import/contrib/llvm/tools/clang/ (props changed) projects/clang800-import/contrib/llvm/tools/lld/ (props changed) projects/clang800-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc ============================================================================== --- projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc Fri Feb 15 21:44:42 2019 (r344177) @@ -25,7 +25,7 @@ struct ioctl_desc { const char *name; }; -const unsigned ioctl_table_max = 1202; +const unsigned ioctl_table_max = 1200; static ioctl_desc ioctl_table[ioctl_table_max]; static unsigned ioctl_table_size = 0; @@ -298,9 +298,6 @@ static void ioctl_table_fill() { _(IRFRAMETTY_GET_DEVICE, WRITE, sizeof(unsigned int)); _(IRFRAMETTY_GET_DONGLE, WRITE, sizeof(unsigned int)); _(IRFRAMETTY_SET_DONGLE, READ, sizeof(unsigned int)); - /* Entries from file: dev/isa/satlinkio.h */ - _(SATIORESET, NONE, 0); - _(SATIOGID, WRITE, struct_satlink_id_sz); /* Entries from file: dev/isa/isvio.h */ _(ISV_CMD, READWRITE, struct_isv_cmd_sz); /* Entries from file: dev/isa/wtreg.h */ @@ -649,8 +646,8 @@ static void ioctl_table_fill() { _(SPKRTUNE, NONE, 0); _(SPKRGETVOL, WRITE, sizeof(unsigned int)); _(SPKRSETVOL, READ, sizeof(unsigned int)); - /* Entries from file: dev/nvmm/nvmm_ioctl.h */ #if 0 /* WIP */ + /* Entries from file: dev/nvmm/nvmm_ioctl.h */ _(NVMM_IOC_CAPABILITY, WRITE, struct_nvmm_ioc_capability_sz); _(NVMM_IOC_MACHINE_CREATE, READWRITE, struct_nvmm_ioc_machine_create_sz); _(NVMM_IOC_MACHINE_DESTROY, READ, struct_nvmm_ioc_machine_destroy_sz); @@ -659,7 +656,7 @@ static void ioctl_table_fill() { _(NVMM_IOC_VCPU_DESTROY, READ, struct_nvmm_ioc_vcpu_destroy_sz); _(NVMM_IOC_VCPU_SETSTATE, READ, struct_nvmm_ioc_vcpu_setstate_sz); _(NVMM_IOC_VCPU_GETSTATE, READ, struct_nvmm_ioc_vcpu_getstate_sz); - _(NVMM_IOC_VCPU_INJECT, READWRITE, struct_nvmm_ioc_vcpu_inject_sz); + _(NVMM_IOC_VCPU_INJECT, READ, struct_nvmm_ioc_vcpu_inject_sz); _(NVMM_IOC_VCPU_RUN, READWRITE, struct_nvmm_ioc_vcpu_run_sz); _(NVMM_IOC_GPA_MAP, READ, struct_nvmm_ioc_gpa_map_sz); _(NVMM_IOC_GPA_UNMAP, READ, struct_nvmm_ioc_gpa_unmap_sz); Modified: projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc ============================================================================== --- projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Fri Feb 15 21:44:42 2019 (r344177) @@ -122,7 +122,6 @@ #include #include #include -#include #include #include #include @@ -639,7 +638,6 @@ unsigned struct_rf_recon_req_sz = sizeof(rf_recon_req) unsigned struct_rio_conf_sz = sizeof(rio_conf); unsigned struct_rio_interface_sz = sizeof(rio_interface); unsigned struct_rio_stats_sz = sizeof(rio_stats); -unsigned struct_satlink_id_sz = sizeof(satlink_id); unsigned struct_scan_io_sz = sizeof(scan_io); unsigned struct_scbusaccel_args_sz = sizeof(scbusaccel_args); unsigned struct_scbusiodetach_args_sz = sizeof(scbusiodetach_args); @@ -1105,9 +1103,6 @@ unsigned IOCTL_IRDA_GET_TURNAROUNDMASK = IRDA_GET_TURN unsigned IOCTL_IRFRAMETTY_GET_DEVICE = IRFRAMETTY_GET_DEVICE; unsigned IOCTL_IRFRAMETTY_GET_DONGLE = IRFRAMETTY_GET_DONGLE; unsigned IOCTL_IRFRAMETTY_SET_DONGLE = IRFRAMETTY_SET_DONGLE; -unsigned IOCTL_SATIORESET = SATIORESET; -unsigned IOCTL_SATIOGID = SATIOGID; -unsigned IOCTL_SATIOSBUFSIZE = SATIOSBUFSIZE; unsigned IOCTL_ISV_CMD = ISV_CMD; unsigned IOCTL_WTQICMD = WTQICMD; unsigned IOCTL_ISCSI_GET_VERSION = ISCSI_GET_VERSION; Modified: projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h ============================================================================== --- projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h Fri Feb 15 21:44:42 2019 (r344177) @@ -803,7 +803,6 @@ extern unsigned struct_rf_recon_req_sz; extern unsigned struct_rio_conf_sz; extern unsigned struct_rio_interface_sz; extern unsigned struct_rio_stats_sz; -extern unsigned struct_satlink_id_sz; extern unsigned struct_scan_io_sz; extern unsigned struct_scbusaccel_args_sz; extern unsigned struct_scbusiodetach_args_sz; @@ -1266,9 +1265,6 @@ extern unsigned IOCTL_IRDA_GET_TURNAROUNDMASK; extern unsigned IOCTL_IRFRAMETTY_GET_DEVICE; extern unsigned IOCTL_IRFRAMETTY_GET_DONGLE; extern unsigned IOCTL_IRFRAMETTY_SET_DONGLE; -extern unsigned IOCTL_SATIORESET; -extern unsigned IOCTL_SATIOGID; -extern unsigned IOCTL_SATIOSBUFSIZE; extern unsigned IOCTL_ISV_CMD; extern unsigned IOCTL_WTQICMD; extern unsigned IOCTL_ISCSI_GET_VERSION; Modified: projects/clang800-import/contrib/llvm/include/llvm/BinaryFormat/Wasm.h ============================================================================== --- projects/clang800-import/contrib/llvm/include/llvm/BinaryFormat/Wasm.h Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/include/llvm/BinaryFormat/Wasm.h Fri Feb 15 21:44:42 2019 (r344177) @@ -165,7 +165,8 @@ struct WasmSymbolInfo { StringRef Name; uint8_t Kind; uint32_t Flags; - StringRef Module; // For undefined symbols the module name of the import + StringRef ImportModule; // For undefined symbols the module of the import + StringRef ImportName; // For undefined symbols the name of the import union { // For function or global symbols, the index in function or global index // space. @@ -284,6 +285,7 @@ const unsigned WASM_SYMBOL_BINDING_LOCAL = 0x2; const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT = 0x0; const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4; const unsigned WASM_SYMBOL_UNDEFINED = 0x10; +const unsigned WASM_SYMBOL_EXPLICIT_NAME = 0x40; #define WASM_RELOC(name, value) name = value, Modified: projects/clang800-import/contrib/llvm/include/llvm/MC/MCSymbolWasm.h ============================================================================== --- projects/clang800-import/contrib/llvm/include/llvm/MC/MCSymbolWasm.h Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/include/llvm/MC/MCSymbolWasm.h Fri Feb 15 21:44:42 2019 (r344177) @@ -19,7 +19,8 @@ class MCSymbolWasm : public MCSymbol { bool IsWeak = false; bool IsHidden = false; bool IsComdat = false; - std::string ModuleName; + Optional ImportModule; + Optional ImportName; wasm::WasmSignature *Signature = nullptr; Optional GlobalType; Optional EventType; @@ -32,7 +33,7 @@ class MCSymbolWasm : public MCSymbol { // Use a module name of "env" for now, for compatibility with existing tools. // This is temporary, and may change, as the ABI is not yet stable. MCSymbolWasm(const StringMapEntry *Name, bool isTemporary) - : MCSymbol(SymbolKindWasm, Name, isTemporary), ModuleName("env") {} + : MCSymbol(SymbolKindWasm, Name, isTemporary) {} static bool classof(const MCSymbol *S) { return S->isWasm(); } const MCExpr *getSize() const { return SymbolSize; } @@ -55,8 +56,21 @@ class MCSymbolWasm : public MCSymbol { bool isComdat() const { return IsComdat; } void setComdat(bool isComdat) { IsComdat = isComdat; } - const StringRef getModuleName() const { return ModuleName; } - void setModuleName(StringRef Name) { ModuleName = Name; } + const StringRef getImportModule() const { + if (ImportModule.hasValue()) { + return ImportModule.getValue(); + } + return "env"; + } + void setImportModule(StringRef Name) { ImportModule = Name; } + + const StringRef getImportName() const { + if (ImportName.hasValue()) { + return ImportName.getValue(); + } + return getName(); + } + void setImportName(StringRef Name) { ImportName = Name; } const wasm::WasmSignature *getSignature() const { return Signature; } void setSignature(wasm::WasmSignature *Sig) { Signature = Sig; } Modified: projects/clang800-import/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -161,25 +161,66 @@ static void initialize(TargetLibraryInfoImpl &TLI, con } if (T.isOSWindows() && !T.isOSCygMing()) { - // Win32 does not support long double + // XXX: The earliest documentation available at the moment is for VS2015/VC19: + // https://docs.microsoft.com/en-us/cpp/c-runtime-library/floating-point-support?view=vs-2015 + // XXX: In order to use an MSVCRT older than VC19, + // the specific library version must be explicit in the target triple, + // e.g., x86_64-pc-windows-msvc18. + bool hasPartialC99 = true; + if (T.isKnownWindowsMSVCEnvironment()) { + unsigned Major, Minor, Micro; + T.getEnvironmentVersion(Major, Minor, Micro); + hasPartialC99 = (Major == 0 || Major >= 19); + } + + // Latest targets support C89 math functions, in part. + bool isARM = (T.getArch() == Triple::aarch64 || + T.getArch() == Triple::arm); + bool hasPartialFloat = (isARM || + T.getArch() == Triple::x86_64); + + // Win32 does not support float C89 math functions, in general. + if (!hasPartialFloat) { + TLI.setUnavailable(LibFunc_acosf); + TLI.setUnavailable(LibFunc_asinf); + TLI.setUnavailable(LibFunc_atan2f); + TLI.setUnavailable(LibFunc_atanf); + TLI.setUnavailable(LibFunc_ceilf); + TLI.setUnavailable(LibFunc_cosf); + TLI.setUnavailable(LibFunc_coshf); + TLI.setUnavailable(LibFunc_expf); + TLI.setUnavailable(LibFunc_floorf); + TLI.setUnavailable(LibFunc_fmodf); + TLI.setUnavailable(LibFunc_log10f); + TLI.setUnavailable(LibFunc_logf); + TLI.setUnavailable(LibFunc_modff); + TLI.setUnavailable(LibFunc_powf); + TLI.setUnavailable(LibFunc_sinf); + TLI.setUnavailable(LibFunc_sinhf); + TLI.setUnavailable(LibFunc_sqrtf); + TLI.setUnavailable(LibFunc_tanf); + TLI.setUnavailable(LibFunc_tanhf); + } + if (!isARM) + TLI.setUnavailable(LibFunc_fabsf); + TLI.setUnavailable(LibFunc_frexpf); + TLI.setUnavailable(LibFunc_ldexpf); + + // Win32 does not support long double C89 math functions. TLI.setUnavailable(LibFunc_acosl); TLI.setUnavailable(LibFunc_asinl); - TLI.setUnavailable(LibFunc_atanl); TLI.setUnavailable(LibFunc_atan2l); + TLI.setUnavailable(LibFunc_atanl); TLI.setUnavailable(LibFunc_ceill); - TLI.setUnavailable(LibFunc_copysignl); TLI.setUnavailable(LibFunc_cosl); TLI.setUnavailable(LibFunc_coshl); TLI.setUnavailable(LibFunc_expl); - TLI.setUnavailable(LibFunc_fabsf); // Win32 and Win64 both lack fabsf TLI.setUnavailable(LibFunc_fabsl); TLI.setUnavailable(LibFunc_floorl); - TLI.setUnavailable(LibFunc_fmaxl); - TLI.setUnavailable(LibFunc_fminl); TLI.setUnavailable(LibFunc_fmodl); TLI.setUnavailable(LibFunc_frexpl); - TLI.setUnavailable(LibFunc_ldexpf); TLI.setUnavailable(LibFunc_ldexpl); + TLI.setUnavailable(LibFunc_log10l); TLI.setUnavailable(LibFunc_logl); TLI.setUnavailable(LibFunc_modfl); TLI.setUnavailable(LibFunc_powl); @@ -189,81 +230,66 @@ static void initialize(TargetLibraryInfoImpl &TLI, con TLI.setUnavailable(LibFunc_tanl); TLI.setUnavailable(LibFunc_tanhl); - // Win32 only has C89 math - TLI.setUnavailable(LibFunc_acosh); - TLI.setUnavailable(LibFunc_acoshf); + // Win32 does not fully support C99 math functions. + if (!hasPartialC99) { + TLI.setUnavailable(LibFunc_acosh); + TLI.setUnavailable(LibFunc_acoshf); + TLI.setUnavailable(LibFunc_asinh); + TLI.setUnavailable(LibFunc_asinhf); + TLI.setUnavailable(LibFunc_atanh); + TLI.setUnavailable(LibFunc_atanhf); + TLI.setAvailableWithName(LibFunc_cabs, "_cabs"); + TLI.setUnavailable(LibFunc_cabsf); + TLI.setUnavailable(LibFunc_cbrt); + TLI.setUnavailable(LibFunc_cbrtf); + TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); + TLI.setAvailableWithName(LibFunc_copysignf, "_copysignf"); + TLI.setUnavailable(LibFunc_exp2); + TLI.setUnavailable(LibFunc_exp2f); + TLI.setUnavailable(LibFunc_expm1); + TLI.setUnavailable(LibFunc_expm1f); + TLI.setUnavailable(LibFunc_fmax); + TLI.setUnavailable(LibFunc_fmaxf); + TLI.setUnavailable(LibFunc_fmin); + TLI.setUnavailable(LibFunc_fminf); + TLI.setUnavailable(LibFunc_log1p); + TLI.setUnavailable(LibFunc_log1pf); + TLI.setUnavailable(LibFunc_log2); + TLI.setUnavailable(LibFunc_log2f); + TLI.setAvailableWithName(LibFunc_logb, "_logb"); + if (hasPartialFloat) + TLI.setAvailableWithName(LibFunc_logbf, "_logbf"); + else + TLI.setUnavailable(LibFunc_logbf); + TLI.setUnavailable(LibFunc_rint); + TLI.setUnavailable(LibFunc_rintf); + TLI.setUnavailable(LibFunc_round); + TLI.setUnavailable(LibFunc_roundf); + TLI.setUnavailable(LibFunc_trunc); + TLI.setUnavailable(LibFunc_truncf); + } + + // Win32 does not support long double C99 math functions. TLI.setUnavailable(LibFunc_acoshl); - TLI.setUnavailable(LibFunc_asinh); - TLI.setUnavailable(LibFunc_asinhf); TLI.setUnavailable(LibFunc_asinhl); - TLI.setUnavailable(LibFunc_atanh); - TLI.setUnavailable(LibFunc_atanhf); TLI.setUnavailable(LibFunc_atanhl); - TLI.setUnavailable(LibFunc_cabs); - TLI.setUnavailable(LibFunc_cabsf); TLI.setUnavailable(LibFunc_cabsl); - TLI.setUnavailable(LibFunc_cbrt); - TLI.setUnavailable(LibFunc_cbrtf); TLI.setUnavailable(LibFunc_cbrtl); - TLI.setUnavailable(LibFunc_exp2); - TLI.setUnavailable(LibFunc_exp2f); + TLI.setUnavailable(LibFunc_copysignl); TLI.setUnavailable(LibFunc_exp2l); - TLI.setUnavailable(LibFunc_expm1); - TLI.setUnavailable(LibFunc_expm1f); TLI.setUnavailable(LibFunc_expm1l); - TLI.setUnavailable(LibFunc_log2); - TLI.setUnavailable(LibFunc_log2f); - TLI.setUnavailable(LibFunc_log2l); - TLI.setUnavailable(LibFunc_log1p); - TLI.setUnavailable(LibFunc_log1pf); + TLI.setUnavailable(LibFunc_fmaxl); + TLI.setUnavailable(LibFunc_fminl); TLI.setUnavailable(LibFunc_log1pl); - TLI.setUnavailable(LibFunc_logb); - TLI.setUnavailable(LibFunc_logbf); + TLI.setUnavailable(LibFunc_log2l); TLI.setUnavailable(LibFunc_logbl); - TLI.setUnavailable(LibFunc_nearbyint); - TLI.setUnavailable(LibFunc_nearbyintf); TLI.setUnavailable(LibFunc_nearbyintl); - TLI.setUnavailable(LibFunc_rint); - TLI.setUnavailable(LibFunc_rintf); TLI.setUnavailable(LibFunc_rintl); - TLI.setUnavailable(LibFunc_round); - TLI.setUnavailable(LibFunc_roundf); TLI.setUnavailable(LibFunc_roundl); - TLI.setUnavailable(LibFunc_trunc); - TLI.setUnavailable(LibFunc_truncf); TLI.setUnavailable(LibFunc_truncl); - // Win32 provides some C99 math with mangled names - TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); - - if (T.getArch() == Triple::x86) { - // Win32 on x86 implements single-precision math functions as macros - TLI.setUnavailable(LibFunc_acosf); - TLI.setUnavailable(LibFunc_asinf); - TLI.setUnavailable(LibFunc_atanf); - TLI.setUnavailable(LibFunc_atan2f); - TLI.setUnavailable(LibFunc_ceilf); - TLI.setUnavailable(LibFunc_copysignf); - TLI.setUnavailable(LibFunc_cosf); - TLI.setUnavailable(LibFunc_coshf); - TLI.setUnavailable(LibFunc_expf); - TLI.setUnavailable(LibFunc_floorf); - TLI.setUnavailable(LibFunc_fminf); - TLI.setUnavailable(LibFunc_fmaxf); - TLI.setUnavailable(LibFunc_fmodf); - TLI.setUnavailable(LibFunc_logf); - TLI.setUnavailable(LibFunc_log10f); - TLI.setUnavailable(LibFunc_modff); - TLI.setUnavailable(LibFunc_powf); - TLI.setUnavailable(LibFunc_sinf); - TLI.setUnavailable(LibFunc_sinhf); - TLI.setUnavailable(LibFunc_sqrtf); - TLI.setUnavailable(LibFunc_tanf); - TLI.setUnavailable(LibFunc_tanhf); - } - - // Win32 does *not* provide these functions, but they are - // generally available on POSIX-compliant systems: + // Win32 does not support these functions, but + // they are generally available on POSIX-compliant systems. TLI.setUnavailable(LibFunc_access); TLI.setUnavailable(LibFunc_bcmp); TLI.setUnavailable(LibFunc_bcopy); @@ -318,12 +344,6 @@ static void initialize(TargetLibraryInfoImpl &TLI, con TLI.setUnavailable(LibFunc_utime); TLI.setUnavailable(LibFunc_utimes); TLI.setUnavailable(LibFunc_write); - - // Win32 does *not* provide provide these functions, but they are - // specified by C99: - TLI.setUnavailable(LibFunc_atoll); - TLI.setUnavailable(LibFunc_frexpf); - TLI.setUnavailable(LibFunc_llabs); } switch (T.getOS()) { Modified: projects/clang800-import/contrib/llvm/lib/MC/MCExpr.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/MC/MCExpr.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/MC/MCExpr.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -559,6 +559,11 @@ static void AttemptToFoldSymbolOffsetDifference( if (Asm->isThumbFunc(&SA)) Addend |= 1; + // If symbol is labeled as micromips, we set low-bit to ensure + // correct offset in .gcc_except_table + if (Asm->getBackend().isMicroMips(&SA)) + Addend |= 1; + // Clear the symbol expr pointers to indicate we have folded these // operands. A = B = nullptr; Modified: projects/clang800-import/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -3364,10 +3364,11 @@ bool AsmParser::parseDirectiveFile(SMLoc DirectiveLoc) } if (FileNumber == -1) { - if (!getContext().getAsmInfo()->hasSingleParameterDotFile()) - return Error(DirectiveLoc, - "target does not support '.file' without a number"); - getStreamer().EmitFileDirective(Filename); + // Ignore the directive if there is no number and the target doesn't support + // numberless .file directives. This allows some portability of assembler + // between different object file formats. + if (getContext().getAsmInfo()->hasSingleParameterDotFile()) + getStreamer().EmitFileDirective(Filename); } else { // In case there is a -g option as well as debug info from directive .file, // we turn off the -g option, directly use the existing debug info instead. Modified: projects/clang800-import/contrib/llvm/lib/MC/WasmObjectWriter.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/MC/WasmObjectWriter.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/MC/WasmObjectWriter.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -982,7 +982,8 @@ void WasmObjectWriter::writeLinkingMetaDataSection( case wasm::WASM_SYMBOL_TYPE_GLOBAL: case wasm::WASM_SYMBOL_TYPE_EVENT: encodeULEB128(Sym.ElementIndex, W.OS); - if ((Sym.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0) + if ((Sym.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0 || + (Sym.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) writeString(Sym.Name); break; case wasm::WASM_SYMBOL_TYPE_DATA: @@ -1162,8 +1163,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As MCSymbolWasm *MemorySym = cast(Ctx.getOrCreateSymbol("__linear_memory")); wasm::WasmImport MemImport; - MemImport.Module = MemorySym->getModuleName(); - MemImport.Field = MemorySym->getName(); + MemImport.Module = MemorySym->getImportModule(); + MemImport.Field = MemorySym->getImportName(); MemImport.Kind = wasm::WASM_EXTERNAL_MEMORY; Imports.push_back(MemImport); @@ -1173,8 +1174,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As MCSymbolWasm *TableSym = cast(Ctx.getOrCreateSymbol("__indirect_function_table")); wasm::WasmImport TableImport; - TableImport.Module = TableSym->getModuleName(); - TableImport.Field = TableSym->getName(); + TableImport.Module = TableSym->getImportModule(); + TableImport.Field = TableSym->getImportName(); TableImport.Kind = wasm::WASM_EXTERNAL_TABLE; TableImport.Table.ElemType = wasm::WASM_TYPE_FUNCREF; Imports.push_back(TableImport); @@ -1200,8 +1201,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As if (!WS.isDefined() && !WS.isComdat()) { if (WS.isFunction()) { wasm::WasmImport Import; - Import.Module = WS.getModuleName(); - Import.Field = WS.getName(); + Import.Module = WS.getImportModule(); + Import.Field = WS.getImportName(); Import.Kind = wasm::WASM_EXTERNAL_FUNCTION; Import.SigIndex = getFunctionType(WS); Imports.push_back(Import); @@ -1211,8 +1212,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As report_fatal_error("undefined global symbol cannot be weak"); wasm::WasmImport Import; - Import.Module = WS.getModuleName(); - Import.Field = WS.getName(); + Import.Module = WS.getImportModule(); + Import.Field = WS.getImportName(); Import.Kind = wasm::WASM_EXTERNAL_GLOBAL; Import.Global = WS.getGlobalType(); Imports.push_back(Import); @@ -1222,8 +1223,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As report_fatal_error("undefined event symbol cannot be weak"); wasm::WasmImport Import; - Import.Module = WS.getModuleName(); - Import.Field = WS.getName(); + Import.Module = WS.getImportModule(); + Import.Field = WS.getImportName(); Import.Kind = wasm::WASM_EXTERNAL_EVENT; Import.Event.Attribute = wasm::WASM_EVENT_ATTRIBUTE_EXCEPTION; Import.Event.SigIndex = getEventType(WS); @@ -1448,6 +1449,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As Flags |= wasm::WASM_SYMBOL_BINDING_LOCAL; if (WS.isUndefined()) Flags |= wasm::WASM_SYMBOL_UNDEFINED; + if (WS.getName() != WS.getImportName()) + Flags |= wasm::WASM_SYMBOL_EXPLICIT_NAME; wasm::WasmSymbolInfo Info; Info.Name = WS.getName(); Modified: projects/clang800-import/contrib/llvm/lib/Object/WasmObjectFile.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Object/WasmObjectFile.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Object/WasmObjectFile.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -505,9 +505,13 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadCo Function.SymbolName = Info.Name; } else { wasm::WasmImport &Import = *ImportedFunctions[Info.ElementIndex]; + if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) + Info.Name = readString(Ctx); + else + Info.Name = Import.Field; Signature = &Signatures[Import.SigIndex]; - Info.Name = Import.Field; - Info.Module = Import.Module; + Info.ImportName = Import.Field; + Info.ImportModule = Import.Module; } break; @@ -530,8 +534,13 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadCo Global.SymbolName = Info.Name; } else { wasm::WasmImport &Import = *ImportedGlobals[Info.ElementIndex]; - Info.Name = Import.Field; + if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) + Info.Name = readString(Ctx); + else + Info.Name = Import.Field; GlobalType = &Import.Global; + Info.ImportName = Import.Field; + Info.ImportModule = Import.Module; } break; @@ -585,9 +594,14 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadCo } else { wasm::WasmImport &Import = *ImportedEvents[Info.ElementIndex]; + if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) + Info.Name = readString(Ctx); + else + Info.Name = Import.Field; EventType = &Import.Event; Signature = &Signatures[EventType->SigIndex]; - Info.Name = Import.Field; + Info.ImportName = Import.Field; + Info.ImportModule = Import.Module; } break; } Modified: projects/clang800-import/contrib/llvm/lib/Support/Unix/Threading.inc ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Support/Unix/Threading.inc Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Support/Unix/Threading.inc Fri Feb 15 21:44:42 2019 (r344177) @@ -203,6 +203,12 @@ void llvm::get_thread_name(SmallVectorImpl &Name ::pthread_getname_np(::pthread_self(), buf, len); Name.append(buf, buf + strlen(buf)); +#elif defined(__OpenBSD__) + constexpr uint32_t len = get_max_thread_name_length_impl(); + char buf[len]; + ::pthread_get_name_np(::pthread_self(), buf, len); + + Name.append(buf, buf + strlen(buf)); #elif defined(__linux__) #if HAVE_PTHREAD_GETNAME_NP constexpr uint32_t len = get_max_thread_name_length_impl(); Modified: projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -2292,6 +2292,31 @@ void AArch64InstrInfo::copyPhysRegTuple(MachineBasicBl } } +void AArch64InstrInfo::copyGPRRegTuple(MachineBasicBlock &MBB, + MachineBasicBlock::iterator I, + DebugLoc DL, unsigned DestReg, + unsigned SrcReg, bool KillSrc, + unsigned Opcode, unsigned ZeroReg, + llvm::ArrayRef Indices) const { + const TargetRegisterInfo *TRI = &getRegisterInfo(); + unsigned NumRegs = Indices.size(); + +#ifndef NDEBUG + uint16_t DestEncoding = TRI->getEncodingValue(DestReg); + uint16_t SrcEncoding = TRI->getEncodingValue(SrcReg); + assert(DestEncoding % NumRegs == 0 && SrcEncoding % NumRegs == 0 && + "GPR reg sequences should not be able to overlap"); +#endif + + for (unsigned SubReg = 0; SubReg != NumRegs; ++SubReg) { + const MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(Opcode)); + AddSubReg(MIB, DestReg, Indices[SubReg], RegState::Define, TRI); + MIB.addReg(ZeroReg); + AddSubReg(MIB, SrcReg, Indices[SubReg], getKillRegState(KillSrc), TRI); + MIB.addImm(0); + } +} + void AArch64InstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, unsigned DestReg, @@ -2428,6 +2453,22 @@ void AArch64InstrInfo::copyPhysReg(MachineBasicBlock & static const unsigned Indices[] = {AArch64::qsub0, AArch64::qsub1}; copyPhysRegTuple(MBB, I, DL, DestReg, SrcReg, KillSrc, AArch64::ORRv16i8, Indices); + return; + } + + if (AArch64::XSeqPairsClassRegClass.contains(DestReg) && + AArch64::XSeqPairsClassRegClass.contains(SrcReg)) { + static const unsigned Indices[] = {AArch64::sube64, AArch64::subo64}; + copyGPRRegTuple(MBB, I, DL, DestReg, SrcReg, KillSrc, AArch64::ORRXrs, + AArch64::XZR, Indices); + return; + } + + if (AArch64::WSeqPairsClassRegClass.contains(DestReg) && + AArch64::WSeqPairsClassRegClass.contains(SrcReg)) { + static const unsigned Indices[] = {AArch64::sube32, AArch64::subo32}; + copyGPRRegTuple(MBB, I, DL, DestReg, SrcReg, KillSrc, AArch64::ORRWrs, + AArch64::WZR, Indices); return; } Modified: projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h Fri Feb 15 21:44:42 2019 (r344177) @@ -122,6 +122,10 @@ class AArch64InstrInfo final : public AArch64GenInstrI const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc, unsigned Opcode, llvm::ArrayRef Indices) const; + void copyGPRRegTuple(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, + DebugLoc DL, unsigned DestReg, unsigned SrcReg, + bool KillSrc, unsigned Opcode, unsigned ZeroReg, + llvm::ArrayRef Indices) const; void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override; Modified: projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td Fri Feb 15 21:44:42 2019 (r344177) @@ -649,10 +649,12 @@ def FPR128Op : RegisterOperand // ARMv8.1a atomic CASP register operands -def WSeqPairs : RegisterTuples<[sube32, subo32], - [(rotl GPR32, 0), (rotl GPR32, 1)]>; -def XSeqPairs : RegisterTuples<[sube64, subo64], - [(rotl GPR64, 0), (rotl GPR64, 1)]>; +def WSeqPairs : RegisterTuples<[sube32, subo32], + [(decimate (rotl GPR32, 0), 2), + (decimate (rotl GPR32, 1), 2)]>; +def XSeqPairs : RegisterTuples<[sube64, subo64], + [(decimate (rotl GPR64, 0), 2), + (decimate (rotl GPR64, 1), 2)]>; def WSeqPairsClass : RegisterClass<"AArch64", [untyped], 32, (add WSeqPairs)>{ Modified: projects/clang800-import/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -1779,8 +1779,8 @@ static DecodeStatus DecodeGPRSeqPairsClassRegisterClas if (RegNo & 0x1) return Fail; - unsigned Register = AArch64MCRegisterClasses[RegClassID].getRegister(RegNo); - Inst.addOperand(MCOperand::createReg(Register)); + unsigned Reg = AArch64MCRegisterClasses[RegClassID].getRegister(RegNo / 2); + Inst.addOperand(MCOperand::createReg(Reg)); return Success; } Modified: projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -5618,55 +5618,96 @@ SDValue SystemZTargetLowering::combineBSWAP( static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code // set by the CCReg instruction using the CCValid / CCMask masks, - // If the CCReg instruction is itself a (ICMP (SELECT_CCMASK)) testing - // the condition code set by some other instruction, see whether we - // can directly use that condition code. - bool Invert = false; + // If the CCReg instruction is itself a ICMP testing the condition + // code set by some other instruction, see whether we can directly + // use that condition code. - // Verify that we have an appropriate mask for a EQ or NE comparison. + // Verify that we have an ICMP against some constant. if (CCValid != SystemZ::CCMASK_ICMP) return false; - if (CCMask == SystemZ::CCMASK_CMP_NE) - Invert = !Invert; - else if (CCMask != SystemZ::CCMASK_CMP_EQ) - return false; - - // Verify that we have an ICMP that is the user of a SELECT_CCMASK. - SDNode *ICmp = CCReg.getNode(); + auto *ICmp = CCReg.getNode(); if (ICmp->getOpcode() != SystemZISD::ICMP) return false; - SDNode *Select = ICmp->getOperand(0).getNode(); - if (Select->getOpcode() != SystemZISD::SELECT_CCMASK) + auto *CompareLHS = ICmp->getOperand(0).getNode(); + auto *CompareRHS = dyn_cast(ICmp->getOperand(1)); + if (!CompareRHS) return false; - // Verify that the ICMP compares against one of select values. - auto *CompareVal = dyn_cast(ICmp->getOperand(1)); - if (!CompareVal) - return false; - auto *TrueVal = dyn_cast(Select->getOperand(0)); - if (!TrueVal) - return false; - auto *FalseVal = dyn_cast(Select->getOperand(1)); - if (!FalseVal) - return false; - if (CompareVal->getZExtValue() == FalseVal->getZExtValue()) - Invert = !Invert; - else if (CompareVal->getZExtValue() != TrueVal->getZExtValue()) - return false; + // Optimize the case where CompareLHS is a SELECT_CCMASK. + if (CompareLHS->getOpcode() == SystemZISD::SELECT_CCMASK) { + // Verify that we have an appropriate mask for a EQ or NE comparison. + bool Invert = false; + if (CCMask == SystemZ::CCMASK_CMP_NE) + Invert = !Invert; + else if (CCMask != SystemZ::CCMASK_CMP_EQ) + return false; - // Compute the effective CC mask for the new branch or select. - auto *NewCCValid = dyn_cast(Select->getOperand(2)); - auto *NewCCMask = dyn_cast(Select->getOperand(3)); - if (!NewCCValid || !NewCCMask) - return false; - CCValid = NewCCValid->getZExtValue(); - CCMask = NewCCMask->getZExtValue(); - if (Invert) - CCMask ^= CCValid; + // Verify that the ICMP compares against one of select values. + auto *TrueVal = dyn_cast(CompareLHS->getOperand(0)); + if (!TrueVal) + return false; + auto *FalseVal = dyn_cast(CompareLHS->getOperand(1)); + if (!FalseVal) + return false; + if (CompareRHS->getZExtValue() == FalseVal->getZExtValue()) + Invert = !Invert; + else if (CompareRHS->getZExtValue() != TrueVal->getZExtValue()) + return false; - // Return the updated CCReg link. - CCReg = Select->getOperand(4); - return true; + // Compute the effective CC mask for the new branch or select. + auto *NewCCValid = dyn_cast(CompareLHS->getOperand(2)); + auto *NewCCMask = dyn_cast(CompareLHS->getOperand(3)); + if (!NewCCValid || !NewCCMask) + return false; + CCValid = NewCCValid->getZExtValue(); + CCMask = NewCCMask->getZExtValue(); + if (Invert) + CCMask ^= CCValid; + + // Return the updated CCReg link. + CCReg = CompareLHS->getOperand(4); + return true; + } + + // Optimize the case where CompareRHS is (SRA (SHL (IPM))). + if (CompareLHS->getOpcode() == ISD::SRA) { + auto *SRACount = dyn_cast(CompareLHS->getOperand(1)); + if (!SRACount || SRACount->getZExtValue() != 30) + return false; + auto *SHL = CompareLHS->getOperand(0).getNode(); + if (SHL->getOpcode() != ISD::SHL) + return false; + auto *SHLCount = dyn_cast(SHL->getOperand(1)); + if (!SHLCount || SHLCount->getZExtValue() != 30 - SystemZ::IPM_CC) + return false; + auto *IPM = SHL->getOperand(0).getNode(); + if (IPM->getOpcode() != SystemZISD::IPM) + return false; + + // Avoid introducing CC spills (because SRA would clobber CC). + if (!CompareLHS->hasOneUse()) + return false; + // Verify that the ICMP compares against zero. + if (CompareRHS->getZExtValue() != 0) + return false; + + // Compute the effective CC mask for the new branch or select. + switch (CCMask) { + case SystemZ::CCMASK_CMP_EQ: break; + case SystemZ::CCMASK_CMP_NE: break; + case SystemZ::CCMASK_CMP_LT: CCMask = SystemZ::CCMASK_CMP_GT; break; + case SystemZ::CCMASK_CMP_GT: CCMask = SystemZ::CCMASK_CMP_LT; break; + case SystemZ::CCMASK_CMP_LE: CCMask = SystemZ::CCMASK_CMP_GE; break; + case SystemZ::CCMASK_CMP_GE: CCMask = SystemZ::CCMASK_CMP_LE; break; + default: return false; + } + + // Return the updated CCReg link. + CCReg = IPM->getOperand(0); + return true; + } + + return false; } SDValue SystemZTargetLowering::combineBR_CCMASK( Modified: projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -557,80 +557,6 @@ bool SystemZInstrInfo::analyzeCompare(const MachineIns return false; } -// If Reg is a virtual register, return its definition, otherwise return null. -static MachineInstr *getDef(unsigned Reg, - const MachineRegisterInfo *MRI) { - if (TargetRegisterInfo::isPhysicalRegister(Reg)) - return nullptr; - return MRI->getUniqueVRegDef(Reg); -} - -// Return true if MI is a shift of type Opcode by Imm bits. -static bool isShift(MachineInstr *MI, unsigned Opcode, int64_t Imm) { - return (MI->getOpcode() == Opcode && - !MI->getOperand(2).getReg() && - MI->getOperand(3).getImm() == Imm); -} - -// If the destination of MI has no uses, delete it as dead. -static void eraseIfDead(MachineInstr *MI, const MachineRegisterInfo *MRI) { - if (MRI->use_nodbg_empty(MI->getOperand(0).getReg())) - MI->eraseFromParent(); -} - -// Compare compares SrcReg against zero. Check whether SrcReg contains -// the result of an IPM sequence whose input CC survives until Compare, -// and whether Compare is therefore redundant. Delete it and return -// true if so. -static bool removeIPMBasedCompare(MachineInstr &Compare, unsigned SrcReg, - const MachineRegisterInfo *MRI, - const TargetRegisterInfo *TRI) { - MachineInstr *LGFR = nullptr; - MachineInstr *RLL = getDef(SrcReg, MRI); - if (RLL && RLL->getOpcode() == SystemZ::LGFR) { - LGFR = RLL; - RLL = getDef(LGFR->getOperand(1).getReg(), MRI); - } - if (!RLL || !isShift(RLL, SystemZ::RLL, 31)) - return false; - - MachineInstr *SRL = getDef(RLL->getOperand(1).getReg(), MRI); - if (!SRL || !isShift(SRL, SystemZ::SRL, SystemZ::IPM_CC)) - return false; - - MachineInstr *IPM = getDef(SRL->getOperand(1).getReg(), MRI); - if (!IPM || IPM->getOpcode() != SystemZ::IPM) - return false; - - // Check that there are no assignments to CC between the IPM and Compare, - if (IPM->getParent() != Compare.getParent()) - return false; - MachineBasicBlock::iterator MBBI = IPM, MBBE = Compare.getIterator(); - for (++MBBI; MBBI != MBBE; ++MBBI) { - MachineInstr &MI = *MBBI; - if (MI.modifiesRegister(SystemZ::CC, TRI)) - return false; - } - - Compare.eraseFromParent(); - if (LGFR) - eraseIfDead(LGFR, MRI); - eraseIfDead(RLL, MRI); - eraseIfDead(SRL, MRI); - eraseIfDead(IPM, MRI); - - return true; -} - -bool SystemZInstrInfo::optimizeCompareInstr( - MachineInstr &Compare, unsigned SrcReg, unsigned SrcReg2, int Mask, - int Value, const MachineRegisterInfo *MRI) const { - assert(!SrcReg2 && "Only optimizing constant comparisons so far"); - bool IsLogical = (Compare.getDesc().TSFlags & SystemZII::IsLogical) != 0; - return Value == 0 && !IsLogical && - removeIPMBasedCompare(Compare, SrcReg, MRI, &RI); -} - bool SystemZInstrInfo::canInsertSelect(const MachineBasicBlock &MBB, ArrayRef Pred, unsigned TrueReg, unsigned FalseReg, Modified: projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h Fri Feb 15 21:44:42 2019 (r344177) @@ -208,9 +208,6 @@ class SystemZInstrInfo : public SystemZGenInstrInfo { int *BytesAdded = nullptr) const override; bool analyzeCompare(const MachineInstr &MI, unsigned &SrcReg, unsigned &SrcReg2, int &Mask, int &Value) const override; - bool optimizeCompareInstr(MachineInstr &CmpInstr, unsigned SrcReg, - unsigned SrcReg2, int Mask, int Value, - const MachineRegisterInfo *MRI) const override; bool canInsertSelect(const MachineBasicBlock&, ArrayRef Cond, unsigned, unsigned, int&, int&, int&) const override; void insertSelect(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, Modified: projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -164,17 +164,17 @@ static SDValue emitCLC(SelectionDAG &DAG, const SDLoc } // Convert the current CC value into an integer that is 0 if CC == 0, -// less than zero if CC == 1 and greater than zero if CC >= 2. +// greater than zero if CC == 1 and less than zero if CC >= 2. // The sequence starts with IPM, which puts CC into bits 29 and 28 // of an integer and clears bits 30 and 31. static SDValue addIPMSequence(const SDLoc &DL, SDValue CCReg, SelectionDAG &DAG) { SDValue IPM = DAG.getNode(SystemZISD::IPM, DL, MVT::i32, CCReg); - SDValue SRL = DAG.getNode(ISD::SRL, DL, MVT::i32, IPM, - DAG.getConstant(SystemZ::IPM_CC, DL, MVT::i32)); - SDValue ROTL = DAG.getNode(ISD::ROTL, DL, MVT::i32, SRL, - DAG.getConstant(31, DL, MVT::i32)); - return ROTL; + SDValue SHL = DAG.getNode(ISD::SHL, DL, MVT::i32, IPM, + DAG.getConstant(30 - SystemZ::IPM_CC, DL, MVT::i32)); + SDValue SRA = DAG.getNode(ISD::SRA, DL, MVT::i32, SHL, + DAG.getConstant(30, DL, MVT::i32)); + return SRA; } std::pair SystemZSelectionDAGInfo::EmitTargetCodeForMemcmp( @@ -184,7 +184,8 @@ std::pair SystemZSelectionDAGInfo::E if (auto *CSize = dyn_cast(Size)) { uint64_t Bytes = CSize->getZExtValue(); assert(Bytes > 0 && "Caller should have handled 0-size case"); - SDValue CCReg = emitCLC(DAG, DL, Chain, Src1, Src2, Bytes); + // Swap operands to invert CC == 1 vs. CC == 2 cases. + SDValue CCReg = emitCLC(DAG, DL, Chain, Src2, Src1, Bytes); Chain = CCReg.getValue(1); return std::make_pair(addIPMSequence(DL, CCReg, DAG), Chain); } @@ -232,7 +233,8 @@ std::pair SystemZSelectionDAGInfo::E SDValue Src2, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const { SDVTList VTs = DAG.getVTList(Src1.getValueType(), MVT::i32, MVT::Other); - SDValue Unused = DAG.getNode(SystemZISD::STRCMP, DL, VTs, Chain, Src1, Src2, + // Swap operands to invert CC == 1 vs. CC == 2 cases. + SDValue Unused = DAG.getNode(SystemZISD::STRCMP, DL, VTs, Chain, Src2, Src1, DAG.getConstant(0, DL, MVT::i32)); SDValue CCReg = Unused.getValue(1); Chain = Unused.getValue(2); Modified: projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -113,8 +113,15 @@ void WebAssemblyTargetAsmStreamer::emitEventType(const } void WebAssemblyTargetAsmStreamer::emitImportModule(const MCSymbolWasm *Sym, - StringRef ModuleName) { - OS << "\t.import_module\t" << Sym->getName() << ", " << ModuleName << '\n'; + StringRef ImportModule) { + OS << "\t.import_module\t" << Sym->getName() << ", " + << ImportModule << '\n'; +} + +void WebAssemblyTargetAsmStreamer::emitImportName(const MCSymbolWasm *Sym, + StringRef ImportName) { + OS << "\t.import_name\t" << Sym->getName() << ", " + << ImportName << '\n'; } void WebAssemblyTargetAsmStreamer::emitIndIdx(const MCExpr *Value) { Modified: projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h Fri Feb 15 21:44:42 2019 (r344177) @@ -45,7 +45,10 @@ class WebAssemblyTargetStreamer : public MCTargetStrea virtual void emitEventType(const MCSymbolWasm *Sym) = 0; /// .import_module virtual void emitImportModule(const MCSymbolWasm *Sym, - StringRef ModuleName) = 0; + StringRef ImportModule) = 0; + /// .import_name + virtual void emitImportName(const MCSymbolWasm *Sym, + StringRef ImportName) = 0; protected: void emitValueType(wasm::ValType Type); @@ -67,7 +70,8 @@ class WebAssemblyTargetAsmStreamer final : public WebA void emitIndIdx(const MCExpr *Value) override; void emitGlobalType(const MCSymbolWasm *Sym) override; void emitEventType(const MCSymbolWasm *Sym) override; - void emitImportModule(const MCSymbolWasm *Sym, StringRef ModuleName) override; + void emitImportModule(const MCSymbolWasm *Sym, StringRef ImportModule) override; + void emitImportName(const MCSymbolWasm *Sym, StringRef ImportName) override; }; /// This part is for Wasm object output @@ -82,7 +86,9 @@ class WebAssemblyTargetWasmStreamer final : public Web void emitGlobalType(const MCSymbolWasm *Sym) override {} void emitEventType(const MCSymbolWasm *Sym) override {} void emitImportModule(const MCSymbolWasm *Sym, - StringRef ModuleName) override {} + StringRef ImportModule) override {} + void emitImportName(const MCSymbolWasm *Sym, + StringRef ImportName) override {} }; /// This part is for null output @@ -98,6 +104,7 @@ class WebAssemblyTargetNullStreamer final : public Web void emitGlobalType(const MCSymbolWasm *) override {} void emitEventType(const MCSymbolWasm *) override {} void emitImportModule(const MCSymbolWasm *, StringRef) override {} + void emitImportName(const MCSymbolWasm *, StringRef) override {} }; } // end namespace llvm Modified: projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp ============================================================================== --- projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Fri Feb 15 20:52:32 2019 (r344176) +++ projects/clang800-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Fri Feb 15 21:44:42 2019 (r344177) @@ -111,8 +111,15 @@ void WebAssemblyAsmPrinter::EmitEndOfAsmFile(Module &M F.hasFnAttribute("wasm-import-module")) { StringRef Name = F.getFnAttribute("wasm-import-module").getValueAsString(); - Sym->setModuleName(Name); + Sym->setImportModule(Name); getTargetStreamer()->emitImportModule(Sym, Name); + } + if (TM.getTargetTriple().isOSBinFormatWasm() && + F.hasFnAttribute("wasm-import-name")) { + StringRef Name = *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Fri Feb 15 21:50:49 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02EBB14EAFCD for ; Fri, 15 Feb 2019 21:50:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A069A87322; Fri, 15 Feb 2019 21:50:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95A142491C; Fri, 15 Feb 2019 21:50:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1FLomrW084043; Fri, 15 Feb 2019 21:50:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1FLokSD084029; Fri, 15 Feb 2019 21:50:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902152150.x1FLokSD084029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 15 Feb 2019 21:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r344178 - in projects/clang800-import: . bin/sh bin/sh/tests/expansion contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/t... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang800-import: . bin/sh bin/sh/tests/expansion contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/test_utils contrib/llvm/li... X-SVN-Commit-Revision: 344178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A069A87322 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2019 21:50:49 -0000 Author: dim Date: Fri Feb 15 21:50:45 2019 New Revision: 344178 URL: https://svnweb.freebsd.org/changeset/base/344178 Log: Merge ^/head r343956 through r344177. Added: projects/clang800-import/bin/sh/tests/expansion/arith16.0 - copied unchanged from r344177, head/bin/sh/tests/expansion/arith16.0 projects/clang800-import/bin/sh/tests/expansion/arith17.0 - copied unchanged from r344177, head/bin/sh/tests/expansion/arith17.0 projects/clang800-import/contrib/libarchive/libarchive/archive_ppmd8.c - copied unchanged from r344177, head/contrib/libarchive/libarchive/archive_ppmd8.c projects/clang800-import/contrib/libarchive/libarchive/archive_ppmd8_private.h - copied unchanged from r344177, head/contrib/libarchive/libarchive/archive_ppmd8_private.h projects/clang800-import/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2.zipx.uu - copied unchanged from r344177, head/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2.zipx.uu projects/clang800-import/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu - copied unchanged from r344177, head/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu projects/clang800-import/contrib/libarchive/libarchive/test/test_read_format_zip_lzma.zipx.uu - copied unchanged from r344177, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma.zipx.uu projects/clang800-import/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu - copied unchanged from r344177, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu projects/clang800-import/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8.zipx.uu - copied unchanged from r344177, head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8.zipx.uu projects/clang800-import/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu - copied unchanged from r344177, head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu projects/clang800-import/contrib/libarchive/libarchive/test/test_read_format_zip_xz_multi.zipx.uu - copied unchanged from r344177, head/contrib/libarchive/libarchive/test/test_read_format_zip_xz_multi.zipx.uu projects/clang800-import/lib/libc/x86/gen/ - copied from r344177, head/lib/libc/x86/gen/ projects/clang800-import/sys/opencrypto/cbc_mac.c - copied unchanged from r344177, head/sys/opencrypto/cbc_mac.c projects/clang800-import/sys/opencrypto/cbc_mac.h - copied unchanged from r344177, head/sys/opencrypto/cbc_mac.h projects/clang800-import/sys/opencrypto/xform_cbc_mac.c - copied unchanged from r344177, head/sys/opencrypto/xform_cbc_mac.c Deleted: projects/clang800-import/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.c projects/clang800-import/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu projects/clang800-import/lib/libc/amd64/gen/getcontextx.c projects/clang800-import/lib/libc/i386/gen/getcontextx.c projects/clang800-import/sys/contrib/dev/iwm/iwm-3160-9.fw.uu projects/clang800-import/sys/contrib/dev/iwm/iwm-7260-9.fw.uu projects/clang800-import/sys/contrib/dev/iwm/iwm-7265-9.fw.uu Modified: projects/clang800-import/UPDATING projects/clang800-import/bin/sh/arith_yacc.c projects/clang800-import/bin/sh/arith_yacc.h projects/clang800-import/bin/sh/arith_yylex.c projects/clang800-import/bin/sh/shell.h projects/clang800-import/bin/sh/tests/expansion/Makefile projects/clang800-import/contrib/libarchive/cpio/test/test_option_t.c projects/clang800-import/contrib/libarchive/libarchive/archive_acl.c projects/clang800-import/contrib/libarchive/libarchive/archive_entry.c projects/clang800-import/contrib/libarchive/libarchive/archive_pack_dev.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_disk_posix.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_open_file.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_support_format_ar.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_support_format_cpio.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_support_format_rar5.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_support_format_xar.c projects/clang800-import/contrib/libarchive/libarchive/archive_read_support_format_zip.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_disk_posix.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_set_format_ar.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_set_format_cpio.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_set_format_shar.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_set_format_ustar.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c projects/clang800-import/contrib/libarchive/libarchive/archive_write_set_format_zip.c projects/clang800-import/contrib/libarchive/libarchive/test/test_read_format_zip.c projects/clang800-import/contrib/libarchive/test_utils/test_main.c projects/clang800-import/contrib/llvm/lib/MC/ELFObjectWriter.cpp projects/clang800-import/lib/libarchive/Makefile projects/clang800-import/lib/libarchive/tests/Makefile projects/clang800-import/lib/libbe/be.c projects/clang800-import/lib/libbe/be.h projects/clang800-import/lib/libbe/be_error.c projects/clang800-import/lib/libbe/libbe.3 projects/clang800-import/lib/libc/Makefile projects/clang800-import/lib/libc/amd64/gen/Makefile.inc projects/clang800-import/lib/libc/gen/readpassphrase.3 projects/clang800-import/lib/libc/i386/gen/Makefile.inc projects/clang800-import/lib/libc/net/getaddrinfo.3 projects/clang800-import/lib/libc/x86/sys/__vdso_gettc.c projects/clang800-import/lib/libnv/tests/nvlist_send_recv_test.c projects/clang800-import/lib/libthr/arch/powerpc/include/pthread_md.h projects/clang800-import/sbin/bectl/bectl.8 projects/clang800-import/sbin/bectl/bectl.c projects/clang800-import/sbin/bectl/tests/bectl_test.sh projects/clang800-import/sbin/gbde/gbde.c projects/clang800-import/sbin/ifconfig/ifieee80211.c projects/clang800-import/sbin/mdmfs/mdmfs.c projects/clang800-import/sbin/pfctl/pfctl_altq.c projects/clang800-import/sbin/pfctl/pfctl_parser.c projects/clang800-import/share/man/man4/numa.4 projects/clang800-import/share/man/man7/ports.7 projects/clang800-import/share/man/man8/Makefile projects/clang800-import/share/termcap/termcap projects/clang800-import/stand/common/dev_net.c projects/clang800-import/sys/amd64/amd64/elf_machdep.c projects/clang800-import/sys/arm/allwinner/axp81x.c projects/clang800-import/sys/arm/arm/busdma_machdep-v6.c projects/clang800-import/sys/arm/arm/elf_machdep.c projects/clang800-import/sys/arm/nvidia/tegra_sdhci.c projects/clang800-import/sys/arm64/arm64/elf_machdep.c projects/clang800-import/sys/cam/cam_xpt.c projects/clang800-import/sys/cam/scsi/scsi_xpt.c projects/clang800-import/sys/compat/freebsd32/freebsd32_misc.c projects/clang800-import/sys/compat/ia32/ia32_sysvec.c projects/clang800-import/sys/compat/linuxkpi/common/src/linux_tasklet.c projects/clang800-import/sys/conf/files projects/clang800-import/sys/contrib/libnv/nv_impl.h projects/clang800-import/sys/contrib/libnv/nvlist.c projects/clang800-import/sys/contrib/libnv/nvpair.c projects/clang800-import/sys/dev/beri/virtio/virtio_block.c projects/clang800-import/sys/dev/cxgbe/common/t4_hw.c projects/clang800-import/sys/dev/ena/ena.c projects/clang800-import/sys/dev/ena/ena.h projects/clang800-import/sys/dev/ixl/if_ixl.c projects/clang800-import/sys/dev/ixl/ixl_pf.h projects/clang800-import/sys/dev/malo/if_malo.c projects/clang800-import/sys/dev/mwl/if_mwl.c projects/clang800-import/sys/dev/pci/pci.c projects/clang800-import/sys/dev/usb/quirk/usb_quirk.c projects/clang800-import/sys/dev/usb/usbdevs projects/clang800-import/sys/dev/usb/wlan/if_run.c projects/clang800-import/sys/i386/i386/elf_machdep.c projects/clang800-import/sys/i386/include/cpufunc.h projects/clang800-import/sys/kern/imgact_elf.c projects/clang800-import/sys/kern/kern_exec.c projects/clang800-import/sys/kern/kern_fork.c projects/clang800-import/sys/kern/kern_procctl.c projects/clang800-import/sys/kern/kern_resource.c projects/clang800-import/sys/kern/subr_epoch.c projects/clang800-import/sys/kern/subr_gtaskqueue.c projects/clang800-import/sys/mips/cavium/octe/ethernet-defines.h projects/clang800-import/sys/mips/cavium/octe/ethernet-rx.c projects/clang800-import/sys/mips/cavium/octe/ethernet.c projects/clang800-import/sys/mips/mips/elf_machdep.c projects/clang800-import/sys/modules/crypto/Makefile projects/clang800-import/sys/modules/hwpmc/Makefile projects/clang800-import/sys/net/altq/altq_cbq.c projects/clang800-import/sys/net/altq/altq_codel.c projects/clang800-import/sys/net/altq/altq_fairq.c projects/clang800-import/sys/net/altq/altq_hfsc.c projects/clang800-import/sys/net/altq/altq_hfsc.h projects/clang800-import/sys/net/altq/altq_priq.c projects/clang800-import/sys/net/altq/altq_subr.c projects/clang800-import/sys/net/altq/altq_var.h projects/clang800-import/sys/net/if_lagg.c projects/clang800-import/sys/net/if_vlan.c projects/clang800-import/sys/net/iflib.c projects/clang800-import/sys/net/pfvar.h projects/clang800-import/sys/net80211/ieee80211_adhoc.c projects/clang800-import/sys/net80211/ieee80211_hostap.c projects/clang800-import/sys/net80211/ieee80211_ht.c projects/clang800-import/sys/net80211/ieee80211_mesh.c projects/clang800-import/sys/net80211/ieee80211_output.c projects/clang800-import/sys/net80211/ieee80211_proto.h projects/clang800-import/sys/net80211/ieee80211_sta.c projects/clang800-import/sys/net80211/ieee80211_wds.c projects/clang800-import/sys/netinet/if_ether.c projects/clang800-import/sys/netinet/in_pcb.c projects/clang800-import/sys/netinet/raw_ip.c projects/clang800-import/sys/netinet/sctp_usrreq.c projects/clang800-import/sys/netinet/sctputil.c projects/clang800-import/sys/netinet/tcp_timewait.c projects/clang800-import/sys/netpfil/ipfw/ip_fw_dynamic.c projects/clang800-import/sys/netpfil/pf/pf.c projects/clang800-import/sys/netpfil/pf/pf_ioctl.c projects/clang800-import/sys/opencrypto/cryptodev.c projects/clang800-import/sys/opencrypto/cryptodev.h projects/clang800-import/sys/opencrypto/cryptosoft.c projects/clang800-import/sys/opencrypto/xform_aes_icm.c projects/clang800-import/sys/opencrypto/xform_auth.h projects/clang800-import/sys/opencrypto/xform_enc.h projects/clang800-import/sys/powerpc/aim/mmu_oea64.c projects/clang800-import/sys/powerpc/booke/pmap.c projects/clang800-import/sys/powerpc/conf/MPC85XXSPE projects/clang800-import/sys/powerpc/powerpc/elf32_machdep.c projects/clang800-import/sys/powerpc/powerpc/elf64_machdep.c projects/clang800-import/sys/powerpc/powerpc/exec_machdep.c projects/clang800-import/sys/riscv/include/param.h projects/clang800-import/sys/riscv/include/pcb.h projects/clang800-import/sys/riscv/include/pcpu.h projects/clang800-import/sys/riscv/include/pmap.h projects/clang800-import/sys/riscv/include/pte.h projects/clang800-import/sys/riscv/include/vmparam.h projects/clang800-import/sys/riscv/riscv/elf_machdep.c projects/clang800-import/sys/riscv/riscv/genassym.c projects/clang800-import/sys/riscv/riscv/machdep.c projects/clang800-import/sys/riscv/riscv/mp_machdep.c projects/clang800-import/sys/riscv/riscv/pmap.c projects/clang800-import/sys/riscv/riscv/swtch.S projects/clang800-import/sys/riscv/riscv/vm_machdep.c projects/clang800-import/sys/sparc64/sparc64/elf_machdep.c projects/clang800-import/sys/sys/_task.h projects/clang800-import/sys/sys/gtaskqueue.h projects/clang800-import/sys/sys/imgact.h projects/clang800-import/sys/sys/param.h projects/clang800-import/sys/sys/proc.h projects/clang800-import/sys/sys/procctl.h projects/clang800-import/sys/sys/sysent.h projects/clang800-import/sys/vm/swap_pager.c projects/clang800-import/sys/vm/uma_core.c projects/clang800-import/sys/vm/uma_int.h projects/clang800-import/sys/vm/vm_fault.c projects/clang800-import/sys/vm/vm_map.c projects/clang800-import/sys/vm/vm_map.h projects/clang800-import/tools/tools/crypto/cryptocheck.c projects/clang800-import/usr.bin/proccontrol/proccontrol.c projects/clang800-import/usr.bin/top/Makefile projects/clang800-import/usr.bin/top/display.c projects/clang800-import/usr.bin/top/display.h projects/clang800-import/usr.bin/top/machine.c projects/clang800-import/usr.bin/top/top.c projects/clang800-import/usr.bin/top/username.c projects/clang800-import/usr.bin/top/utils.c projects/clang800-import/usr.bin/top/utils.h projects/clang800-import/usr.sbin/bhyve/block_if.c projects/clang800-import/usr.sbin/bhyve/pci_xhci.c (contents, props changed) projects/clang800-import/usr.sbin/bhyve/uart_emul.c projects/clang800-import/usr.sbin/mountd/exports.5 Directory Properties: projects/clang800-import/ (props changed) projects/clang800-import/contrib/libarchive/ (props changed) projects/clang800-import/contrib/llvm/ (props changed) Modified: projects/clang800-import/UPDATING ============================================================================== --- projects/clang800-import/UPDATING Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/UPDATING Fri Feb 15 21:50:45 2019 (r344178) @@ -44,6 +44,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: modules on kernels not having 'device iflib', the iflib.ko module is loaded automatically. +20190125: + The IEEE80211_AMPDU_AGE and AH_SUPPORT_AR5416 kernel configuration + options no longer exist since r343219 and r343427 respectively; + nothing uses them, so they should be just removed from custom + kernel config files. + 20181230: r342635 changes the way efibootmgr(8) works by requiring users to add the -b (bootnum) parameter for commands where the bootnum was previously @@ -237,7 +243,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 20180719: ARM64 now have efifb support, if you want to have serial console on your arm64 board when an screen is connected and the bootloader - setup a frambuffer for us to use, just add : + setup a framebuffer for us to use, just add : boot_serial=YES boot_multicons=YES in /boot/loader.conf Modified: projects/clang800-import/bin/sh/arith_yacc.c ============================================================================== --- projects/clang800-import/bin/sh/arith_yacc.c Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/bin/sh/arith_yacc.c Fri Feb 15 21:50:45 2019 (r344178) @@ -104,7 +104,7 @@ static arith_t arith_lookupvarint(char *varname) if (str == NULL || *str == '\0') str = "0"; errno = 0; - result = strtoarith_t(str, &p, 0); + result = strtoarith_t(str, &p); if (errno != 0 || *p != '\0') yyerror("variable conversion error"); return result; Modified: projects/clang800-import/bin/sh/arith_yacc.h ============================================================================== --- projects/clang800-import/bin/sh/arith_yacc.h Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/bin/sh/arith_yacc.h Fri Feb 15 21:50:45 2019 (r344178) @@ -90,4 +90,5 @@ union yystype { extern union yystype yylval; +arith_t strtoarith_t(const char *restrict nptr, char **restrict endptr); int yylex(void); Modified: projects/clang800-import/bin/sh/arith_yylex.c ============================================================================== --- projects/clang800-import/bin/sh/arith_yylex.c Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/bin/sh/arith_yylex.c Fri Feb 15 21:50:45 2019 (r344178) @@ -35,6 +35,8 @@ #include __FBSDID("$FreeBSD$"); +#include +#include #include #include #include @@ -50,6 +52,32 @@ __FBSDID("$FreeBSD$"); #error Arithmetic tokens are out of order. #endif +arith_t +strtoarith_t(const char *restrict nptr, char **restrict endptr) +{ + arith_t val; + + while (isspace((unsigned char)*nptr)) + nptr++; + switch (*nptr) { + case '-': + return strtoimax(nptr, endptr, 0); + case '0': + return (arith_t)strtoumax(nptr, endptr, 0); + default: + val = (arith_t)strtoumax(nptr, endptr, 0); + if (val >= 0) + return val; + else if (val == ARITH_MIN) { + errno = ERANGE; + return ARITH_MIN; + } else { + errno = ERANGE; + return ARITH_MAX; + } + } +} + int yylex(void) { @@ -78,7 +106,7 @@ yylex(void) case '7': case '8': case '9': - yylval.val = strtoarith_t(buf, &end, 0); + yylval.val = strtoarith_t(buf, &end); arith_buf = end; return ARITH_NUM; case 'A': Modified: projects/clang800-import/bin/sh/shell.h ============================================================================== --- projects/clang800-import/bin/sh/shell.h Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/bin/sh/shell.h Fri Feb 15 21:50:45 2019 (r344178) @@ -59,7 +59,6 @@ */ typedef intmax_t arith_t; #define ARITH_FORMAT_STR "%" PRIdMAX -#define strtoarith_t(nptr, endptr, base) (intmax_t)strtoumax(nptr, endptr, base) #define ARITH_MIN INTMAX_MIN #define ARITH_MAX INTMAX_MAX Modified: projects/clang800-import/bin/sh/tests/expansion/Makefile ============================================================================== --- projects/clang800-import/bin/sh/tests/expansion/Makefile Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/bin/sh/tests/expansion/Makefile Fri Feb 15 21:50:45 2019 (r344178) @@ -22,6 +22,8 @@ ${PACKAGE}FILES+= arith12.0 ${PACKAGE}FILES+= arith13.0 ${PACKAGE}FILES+= arith14.0 ${PACKAGE}FILES+= arith15.0 +${PACKAGE}FILES+= arith16.0 +${PACKAGE}FILES+= arith17.0 ${PACKAGE}FILES+= assign1.0 ${PACKAGE}FILES+= cmdsubst1.0 ${PACKAGE}FILES+= cmdsubst2.0 Copied: projects/clang800-import/bin/sh/tests/expansion/arith16.0 (from r344177, head/bin/sh/tests/expansion/arith16.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang800-import/bin/sh/tests/expansion/arith16.0 Fri Feb 15 21:50:45 2019 (r344178, copy of r344177, head/bin/sh/tests/expansion/arith16.0) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +failures=0 + +for x in \ + 0x10000000000000000 \ + -0x8000000000000001 \ + 0xfffffffffffffffffffffffffffffffff \ + -0xfffffffffffffffffffffffffffffffff \ + 02000000000000000000000 \ + 9223372036854775808 \ + 9223372036854775809 \ + -9223372036854775809 \ + 9999999999999999999999999 \ + -9999999999999999999999999 +do + msg=$({ + v=$((x)) || : + } 3>&1 >&2 2>&3 3>&-) + r=$? + if [ "$r" = 0 ] || [ -z "$msg" ]; then + printf 'Failed: %s\n' "$x" + : $((failures += 1)) + fi +done +exit $((failures > 0)) Copied: projects/clang800-import/bin/sh/tests/expansion/arith17.0 (from r344177, head/bin/sh/tests/expansion/arith17.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang800-import/bin/sh/tests/expansion/arith17.0 Fri Feb 15 21:50:45 2019 (r344178, copy of r344177, head/bin/sh/tests/expansion/arith17.0) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +[ $((9223372036854775809)) -gt 0 ] Modified: projects/clang800-import/contrib/libarchive/cpio/test/test_option_t.c ============================================================================== --- projects/clang800-import/contrib/libarchive/cpio/test/test_option_t.c Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/contrib/libarchive/cpio/test/test_option_t.c Fri Feb 15 21:50:45 2019 (r344178) @@ -88,11 +88,11 @@ DEFINE_TEST(test_option_t) setlocale(LC_ALL, ""); #endif #if defined(_WIN32) && !defined(__CYGWIN__) - strftime(date2, sizeof(date), "%b %d %Y", localtime(&mtime)); - _snprintf(date, sizeof(date)-1, "%12s file", date2); + strftime(date2, sizeof(date2)-1, "%b %d %Y", localtime(&mtime)); + _snprintf(date, sizeof(date)-1, "%12.12s file", date2); #else - strftime(date2, sizeof(date), "%b %e %Y", localtime(&mtime)); - snprintf(date, sizeof(date)-1, "%12s file", date2); + strftime(date2, sizeof(date2)-1, "%b %e %Y", localtime(&mtime)); + snprintf(date, sizeof(date)-1, "%12.12s file", date2); #endif assertEqualMem(p + 42, date, strlen(date)); free(p); Modified: projects/clang800-import/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- projects/clang800-import/contrib/libarchive/libarchive/archive_acl.c Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/contrib/libarchive/libarchive/archive_acl.c Fri Feb 15 21:50:45 2019 (r344178) @@ -138,14 +138,10 @@ archive_acl_clear(struct archive_acl *acl) free(acl->acl_head); acl->acl_head = ap; } - if (acl->acl_text_w != NULL) { - free(acl->acl_text_w); - acl->acl_text_w = NULL; - } - if (acl->acl_text != NULL) { - free(acl->acl_text); - acl->acl_text = NULL; - } + free(acl->acl_text_w); + acl->acl_text_w = NULL; + free(acl->acl_text); + acl->acl_text = NULL; acl->acl_p = NULL; acl->acl_types = 0; acl->acl_state = 0; /* Not counting. */ @@ -324,14 +320,10 @@ acl_new_entry(struct archive_acl *acl, return (NULL); } - if (acl->acl_text_w != NULL) { - free(acl->acl_text_w); - acl->acl_text_w = NULL; - } - if (acl->acl_text != NULL) { - free(acl->acl_text); - acl->acl_text = NULL; - } + free(acl->acl_text_w); + acl->acl_text_w = NULL; + free(acl->acl_text); + acl->acl_text = NULL; /* * If there's a matching entry already in the list, overwrite it. Modified: projects/clang800-import/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- projects/clang800-import/contrib/libarchive/libarchive/archive_entry.c Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/contrib/libarchive/libarchive/archive_entry.c Fri Feb 15 21:50:45 2019 (r344178) @@ -1560,10 +1560,8 @@ archive_entry_acl_text_compat(int *flags) const wchar_t * archive_entry_acl_text_w(struct archive_entry *entry, int flags) { - if (entry->acl.acl_text_w != NULL) { - free(entry->acl.acl_text_w); - entry->acl.acl_text_w = NULL; - } + free(entry->acl.acl_text_w); + entry->acl.acl_text_w = NULL; if (archive_entry_acl_text_compat(&flags) == 0) entry->acl.acl_text_w = archive_acl_to_text_w(&entry->acl, NULL, flags, entry->archive); @@ -1574,10 +1572,8 @@ archive_entry_acl_text_w(struct archive_entry *entry, const char * archive_entry_acl_text(struct archive_entry *entry, int flags) { - if (entry->acl.acl_text != NULL) { - free(entry->acl.acl_text); - entry->acl.acl_text = NULL; - } + free(entry->acl.acl_text); + entry->acl.acl_text = NULL; if (archive_entry_acl_text_compat(&flags) == 0) entry->acl.acl_text = archive_acl_to_text_l(&entry->acl, NULL, flags, NULL); @@ -1590,10 +1586,8 @@ int _archive_entry_acl_text_l(struct archive_entry *entry, int flags, const char **acl_text, size_t *len, struct archive_string_conv *sc) { - if (entry->acl.acl_text != NULL) { - free(entry->acl.acl_text); - entry->acl.acl_text = NULL; - } + free(entry->acl.acl_text); + entry->acl.acl_text = NULL; if (archive_entry_acl_text_compat(&flags) == 0) entry->acl.acl_text = archive_acl_to_text_l(&entry->acl, Modified: projects/clang800-import/contrib/libarchive/libarchive/archive_pack_dev.c ============================================================================== --- projects/clang800-import/contrib/libarchive/libarchive/archive_pack_dev.c Fri Feb 15 21:44:42 2019 (r344177) +++ projects/clang800-import/contrib/libarchive/libarchive/archive_pack_dev.c Fri Feb 15 21:50:45 2019 (r344178) @@ -60,6 +60,9 @@ __RCSID("$NetBSD$"); #ifdef HAVE_SYS_SYSMACROS_H #include #endif +#ifdef HAVE_SYS_MKDEV_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif Copied: projects/clang800-import/contrib/libarchive/libarchive/archive_ppmd8.c (from r344177, head/contrib/libarchive/libarchive/archive_ppmd8.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang800-import/contrib/libarchive/libarchive/archive_ppmd8.c Fri Feb 15 21:50:45 2019 (r344178, copy of r344177, head/contrib/libarchive/libarchive/archive_ppmd8.c) @@ -0,0 +1,1287 @@ +/* Ppmd8.c -- PPMdI codec +2016-05-21 : Igor Pavlov : Public domain +This code is based on PPMd var.I (2002): Dmitry Shkarin : Public domain */ + +#include "archive_platform.h" + +#include + +#include "archive_ppmd8_private.h" + +const Byte PPMD8_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 }; +static const UInt16 kInitBinEsc[] = { 0x3CDD, 0x1F3F, 0x59BF, 0x48F3, 0x64A1, 0x5ABC, 0x6632, 0x6051}; + +#define MAX_FREQ 124 +#define UNIT_SIZE 12 + +#define U2B(nu) ((UInt32)(nu) * UNIT_SIZE) +#define U2I(nu) (p->Units2Indx[(nu) - 1]) +#define I2U(indx) (p->Indx2Units[indx]) + +#ifdef PPMD_32BIT + #define REF(ptr) (ptr) +#else + #define REF(ptr) ((UInt32)((Byte *)(ptr) - (p)->Base)) +#endif + +#define STATS_REF(ptr) ((CPpmd_State_Ref)REF(ptr)) + +#define CTX(ref) ((CPpmd8_Context *)Ppmd8_GetContext(p, ref)) +#define STATS(ctx) Ppmd8_GetStats(p, ctx) +#define ONE_STATE(ctx) Ppmd8Context_OneState(ctx) +#define SUFFIX(ctx) CTX((ctx)->Suffix) + +#define kTop (1 << 24) +#define kBot (1 << 15) + +typedef CPpmd8_Context * CTX_PTR; + +struct CPpmd8_Node_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd8_Node_ * + #else + UInt32 + #endif + CPpmd8_Node_Ref; + +typedef struct CPpmd8_Node_ +{ + UInt32 Stamp; + CPpmd8_Node_Ref Next; + UInt32 NU; +} CPpmd8_Node; + +#ifdef PPMD_32BIT + #define NODE(ptr) (ptr) +#else + #define NODE(offs) ((CPpmd8_Node *)(p->Base + (offs))) +#endif + +#define EMPTY_NODE 0xFFFFFFFF + +void Ppmd8_Construct(CPpmd8 *p) +{ + unsigned i, k, m; + + p->Base = 0; + + for (i = 0, k = 0; i < PPMD_NUM_INDEXES; i++) + { + unsigned step = (i >= 12 ? 4 : (i >> 2) + 1); + do { p->Units2Indx[k++] = (Byte)i; } while (--step); + p->Indx2Units[i] = (Byte)k; + } + + p->NS2BSIndx[0] = (0 << 1); + p->NS2BSIndx[1] = (1 << 1); + memset(p->NS2BSIndx + 2, (2 << 1), 9); + memset(p->NS2BSIndx + 11, (3 << 1), 256 - 11); + + for (i = 0; i < 5; i++) + p->NS2Indx[i] = (Byte)i; + for (m = i, k = 1; i < 260; i++) + { + p->NS2Indx[i] = (Byte)m; + if (--k == 0) + k = (++m) - 4; + } +} + +void Ppmd8_Free(CPpmd8 *p) +{ + free(p->Base); + p->Size = 0; + p->Base = 0; +} + +Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size) +{ + if (p->Base == 0 || p->Size != size) + { + Ppmd8_Free(p); + p->AlignOffset = + #ifdef PPMD_32BIT + (4 - size) & 3; + #else + 4 - (size & 3); + #endif + if ((p->Base = (Byte *)malloc(p->AlignOffset + size)) == 0) + return False; + p->Size = size; + } + return True; +} + +static void InsertNode(CPpmd8 *p, void *node, unsigned indx) +{ + ((CPpmd8_Node *)node)->Stamp = EMPTY_NODE; + ((CPpmd8_Node *)node)->Next = (CPpmd8_Node_Ref)p->FreeList[indx]; + ((CPpmd8_Node *)node)->NU = I2U(indx); + p->FreeList[indx] = REF(node); + p->Stamps[indx]++; +} + +static void *RemoveNode(CPpmd8 *p, unsigned indx) +{ + CPpmd8_Node *node = NODE((CPpmd8_Node_Ref)p->FreeList[indx]); + p->FreeList[indx] = node->Next; + p->Stamps[indx]--; + return node; +} + +static void SplitBlock(CPpmd8 *p, void *ptr, unsigned oldIndx, unsigned newIndx) +{ + unsigned i, nu = I2U(oldIndx) - I2U(newIndx); + ptr = (Byte *)ptr + U2B(I2U(newIndx)); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, ((Byte *)ptr) + U2B(k), nu - k - 1); + } + InsertNode(p, ptr, i); +} + +static void GlueFreeBlocks(CPpmd8 *p) +{ + CPpmd8_Node_Ref head = 0; + CPpmd8_Node_Ref *prev = &head; + unsigned i; + + p->GlueCount = 1 << 13; + memset(p->Stamps, 0, sizeof(p->Stamps)); + + /* Order-0 context is always at top UNIT, so we don't need guard NODE at the end. + All blocks up to p->LoUnit can be free, so we need guard NODE at LoUnit. */ + if (p->LoUnit != p->HiUnit) + ((CPpmd8_Node *)p->LoUnit)->Stamp = 0; + + /* Glue free blocks */ + for (i = 0; i < PPMD_NUM_INDEXES; i++) + { + CPpmd8_Node_Ref next = (CPpmd8_Node_Ref)p->FreeList[i]; + p->FreeList[i] = 0; + while (next != 0) + { + CPpmd8_Node *node = NODE(next); + if (node->NU != 0) + { + CPpmd8_Node *node2; + *prev = next; + prev = &(node->Next); + while ((node2 = node + node->NU)->Stamp == EMPTY_NODE) + { + node->NU += node2->NU; + node2->NU = 0; + } + } + next = node->Next; + } + } + *prev = 0; + + /* Fill lists of free blocks */ + while (head != 0) + { + CPpmd8_Node *node = NODE(head); + unsigned nu; + head = node->Next; + nu = node->NU; + if (nu == 0) + continue; + for (; nu > 128; nu -= 128, node += 128) + InsertNode(p, node, PPMD_NUM_INDEXES - 1); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, node + k, nu - k - 1); + } + InsertNode(p, node, i); + } +} + +static void *AllocUnitsRare(CPpmd8 *p, unsigned indx) +{ + unsigned i; + void *retVal; + if (p->GlueCount == 0) + { + GlueFreeBlocks(p); + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + } + i = indx; + do + { + if (++i == PPMD_NUM_INDEXES) + { + UInt32 numBytes = U2B(I2U(indx)); + p->GlueCount--; + return ((UInt32)(p->UnitsStart - p->Text) > numBytes) ? (p->UnitsStart -= numBytes) : (NULL); + } + } + while (p->FreeList[i] == 0); + retVal = RemoveNode(p, i); + SplitBlock(p, retVal, i, indx); + return retVal; +} + +static void *AllocUnits(CPpmd8 *p, unsigned indx) +{ + UInt32 numBytes; + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + numBytes = U2B(I2U(indx)); + if (numBytes <= (UInt32)(p->HiUnit - p->LoUnit)) + { + void *retVal = p->LoUnit; + p->LoUnit += numBytes; + return retVal; + } + return AllocUnitsRare(p, indx); +} + +#define MyMem12Cpy(dest, src, num) \ + { UInt32 *d = (UInt32 *)dest; const UInt32 *z = (const UInt32 *)src; UInt32 n = num; \ + do { d[0] = z[0]; d[1] = z[1]; d[2] = z[2]; z += 3; d += 3; } while (--n); } + +static void *ShrinkUnits(CPpmd8 *p, void *oldPtr, unsigned oldNU, unsigned newNU) +{ + unsigned i0 = U2I(oldNU); + unsigned i1 = U2I(newNU); + if (i0 == i1) + return oldPtr; + if (p->FreeList[i1] != 0) + { + void *ptr = RemoveNode(p, i1); + MyMem12Cpy(ptr, oldPtr, newNU); + InsertNode(p, oldPtr, i0); + return ptr; + } + SplitBlock(p, oldPtr, i0, i1); + return oldPtr; +} + +static void FreeUnits(CPpmd8 *p, void *ptr, unsigned nu) +{ + InsertNode(p, ptr, U2I(nu)); +} + +static void SpecialFreeUnit(CPpmd8 *p, void *ptr) +{ + if ((Byte *)ptr != p->UnitsStart) + InsertNode(p, ptr, 0); + else + { + #ifdef PPMD8_FREEZE_SUPPORT + *(UInt32 *)ptr = EMPTY_NODE; /* it's used for (Flags == 0xFF) check in RemoveBinContexts */ + #endif + p->UnitsStart += UNIT_SIZE; + } +} + +static void *MoveUnitsUp(CPpmd8 *p, void *oldPtr, unsigned nu) +{ + unsigned indx = U2I(nu); + void *ptr; + if ((Byte *)oldPtr > p->UnitsStart + 16 * 1024 || REF(oldPtr) > p->FreeList[indx]) + return oldPtr; + ptr = RemoveNode(p, indx); + MyMem12Cpy(ptr, oldPtr, nu); + if ((Byte*)oldPtr != p->UnitsStart) + InsertNode(p, oldPtr, indx); + else + p->UnitsStart += U2B(I2U(indx)); + return ptr; +} + +static void ExpandTextArea(CPpmd8 *p) +{ + UInt32 count[PPMD_NUM_INDEXES]; + unsigned i; + memset(count, 0, sizeof(count)); + if (p->LoUnit != p->HiUnit) + ((CPpmd8_Node *)p->LoUnit)->Stamp = 0; + + { + CPpmd8_Node *node = (CPpmd8_Node *)p->UnitsStart; + for (; node->Stamp == EMPTY_NODE; node += node->NU) + { + node->Stamp = 0; + count[U2I(node->NU)]++; + } + p->UnitsStart = (Byte *)node; + } + + for (i = 0; i < PPMD_NUM_INDEXES; i++) + { + CPpmd8_Node_Ref *next = (CPpmd8_Node_Ref *)&p->FreeList[i]; + while (count[i] != 0) + { + CPpmd8_Node *node = NODE(*next); + while (node->Stamp == 0) + { + *next = node->Next; + node = NODE(*next); + p->Stamps[i]--; + if (--count[i] == 0) + break; + } + next = &node->Next; + } + } +} + +#define SUCCESSOR(p) ((CPpmd_Void_Ref)((p)->SuccessorLow | ((UInt32)(p)->SuccessorHigh << 16))) + +static void SetSuccessor(CPpmd_State *p, CPpmd_Void_Ref v) +{ + (p)->SuccessorLow = (UInt16)((UInt32)(v) & 0xFFFF); + (p)->SuccessorHigh = (UInt16)(((UInt32)(v) >> 16) & 0xFFFF); +} + +#define RESET_TEXT(offs) { p->Text = p->Base + p->AlignOffset + (offs); } + +static void RestartModel(CPpmd8 *p) +{ + unsigned i, k, m, r; + + memset(p->FreeList, 0, sizeof(p->FreeList)); + memset(p->Stamps, 0, sizeof(p->Stamps)); + RESET_TEXT(0); + p->HiUnit = p->Text + p->Size; + p->LoUnit = p->UnitsStart = p->HiUnit - p->Size / 8 / UNIT_SIZE * 7 * UNIT_SIZE; + p->GlueCount = 0; + + p->OrderFall = p->MaxOrder; + p->RunLength = p->InitRL = -(Int32)((p->MaxOrder < 12) ? p->MaxOrder : 12) - 1; + p->PrevSuccess = 0; + + p->MinContext = p->MaxContext = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); /* AllocContext(p); */ + p->MinContext->Suffix = 0; + p->MinContext->NumStats = 255; + p->MinContext->Flags = 0; + p->MinContext->SummFreq = 256 + 1; + p->FoundState = (CPpmd_State *)p->LoUnit; /* AllocUnits(p, PPMD_NUM_INDEXES - 1); */ + p->LoUnit += U2B(256 / 2); + p->MinContext->Stats = REF(p->FoundState); + for (i = 0; i < 256; i++) + { + CPpmd_State *s = &p->FoundState[i]; + s->Symbol = (Byte)i; + s->Freq = 1; + SetSuccessor(s, 0); + } + + for (i = m = 0; m < 25; m++) + { + while (p->NS2Indx[i] == m) + i++; + for (k = 0; k < 8; k++) + { + UInt16 val = (UInt16)(PPMD_BIN_SCALE - kInitBinEsc[k] / (i + 1)); + UInt16 *dest = p->BinSumm[m] + k; + for (r = 0; r < 64; r += 8) + dest[r] = val; + } + } + + for (i = m = 0; m < 24; m++) + { + while (p->NS2Indx[i + 3] == m + 3) + i++; + for (k = 0; k < 32; k++) + { + CPpmd_See *s = &p->See[m][k]; + s->Summ = (UInt16)((2 * i + 5) << (s->Shift = PPMD_PERIOD_BITS - 4)); + s->Count = 7; + } + } +} + +void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod) +{ + p->MaxOrder = maxOrder; + p->RestoreMethod = restoreMethod; + RestartModel(p); + p->DummySee.Shift = PPMD_PERIOD_BITS; + p->DummySee.Summ = 0; /* unused */ + p->DummySee.Count = 64; /* unused */ +} + +static void Refresh(CPpmd8 *p, CTX_PTR ctx, unsigned oldNU, unsigned scale) +{ + unsigned i = ctx->NumStats, escFreq, sumFreq, flags; + CPpmd_State *s = (CPpmd_State *)ShrinkUnits(p, STATS(ctx), oldNU, (i + 2) >> 1); + ctx->Stats = REF(s); + #ifdef PPMD8_FREEZE_SUPPORT + /* fixed over Shkarin's code. Fixed code is not compatible with original code for some files in FREEZE mode. */ + scale |= (ctx->SummFreq >= ((UInt32)1 << 15)); + #endif + flags = (ctx->Flags & (0x10 + 0x04 * scale)) + 0x08 * (s->Symbol >= 0x40); + escFreq = ctx->SummFreq - s->Freq; + sumFreq = (s->Freq = (Byte)((s->Freq + scale) >> scale)); + do + { + escFreq -= (++s)->Freq; + sumFreq += (s->Freq = (Byte)((s->Freq + scale) >> scale)); + flags |= 0x08 * (s->Symbol >= 0x40); + } + while (--i); + ctx->SummFreq = (UInt16)(sumFreq + ((escFreq + scale) >> scale)); + ctx->Flags = (Byte)flags; +} + +static void SwapStates(CPpmd_State *t1, CPpmd_State *t2) +{ + CPpmd_State tmp = *t1; + *t1 = *t2; + *t2 = tmp; +} + +static CPpmd_Void_Ref CutOff(CPpmd8 *p, CTX_PTR ctx, unsigned order) +{ + int i; + unsigned tmp; + CPpmd_State *s; + + if (!ctx->NumStats) + { + s = ONE_STATE(ctx); + if ((Byte *)Ppmd8_GetPtr(p, SUCCESSOR(s)) >= p->UnitsStart) + { + if (order < p->MaxOrder) + SetSuccessor(s, CutOff(p, CTX(SUCCESSOR(s)), order + 1)); + else + SetSuccessor(s, 0); + if (SUCCESSOR(s) || order <= 9) /* O_BOUND */ + return REF(ctx); + } + SpecialFreeUnit(p, ctx); + return 0; + } + + ctx->Stats = STATS_REF(MoveUnitsUp(p, STATS(ctx), tmp = ((unsigned)ctx->NumStats + 2) >> 1)); + + for (s = STATS(ctx) + (i = ctx->NumStats); s >= STATS(ctx); s--) + if ((Byte *)Ppmd8_GetPtr(p, SUCCESSOR(s)) < p->UnitsStart) + { + CPpmd_State *s2 = STATS(ctx) + (i--); + SetSuccessor(s, 0); + SwapStates(s, s2); + } + else if (order < p->MaxOrder) + SetSuccessor(s, CutOff(p, CTX(SUCCESSOR(s)), order + 1)); + else + SetSuccessor(s, 0); + + if (i != ctx->NumStats && order) + { + ctx->NumStats = (Byte)i; + s = STATS(ctx); + if (i < 0) + { + FreeUnits(p, s, tmp); + SpecialFreeUnit(p, ctx); + return 0; + } + if (i == 0) + { + ctx->Flags = (Byte)((ctx->Flags & 0x10) + 0x08 * (s->Symbol >= 0x40)); + *ONE_STATE(ctx) = *s; + FreeUnits(p, s, tmp); + /* 9.31: the code was fixed. It's was not BUG, if Freq <= MAX_FREQ = 124 */ + ONE_STATE(ctx)->Freq = (Byte)(((unsigned)ONE_STATE(ctx)->Freq + 11) >> 3); + } + else + Refresh(p, ctx, tmp, ctx->SummFreq > 16 * i); + } + return REF(ctx); +} + +#ifdef PPMD8_FREEZE_SUPPORT +static CPpmd_Void_Ref RemoveBinContexts(CPpmd8 *p, CTX_PTR ctx, unsigned order) +{ + CPpmd_State *s; + if (!ctx->NumStats) + { + s = ONE_STATE(ctx); + if ((Byte *)Ppmd8_GetPtr(p, SUCCESSOR(s)) >= p->UnitsStart && order < p->MaxOrder) + SetSuccessor(s, RemoveBinContexts(p, CTX(SUCCESSOR(s)), order + 1)); + else + SetSuccessor(s, 0); + /* Suffix context can be removed already, since different (high-order) + Successors may refer to same context. So we check Flags == 0xFF (Stamp == EMPTY_NODE) */ + if (!SUCCESSOR(s) && (!SUFFIX(ctx)->NumStats || SUFFIX(ctx)->Flags == 0xFF)) + { + FreeUnits(p, ctx, 1); + return 0; + } + else + return REF(ctx); + } + + for (s = STATS(ctx) + ctx->NumStats; s >= STATS(ctx); s--) + if ((Byte *)Ppmd8_GetPtr(p, SUCCESSOR(s)) >= p->UnitsStart && order < p->MaxOrder) + SetSuccessor(s, RemoveBinContexts(p, CTX(SUCCESSOR(s)), order + 1)); + else + SetSuccessor(s, 0); + + return REF(ctx); +} +#endif + +static UInt32 GetUsedMemory(const CPpmd8 *p) +{ + UInt32 v = 0; + unsigned i; + for (i = 0; i < PPMD_NUM_INDEXES; i++) + v += p->Stamps[i] * I2U(i); + return p->Size - (UInt32)(p->HiUnit - p->LoUnit) - (UInt32)(p->UnitsStart - p->Text) - U2B(v); +} + +#ifdef PPMD8_FREEZE_SUPPORT + #define RESTORE_MODEL(c1, fSuccessor) RestoreModel(p, c1, fSuccessor) +#else + #define RESTORE_MODEL(c1, fSuccessor) RestoreModel(p, c1) +#endif + +static void RestoreModel(CPpmd8 *p, CTX_PTR c1 + #ifdef PPMD8_FREEZE_SUPPORT + , CTX_PTR fSuccessor + #endif + ) +{ + CTX_PTR c; + CPpmd_State *s; + RESET_TEXT(0); + for (c = p->MaxContext; c != c1; c = SUFFIX(c)) + if (--(c->NumStats) == 0) + { + s = STATS(c); + c->Flags = (Byte)((c->Flags & 0x10) + 0x08 * (s->Symbol >= 0x40)); + *ONE_STATE(c) = *s; + SpecialFreeUnit(p, s); + ONE_STATE(c)->Freq = (Byte)(((unsigned)ONE_STATE(c)->Freq + 11) >> 3); + } + else + Refresh(p, c, (c->NumStats+3) >> 1, 0); + + for (; c != p->MinContext; c = SUFFIX(c)) + if (!c->NumStats) + ONE_STATE(c)->Freq = (Byte)(ONE_STATE(c)->Freq - (ONE_STATE(c)->Freq >> 1)); + else if ((c->SummFreq += 4) > 128 + 4 * c->NumStats) + Refresh(p, c, (c->NumStats + 2) >> 1, 1); + + #ifdef PPMD8_FREEZE_SUPPORT + if (p->RestoreMethod > PPMD8_RESTORE_METHOD_FREEZE) + { + p->MaxContext = fSuccessor; + p->GlueCount += !(p->Stamps[1] & 1); + } + else if (p->RestoreMethod == PPMD8_RESTORE_METHOD_FREEZE) + { + while (p->MaxContext->Suffix) + p->MaxContext = SUFFIX(p->MaxContext); + RemoveBinContexts(p, p->MaxContext, 0); + p->RestoreMethod++; + p->GlueCount = 0; + p->OrderFall = p->MaxOrder; + } + else + #endif + if (p->RestoreMethod == PPMD8_RESTORE_METHOD_RESTART || GetUsedMemory(p) < (p->Size >> 1)) + RestartModel(p); + else + { + while (p->MaxContext->Suffix) + p->MaxContext = SUFFIX(p->MaxContext); + do + { + CutOff(p, p->MaxContext, 0); + ExpandTextArea(p); + } + while (GetUsedMemory(p) > 3 * (p->Size >> 2)); + p->GlueCount = 0; + p->OrderFall = p->MaxOrder; + } +} + +static CTX_PTR CreateSuccessors(CPpmd8 *p, Bool skip, CPpmd_State *s1, CTX_PTR c) +{ + CPpmd_State upState; + Byte flags; + CPpmd_Byte_Ref upBranch = (CPpmd_Byte_Ref)SUCCESSOR(p->FoundState); + /* fixed over Shkarin's code. Maybe it could work without + 1 too. */ + CPpmd_State *ps[PPMD8_MAX_ORDER + 1]; + unsigned numPs = 0; + + if (!skip) + ps[numPs++] = p->FoundState; + + while (c->Suffix) + { + CPpmd_Void_Ref successor; + CPpmd_State *s; + c = SUFFIX(c); + if (s1) + { + s = s1; + s1 = NULL; + } + else if (c->NumStats != 0) + { + for (s = STATS(c); s->Symbol != p->FoundState->Symbol; s++); + if (s->Freq < MAX_FREQ - 9) + { + s->Freq++; + c->SummFreq++; + } + } + else + { + s = ONE_STATE(c); + s->Freq = (Byte)(s->Freq + (!SUFFIX(c)->NumStats & (s->Freq < 24))); + } + successor = SUCCESSOR(s); + if (successor != upBranch) + { + c = CTX(successor); + if (numPs == 0) + return c; + break; + } + ps[numPs++] = s; + } + + upState.Symbol = *(const Byte *)Ppmd8_GetPtr(p, upBranch); + SetSuccessor(&upState, upBranch + 1); + flags = (Byte)(0x10 * (p->FoundState->Symbol >= 0x40) + 0x08 * (upState.Symbol >= 0x40)); + + if (c->NumStats == 0) + upState.Freq = ONE_STATE(c)->Freq; + else + { + UInt32 cf, s0; + CPpmd_State *s; + for (s = STATS(c); s->Symbol != upState.Symbol; s++); + cf = s->Freq - 1; + s0 = c->SummFreq - c->NumStats - cf; + upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((cf + 2 * s0 - 3) / s0))); + } + + do + { + /* Create Child */ + CTX_PTR c1; /* = AllocContext(p); */ + if (p->HiUnit != p->LoUnit) + c1 = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); + else if (p->FreeList[0] != 0) + c1 = (CTX_PTR)RemoveNode(p, 0); + else + { + c1 = (CTX_PTR)AllocUnitsRare(p, 0); + if (!c1) + return NULL; + } + c1->NumStats = 0; + c1->Flags = flags; + *ONE_STATE(c1) = upState; + c1->Suffix = REF(c); + SetSuccessor(ps[--numPs], REF(c1)); + c = c1; + } + while (numPs != 0); + + return c; +} + +static CTX_PTR ReduceOrder(CPpmd8 *p, CPpmd_State *s1, CTX_PTR c) +{ + CPpmd_State *s = NULL; + CTX_PTR c1 = c; + CPpmd_Void_Ref upBranch = REF(p->Text); + + #ifdef PPMD8_FREEZE_SUPPORT + /* The BUG in Shkarin's code was fixed: ps could overflow in CUT_OFF mode. */ + CPpmd_State *ps[PPMD8_MAX_ORDER + 1]; + unsigned numPs = 0; + ps[numPs++] = p->FoundState; + #endif + + SetSuccessor(p->FoundState, upBranch); + p->OrderFall++; + + for (;;) + { + if (s1) + { + c = SUFFIX(c); + s = s1; + s1 = NULL; + } + else + { + if (!c->Suffix) + { + #ifdef PPMD8_FREEZE_SUPPORT + if (p->RestoreMethod > PPMD8_RESTORE_METHOD_FREEZE) + { + do { SetSuccessor(ps[--numPs], REF(c)); } while (numPs); + RESET_TEXT(1); + p->OrderFall = 1; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***