- To: Ayonam Ray <ayonam@xxxxxxxxx>
- Subject: Re: Preventing scheduling of normal operations across calls to built-ins
- From: Ian Lance Taylor <iant@xxxxxxxxxx>
- Date: Tue, 21 Feb 2012 10:54:04 -0800
- Authentication-results: mr.google.com; spf=pass (google.com: domain of iant@xxxxxxxxxx designates 10.229.135.11 as permitted sender) smtp.mail=iant@xxxxxxxxxx; dkim=pass header.i=iant@xxxxxxxxxx
- Cc: gcc-help@xxxxxxxxxxx
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1330455274; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Received-SPF:Received:Received:Received:Received:From:To:Cc: Subject:References:Date:In-Reply-To:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=1ia0s99Ee4P67FVkdwjjqHvT8Ac=; b=YN3B+29Gd/q3qyI YPD4awy8oifQREeHMCpQf6OHJRUxFaN+CDi5mY8FXx7iMfBZKnqbho3Ig0hU+W10 ODPCIZeSFHdWNW2vXcsESk5Sq/I7XhJUVzcfJa1RXL3U5dZ2tvMdzz6PCHDQb3e4 HwI/enLla3rrfXtkWjiQyASWbRJ0=
- In-reply-to: <CA+V5N8mFanPGZh7Wd3NLH-XtKpMjk2UqGnE0EdEn=sdOyHgNsg@mail.gmail.com> (Ayonam Ray's message of "Tue, 21 Feb 2012 22:53:25 +0530")
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Ayonam Ray <ayonam@xxxxxxxxx> writes:
> Register r0 is set to zero as per software conventions. Hence, it is
> made a fixed register.
If r0 is a fixed 0, then you should never set it to anything else in
RTL. Doing so will inhibit some optimizations. You should invent a new
register, one that does not exist in hardware, for this purpose.
> (define_insn "mvc_to_ccr"
> [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "=Y")
> (match_operand:SI 1 "register_operand" "r")]
> UNSPEC_MVC_TO_CCR)
> (set (reg:SI 0) (unspec_volatile [(reg:SI 0)]UNSPEC_CCR))]
> ""
> (insn 15 14 16 g.c:980 (parallel [
> (unspec_volatile:SI [
> (reg:SI 98 ccr8)
> (reg:SI 124)
> ] 28)
> (set (reg:SI 1 r1)
> (const_int 0 [0x0]))
> ]) -1 (nil))
The define_insn says (set (reg:SI 0) (unspec_volatile ...)). The RTL
dump says (set (reg:SI 1) (const_int 0)). Why the difference?
> P.S.: Are attachments allowed on the GCC mailing lists?
I think so, but they can't be too large.
Ian
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]