This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ARM bug
- To: Rod Stewart <stewart at nexus dot carleton dot ca>
- Subject: ARM bug
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 18 Mar 2001 18:05:39 -0800
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
OK, this is pretty strange.
Given this code in integrate.c:
else if (GET_CODE (loc) == REG)
{
/* The function returns an object in a register and we use the return
value. Set up our target for remapping. */
/* Machine mode function was declared to return. */
enum machine_mode departing_mode = TYPE_MODE (type);
/* (Possibly wider) machine mode it actually computes
(for the sake of callers that fail to declare it right).
We have to use the mode of the result's RTL, rather than
its type, since expand_function_start may have promoted it. */
enum machine_mode arriving_mode
= GET_MODE (DECL_RTL (DECL_RESULT (fndecl)));
this is what's coming out:
cmp r2, #57
bne .L380
and r3, r3, #255
mov r1, r6
mov r5, r3, lsr #1
bl make_decl_rtl
The comparison is the `GET_CODE (loc) == REG' bit; the code for REG is
57.
Then, as far as I can tell, we unconditionally call make_decl_rtl,
despite the conditional in DECL_RTL's definition. If this rings bells
for anyone, let me know; otherwise, I'll keep on trying to figure out
what's going on.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com