This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in expand_builtin_setjmp_receiver ?


On Tue, Oct 26, 2010 at 01:07:26PM +0100, Jon Beniston wrote:
> > lm32 has a gdb simulator available, so it should be fairly easy to write
> > a board file for it if one doesn't already exist.
> > 
> > Unfortunately, building lm32-elf is broken in several different ways
> > right now.
> 
> What problems do you have building lm32-elf? If you let me know, I can try
> to look in to them.

At least INCOMING_RETURN_ADDR_RTX and TARGET_EXCEPT_UNWIND_INFO need to
be defined, as in the below patch (not sure about the definition of
INCOMING_RETURN_ADDR_RTX).  I think even with those defined, compiling
libgcc ICEs, though I don't remember the details.

-Nathan

diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c
index 671f0e1..b355309 100644
--- a/gcc/config/lm32/lm32.c
+++ b/gcc/config/lm32/lm32.c
@@ -100,6 +100,9 @@ static void lm32_option_override (void);
 #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;
 
 /* Current frame information calculated by lm32_compute_frame_size.  */
diff --git a/gcc/config/lm32/lm32.h b/gcc/config/lm32/lm32.h
index b0c2d59..4c63e94 100644
--- a/gcc/config/lm32/lm32.h
+++ b/gcc/config/lm32/lm32.h
@@ -249,6 +249,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)
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]