From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Ulrich Weigand'" <uweigand@de.ibm.com>,
"'Daniel Jacobowitz'" <dan@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: [RFC] About arm-tdep.c arm_in_function_epilogue_p function
Date: Sun, 14 Nov 2010 12:19:00 -0000 [thread overview]
Message-ID: <002701cb83f6$30b394e0$921abea0$@muller@ics-cnrs.unistra.fr> (raw)
In the second part of that function,
for which II just committed an obvious
compilation failure fix, I found something
strange:
found_stack_adjust = 0;
insn = read_memory_unsigned_integer (pc - 4, 4, byte_order_for_code);
if (bits (insn, 28, 31) != INST_NV)
{
if ((insn & 0x0df0f000) == 0x0080d000)
/* ADD SP (register or immediate). */
found_stack_adjust = 1;
else if ((insn & 0x0df0f000) == 0x0040d000)
/* SUB SP (register or immediate). */
found_stack_adjust = 1;
else if ((insn & 0x0ffffff0) == 0x01a0d000)
/* MOV SP. */
>>> This line seems weird:
>>> why should a MOV SP be considered as a return?
>>> It should rather be a change in stack, no?
>>> (but I know about nothing about ARM instructions...)
>>> Furthermore, found_return isn't used
>>> anymore in that function.
>>> Isn't the correct code
>>> found_stack_adjust = 1;
found_return = 1;
else if ((insn & 0x0fff0000) == 0x08bd0000)
/* POP (LDMIA). */
found_stack_adjust = 1;
}
if (found_stack_adjust)
return 1;
return 0;
}
Ulrich or Daniel,
could one of you two check this and
commit a fix if I am right?
Thanks in advance,
Pierre Muller
GDB pascal language maintainer
next reply other threads:[~2010-11-14 12:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-14 12:19 Pierre Muller [this message]
2010-11-16 0:04 ` Daniel Jacobowitz
2010-11-18 11:07 ` Pierre Muller
2010-11-18 13:27 ` Richard Earnshaw
2010-11-18 13:43 ` [RFA] " Pierre Muller
2010-11-18 13:56 ` Richard Earnshaw
2010-11-19 8:10 ` Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002701cb83f6$30b394e0$921abea0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=dan@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox