swarm-support
[Top][All Lists]
Advanced

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

Re: Swarm 2.2 pretest


From: Marcus G. Daniels
Subject: Re: Swarm 2.2 pretest
Date: 04 Sep 2001 23:44:31 -0600
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.7

>>>>> "PJ" == Paul Johnson <address@hidden> writes:

PJ> would you please let me see the patch you applied to gcc-3.0.1? 
PJ> I cannot get the patch you made us for gcc-3.0 to apply to 3.0.1.

Yeah, apply it like this:

$ cd gcc-3.0.1/gcc/objc
$ patch < gcc-3.0.1-objc-patch


$ cat gcc-3.0.1-objc-patch
*** objc-act.c  Fri Jun 29 13:20:43 2001
--- objc-act.c-new      Mon Sep  3 09:43:06 2001
***************
*** 6807,6813 ****
        if (TYPE_MODE (type) == SFmode)
        obstack_1grow (&util_obstack, 'f');
        else if (TYPE_MODE (type) == DFmode
!              || TYPE_MODE (type) == TFmode)
        obstack_1grow (&util_obstack, 'd');
      }
  
--- 6807,6813 ----
        if (TYPE_MODE (type) == SFmode)
        obstack_1grow (&util_obstack, 'f');
        else if (TYPE_MODE (type) == DFmode
!              || TYPE_MODE (type) == TFmode || TYPE_MODE (type) == XFmode)
        obstack_1grow (&util_obstack, 'd');
      }
  
***************
*** 7119,7125 ****
    char *buf;
  
    /* Synth the storage class & assemble the return type.  */
!   sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE);
    ret_spec = TREE_PURPOSE (TREE_TYPE (method));
    decl_specs = chainon (sc_spec, ret_spec);
  
--- 7119,7125 ----
    char *buf;
  
    /* Synth the storage class & assemble the return type.  */
!   sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_EXTERN], NULL_TREE);
    ret_spec = TREE_PURPOSE (TREE_TYPE (method));
    decl_specs = chainon (sc_spec, ret_spec);
  
***************
*** 8362,8369 ****
--- 8362,8398 ----
        pushdecl (decl);
        rest_of_decl_compilation (decl, 0, 0, 0);
  
+ #if 1
+       {
+         char *string_ref = (char *) alloca (strlen (string) + 5);
+         tree refdecl;
+ 
+         sprintf (string_ref, "%s_ref", string);
+ 
+         refdecl = build_decl (VAR_DECL,
+                               get_identifier (string_ref),
+                               const_ptr_type_node);
+ 
+         TREE_PUBLIC (refdecl) = 0;
+         TREE_STATIC (refdecl) = 1;
+         TREE_READONLY (refdecl) = 1;
+         TREE_CONSTANT (refdecl) = 1;
+         DECL_CONTEXT (refdecl) = NULL_TREE;
+         DECL_ARTIFICIAL (refdecl) = 1;
+         exp = build1 (ADDR_EXPR, string_type_node, decl);
+         DECL_INITIAL (refdecl) = exp;
+ 
+         make_decl_rtl (refdecl, 0);
+         assemble_variable (refdecl, 1, 0, 0);
+       }
+ #else  
+ #ifdef __hpux__
        /* Put the decl in the variable section.  It may need relocation.  */
        variable_section (decl, 1);
+ #else
+       /* Make following constant read-only (why not)?  */
+       readonly_data_section ();
+ #endif
  
        exp = build1 (ADDR_EXPR, string_type_node, decl);
  
***************
*** 8375,8380 ****
--- 8404,8410 ----
  
        /* Output a constant to reference this address.  */
        output_constant (exp, int_size_in_bytes (string_type_node));
+ #endif
      }
    else
      {
***************
*** 8414,8424 ****
--- 8444,8475 ----
  
        else
        {
+ #if 0
          sprintf (string, "%sobjc_class_name_%s",
                   (flag_next_runtime ? "." : "__"), class_name);
+ #ifdef __hpux__
          readonly_data_section ();
+ #endif
          assemble_global (string);
          assemble_label (string);
+ #else
+           tree decl;
+           sprintf (string, "%sobjc_class_name_%s",
+                    (flag_next_runtime ? "." : "__"), class_name);
+ 
+           decl = build_decl (VAR_DECL,
+                              get_identifier (string),
+                              integer_type_node);
+ 
+           TREE_PUBLIC (decl) = 1;
+           TREE_READONLY (decl) = 1;
+           TREE_CONSTANT (decl) = 1;
+           DECL_CONTEXT (decl) = 0;
+           DECL_SIZE (decl) = 1;
+           DECL_ARTIFICIAL (decl) = 1;
+           make_decl_rtl (decl, 0);
+           assemble_variable (decl, 1, 0, 0); 
+ #endif
        }
      }
  
***************
*** 8448,8459 ****
--- 8499,8534 ----
  
        else
        {
+ #if 0
          sprintf (string, "%sobjc_category_name_%s_%s",
                   (flag_next_runtime ? "." : "__"),
                   class_name, class_super_name);
+ #ifdef __hpux__
          readonly_data_section ();
+ #endif
          assemble_global (string);
          assemble_label (string);
+ #else
+           tree decl;
+ 
+           sprintf (string, "%sobjc_category_name_%s_%s",
+                    (flag_next_runtime ? "." : "__"),
+                    class_name, class_super_name);
+ 
+           decl = build_decl (VAR_DECL,
+                              get_identifier (string),
+                              integer_type_node);
+ 
+           TREE_PUBLIC (decl) = 1;
+           TREE_READONLY (decl) = 1;
+           TREE_CONSTANT (decl) = 1;
+           DECL_CONTEXT (decl) = 0;
+         DECL_SIZE (decl) = 1;
+           DECL_ARTIFICIAL (decl) = 1;
+ 
+           make_decl_rtl (decl, 0);
+           assemble_variable (decl, 1, 0, 0);
+ #endif
        }
      }
  }

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]