From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7920A3858401; Wed, 12 Jul 2023 12:17:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7920A3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689164269; bh=MDaevXog5luYs6OtUsqMdz8WrG+r70LwFR5GuLi594o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IIkM29lUPvvI9xyK8Vm5zqjwbTLzB+WZIIpqO6ynL9BE5BbRTl8tNAIYgL3dCQ0qT PB6Df1UxsmARiDU2oVy4xqqgoN/vM60TIPrz18Dts2XFzFnFYAw0BTspmJR22kaM9j U3VogbWgJG10sHgew1xXBnOdXx8km4xKxQj5fzaI= From: "campbell+gcc-bugzilla at mumble dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110592] [SPARC] GCC should default to TSO memory model when compiling for sparc32 Date: Wed, 12 Jul 2023 12:17:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: campbell+gcc-bugzilla at mumble dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110592 --- Comment #7 from Taylor R Campbell --- > Sorry, no, NetBSD/sparc is too obscure a platform to justify changing the > default for the entire compiler. But you can do like Linux & Solaris and > add sparc/tso.h to the tm_file list of sparc-*-netbsdelf*) in config.gcc. I don't understand, how would that help? As I understand it, whenever `-mcpu=3Dv7', the memory model is just ignored -- even if we set it to TSO = -- because all rules that depend on it are gated on TARGET_V8 || TARGET_V9 or similar. I'm not asking for you to change defaults in Linux or Solaris -- I'm just asking to be _able_ to say `-mcpu=3Dv7 -mmemory-model=3Dtso' and get v7-only instruction streams with the LDSTUBs needed for TSO. Right now, with `-mcpu=3Dv7', passing `-mmemory-model=3Dtso' has no effect.=