summaryrefslogtreecommitdiff
path: root/gcc/config/lm32
diff options
context:
space:
mode:
authorlekernel <lekernel@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-25 19:24:20 +0000
committerlekernel <lekernel@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-25 19:24:20 +0000
commita965af21af8f1334c17d33fbf27b4d4e1a5a0438 (patch)
tree70e8b7cb542d9794deeeb59f2ff6002faaa9721a /gcc/config/lm32
parentb00fa2cfbfd81cbdc31d5a44e4ce8140cc153776 (diff)
downloadgcc-a965af21af8f1334c17d33fbf27b4d4e1a5a0438.tar.gz
2011-02-25 Sebastien Bourdeauducq <sebastien@milkymist.org>
PR gcc/46898 * config/lm32/lm32.md (ashrsi3): Added needed variable. 2011-02-25 Jon Beniston <jon@beniston.com> PR gcc/46898 * config/lm32/lm32.h (INCOMING_RETURN_ADDR_RTX): New. * config/lm32/lm32.md (ashlsi3): Remove unused variable. * config/lm32/lm32.c (TARGET_EXCEPT_UNWIND_INFO): New. (lm32_block_move_inline): Add type cast to remove warning. (lm32_expand_prologue): Generate fp in a way compatible with dwarf2out. (gen_int_relational): Move declarations to start of function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/lm32')
-rw-r--r--gcc/config/lm32/lm32.c26
-rw-r--r--gcc/config/lm32/lm32.h2
-rw-r--r--gcc/config/lm32/lm32.md1
3 files changed, 18 insertions, 11 deletions
diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c
index 05888ee5289..2c7131a5dfc 100644
--- a/gcc/config/lm32/lm32.c
+++ b/gcc/config/lm32/lm32.c
@@ -117,6 +117,8 @@ static const struct default_options lm32_option_optimization_table[] =
#define TARGET_CAN_ELIMINATE lm32_can_eliminate
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P lm32_legitimate_address_p
+#undef TARGET_EXCEPT_UNWIND_INFO
+#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
struct gcc_target targetm = TARGET_INITIALIZER;
@@ -174,6 +176,9 @@ gen_int_relational (enum rtx_code code,
{
enum machine_mode mode;
int branch_p;
+ rtx temp;
+ rtx cond;
+ rtx label;
mode = GET_MODE (cmp0);
if (mode == VOIDmode)
@@ -389,18 +394,17 @@ lm32_expand_prologue (void)
/* Setup frame pointer if it's needed. */
if (frame_pointer_needed == 1)
{
- /* Load offset - Don't use total_size, as that includes pretend_size,
- which isn't part of this frame? */
- insn =
- emit_move_insn (frame_pointer_rtx,
- GEN_INT (current_frame_info.args_size +
- current_frame_info.callee_size +
- current_frame_info.locals_size));
- RTX_FRAME_RELATED_P (insn) = 1;
+ /* Move sp to fp. */
+ insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx);
+ RTX_FRAME_RELATED_P (insn) = 1;
- /* Add in sp. */
- insn = emit_add (frame_pointer_rtx,
- frame_pointer_rtx, stack_pointer_rtx);
+ /* Add offset - Don't use total_size, as that includes pretend_size,
+ which isn't part of this frame? */
+ insn = emit_add (frame_pointer_rtx,
+ frame_pointer_rtx,
+ GEN_INT (current_frame_info.args_size +
+ current_frame_info.callee_size +
+ current_frame_info.locals_size));
RTX_FRAME_RELATED_P (insn) = 1;
}
diff --git a/gcc/config/lm32/lm32.h b/gcc/config/lm32/lm32.h
index 63f1096b9cf..3141719b4a5 100644
--- a/gcc/config/lm32/lm32.h
+++ b/gcc/config/lm32/lm32.h
@@ -239,6 +239,8 @@ enum reg_class
#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
+#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RA_REGNUM)
+
#define RETURN_ADDR_RTX(count, frame) \
lm32_return_addr_rtx (count, frame)
diff --git a/gcc/config/lm32/lm32.md b/gcc/config/lm32/lm32.md
index 7a3769cc4c6..7539cb065c4 100644
--- a/gcc/config/lm32/lm32.md
+++ b/gcc/config/lm32/lm32.md
@@ -824,6 +824,7 @@
{
int i;
int shifts = INTVAL (operands[2]);
+ rtx one = GEN_INT (1);
if (shifts == 0)
emit_move_insn (operands[0], operands[1]);