From owner-freebsd-bugs@freebsd.org Sun Nov 10 02:42:48 2019 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 134FD1A7816 for ; Sun, 10 Nov 2019 02:42:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 479dbC5mDrz4Rp6 for ; Sun, 10 Nov 2019 02:42:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id C3F5B1A7815; Sun, 10 Nov 2019 02:42:47 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3BB01A7814 for ; Sun, 10 Nov 2019 02:42:47 +0000 (UTC) (envelope-from bugzilla-noreply@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 479dbC4pHXz4Rp5 for ; Sun, 10 Nov 2019 02:42:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 8837120644 for ; Sun, 10 Nov 2019 02:42:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id xAA2glPo013221 for ; Sun, 10 Nov 2019 02:42:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id xAA2glQ3013220 for bugs@FreeBSD.org; Sun, 10 Nov 2019 02:42:47 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 233405] sparc64: DWARF unwinder required for GCC 4.2.1 retirement Date: Sun, 10 Nov 2019 02:42:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cem@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2019 02:42:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233405 --- Comment #9 from Conrad Meyer --- More "necessary but not sufficient" IAS support (needed to compile libc). --- contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (revision 354566) +++ contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (working co= py) @@ -815,7 +815,7 @@ Parser.getTok().getLoc())= ); Parser.Lex(); // Eat the [ - if (Mnemonic =3D=3D "cas" || Mnemonic =3D=3D "casx" || Mnemonic =3D=3D= "casa") { + if (Mnemonic =3D=3D "cas" || Mnemonic =3D=3D "casx" || Mnemonic =3D=3D= "casa" || Mnemonic =3D=3D "casxa") { SMLoc S =3D Parser.getTok().getLoc(); if (getLexer().getKind() !=3D AsmToken::Percent) return MatchOperand_NoMatch; @@ -1014,7 +1014,22 @@ return true; } - // %fprs is an alias of %asr6. + // %asrN aliases. + if (name.equals("ccr")) { + RegNo =3D ASRRegs[2]; + RegKind =3D SparcOperand::rk_Special; + return true; + } + if (name.equals("asi")) { + RegNo =3D ASRRegs[3]; + RegKind =3D SparcOperand::rk_Special; + return true; + } + if (name.equals("pc")) { + RegNo =3D ASRRegs[5]; + RegKind =3D SparcOperand::rk_Special; + return true; + } if (name.equals("fprs")) { RegNo =3D ASRRegs[6]; RegKind =3D SparcOperand::rk_Special; --- contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td (revision 354566) +++ contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td (working copy) @@ -495,6 +495,15 @@ } // Predicates =3D [Is64Bit], Constraints =3D ... +// CASX with explicit ASI; ASM-only, LLVM doesn't grok ASIs, etc, etc. +let Predicates =3D [Is64Bit], Constraints =3D "$swap =3D $rd" in { + def CASXArr: F3_1_asi<3, 0b111110, + (outs I64Regs:$rd), (ins I64Regs:$rs1, i8imm:$asi, + I64Regs:$rs2, I64Regs:$swap), + "casxa [$rs1] $asi, $rs2, $rd", + []>; +} + let Predicates =3D [Is64Bit] in { def : Pat<(atomic_fence imm, imm), (MEMBARi 0xf)>; --- contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td (revision 354566) +++ contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td (working copy) @@ -477,6 +477,8 @@ // unimp -> unimp 0 def : InstAlias<"unimp", (UNIMP 0), 0>; +// illtrap -> unimp (same instruction, FreeBSD .S uses illtrap) +def : MnemonicAlias<"illtrap", "unimp">; def : MnemonicAlias<"iflush", "flush">; @@ -492,6 +494,9 @@ def : MnemonicAlias<"stuha", "stha">; def : MnemonicAlias<"stsha", "stha">; +// V8 ST renamed to STW in V9 (equivalent) (also: stuw, stsw, but we don't= use those) +def : MnemonicAlias<"stw", "st">; + def : MnemonicAlias<"lduw", "ld">, Requires<[HasV9]>; def : MnemonicAlias<"lduwa", "lda">, Requires<[HasV9]>; Still runs into linking issues (using LLD) *very* early on (and ld.bfd segfaults). LLD.SPARC doesn't grok symbolic R_SPARC_64 relocations in shar= ed libraries (used by self-referential __dso_handle pointer in CRT), doesn't g= rok GOT, and doesn't grok TLS relocations. This probably needs someone with an intimate knowledge of at least two out of three of: SPARCV9, LLD, and ELF loader/linker model. (Not to mention: time, and caring about 15-20 year old dead hardware.) --=20 You are receiving this mail because: You are the assignee for the bug.=