[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: toolchain, was Re: bogl: don't know screen type 1



On Sat, 5 Sep 2009, Maxim Kuvyrkov wrote:

> Finn Thain wrote:
> ...
> 
> > I understand that the current GCC (4.4) lacks the necessary patches, 
> > and 4.5 is still uncooked (and that's a scary prospect). Can someone 
> > confirm that this is the necessary patch for 4.4: 
> > http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01024.html
> 
> I think GCC 4.4 should be good enough.

I tried patching 4.4.1 and the patch was rejected. It expects 
m68k_legitimize_address() to have been declared and defined, but that 
routine isn't in gcc-4.4.

So, I edited the patch (see diff below). What bothers me is that this 
removes the call to the new m68k_tls_symbol_p() routine:

../../gcc-4.4.1/gcc/config/m68k/m68k.c: At top level:
../../gcc-4.4.1/gcc/config/m68k/m68k.c:2553: warning: 'm68k_tls_symbol_p' defined but not used

The compiler appears to work, but I haven't run any executable it produced 
as yet. When we get eglibc-2.10 I plan to run the testsuites on '040 
hardware, which is going to take a long time to complete. It would be nice 
to know in advance whether this naive attempt at a backport is likely to 
work or not (?)

Finn



--- gcc-m68k-support-for-tls.patch	2009-09-13 13:16:03.475546800 +1000
+++ gcc-m68k-support-for-tls-backport.patch	2009-09-13 13:16:03.475546800 +1000
@@ -574,12 +574,11 @@
  
  enum reg_class regno_reg_class[] =
  {
-@@ -143,11 +144,13 @@ static tree m68k_handle_fndecl_attribute
+@@ -143,10 +144,12 @@ static tree m68k_handle_fndecl_attribute
  static void m68k_compute_frame_layout (void);
  static bool m68k_save_reg (unsigned int regno, bool interrupt_handler);
  static bool m68k_ok_for_sibcall_p (tree, tree);
 +static bool m68k_tls_symbol_p (rtx);
- static rtx m68k_legitimize_address (rtx, rtx, enum machine_mode);
  static bool m68k_rtx_costs (rtx, int, int, int *, bool);
  #if M68K_HONOR_TARGET_STRICT_ALIGNMENT
  static bool m68k_return_in_memory (const_tree, const_tree);
@@ -613,16 +612,6 @@
        && crtl->uses_pic_offset_table)
      insn = emit_insn (gen_load_got (pic_offset_table_rtx));
  }
-@@ -1431,6 +1441,9 @@ m68k_legitimize_sibcall_address (rtx x)
- rtx
- m68k_legitimize_address (rtx x, rtx oldx, enum machine_mode mode)
- {
-+  if (m68k_tls_symbol_p (x))
-+    return m68k_legitimize_tls_address (x);
-+
-   if (GET_CODE (x) == PLUS)
-     {
-       int ch = (x) != (oldx);
 @@ -1849,7 +1862,7 @@ m68k_illegitimate_symbolic_constant_p (r
  	  && !offset_within_block_p (base, INTVAL (offset)))
  	return true;


Reply to: