Bug 19065 - Make CRIS libstdc++ asms autoincrement-safe
Summary: Make CRIS libstdc++ asms autoincrement-safe
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Hans-Peter Nilsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-18 00:39 UTC by Hans-Peter Nilsson
Modified: 2005-03-01 15:23 UTC (History)
1 user (show)

See Also:
Host:
Target: cris-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-12-18 00:40:27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2004-12-18 00:39:24 UTC
This is a FIXME that I need to free a constraint letter (probably the existing
R) as a constraint for (MEM reg), or more to the point, a side-effect-free
memory constraint: the libstdc++ asms are buggy and could get autoincrement. 

Actually, there should be a generic constraint letter for that: just as "V" is
disjoint to "o", there needs to be a disjunction for "<>".
You may think so, but "o" is not always usable for this case.
Comment 1 GCC Commits 2005-02-28 02:21:51 UTC
Subject: Bug 19065

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hp@gcc.gnu.org	2005-02-28 02:21:40

Modified files:
	gcc            : ChangeLog 
	gcc/config/cris: cris.h cris.md 

Log message:
	PR target/19065.
	* config/cris/cris.h (EXTRA_CONSTRAINT_Q): Accept only (mem (reg)),
	not including (reg). Do not check for reg being CRIS_PC_REGNUM.
	(EXTRA_MEMORY_CONSTRAINT): Define as 'Q'.
	* config/cris/cris.md: Tweak comments referring to Q.
	("cmpsi", "cmphi", "cmpqi", "*movsi_internal", "movhi")
	("movstricthi", "movqi", "movstrictqi", "movsf", "addsi3")
	("addhi3", "addqi3", "subsi3", "subhi3", "subqi3")
	("*expanded_andsi", "*expanded_andhi", "*andhi_lowpart", "andqi3")
	("*andqi_lowpart", "iorsi3", "iorhi3", "iorqi3", "uminsi3"):
	Insert spaces in constraints to align alternatives vertically for
	readability.
	("cmphi"): Ditto.  Add separate alternative for operand 0 "Q>",
	operand 1: "M".

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7606&r2=2.7607
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/cris/cris.h.diff?cvsroot=gcc&r1=1.84&r2=1.85
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/cris/cris.md.diff?cvsroot=gcc&r1=1.22&r2=1.23

Comment 2 GCC Commits 2005-02-28 02:33:48 UTC
Subject: Bug 19065

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hp@gcc.gnu.org	2005-02-28 02:33:40

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/config/cpu/cris: atomicity.h 

Log message:
	PR target/19065
	* config/cpu/cris/atomicity.h (__exchange_and_add): In asm, use
	'Q' constraint, not 'm'.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2919&r2=1.2920
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/cpu/cris/atomicity.h.diff?cvsroot=gcc&r1=1.6&r2=1.7

Comment 3 Hans-Peter Nilsson 2005-02-28 02:50:32 UTC
Fixed, see <URL:http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01769.html> and
<URL:http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01770.html>.  But see also PR
20242.
Comment 4 GCC Commits 2005-03-01 14:57:38 UTC
Subject: Bug 19065

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	hp@gcc.gnu.org	2005-03-01 14:57:25

Modified files:
	gcc            : ChangeLog 
	gcc/config/cris: cris.h cris.md 

Log message:
	PR target/19065.
	* config/cris/cris.h (EXTRA_CONSTRAINT_Q): Accept only (mem (reg)),
	not including (reg). Do not check for reg being CRIS_PC_REGNUM.
	(EXTRA_MEMORY_CONSTRAINT): Define as 'Q'.
	* config/cris/cris.md: Tweak comments referring to Q.
	("cmpsi", "cmphi", "cmpqi", "*movsi_internal", "movhi")
	("movstricthi", "movqi", "movstrictqi", "movsf", "addsi3")
	("addhi3", "addqi3", "subsi3", "subhi3", "subqi3")
	("*expanded_andsi", "*expanded_andhi", "*andhi_lowpart", "andqi3")
	("*andqi_lowpart", "iorsi3", "iorhi3", "iorqi3", "uminsi3"):
	Insert spaces in constraints to align alternatives vertically for
	readability.
	("cmphi"): Ditto.  Add separate alternative for operand 0 "r",
	operand 1: "M".

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.13&r2=2.7592.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/cris/cris.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.84&r2=1.84.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/cris/cris.md.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.22&r2=1.22.2.1

Comment 5 GCC Commits 2005-03-01 15:11:49 UTC
Subject: Bug 19065

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	hp@gcc.gnu.org	2005-03-01 15:10:41

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/config/cpu/cris: atomicity.h 

Log message:
	PR target/19065
	* config/cpu/cris/atomicity.h (__exchange_and_add): In asm, use
	'Q' constraint, not 'm'.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.2917.2.1&r2=1.2917.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/cpu/cris/atomicity.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.6&r2=1.6.46.1

Comment 6 GCC Commits 2005-03-01 15:14:36 UTC
Subject: Bug 19065

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hp@gcc.gnu.org	2005-03-01 15:14:25

Modified files:
	gcc            : ChangeLog 

Log message:
	Correct cmphi comment in PR target/19065 change

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7623&r2=2.7624