2009-11-06 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Fri, 6 Nov 2009 07:16:05 +0000 (07:16 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:51 +0000 (21:06 +0400)
* mach_dep.c (GC_push_regs): Remove STATIC (just to catch
a duplicate symbol definition linker error).
* misc.c (GC_clear_stack_inner): Ditto.
* sparc_mach_dep.S (GC_push_regs): Comment out the reference.
* sparc_mach_dep.S: Remove trailing spaces at EOLn; remove
multiple trailing blank lines.

ChangeLog
mach_dep.c
misc.c
sparc_mach_dep.S

index dcc0f05..7a1b0a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2009-11-06  Ivan Maidanski <ivmai@mail.ru>
 
+       * mach_dep.c (GC_push_regs): Remove STATIC (just to catch
+       a duplicate symbol definition linker error).
+       * misc.c (GC_clear_stack_inner): Ditto.
+       * sparc_mach_dep.S (GC_push_regs): Comment out the reference.
+       * sparc_mach_dep.S: Remove trailing spaces at EOLn; remove
+       multiple trailing blank lines.
+
+2009-11-06  Ivan Maidanski <ivmai@mail.ru>
+
        * include/private/gc_priv.h (GC_write_disabled): New variable
        declaration (only if GC_ASSERTIONS and Win32 threads).
        * misc.c (GC_write): Add assertion for GC_write_disabled value is
index 24d3332..7a8ebc5 100644 (file)
@@ -83,7 +83,10 @@ asm static void PushMacRegisters()
 #else  /* No asm implementation */
 
 # if defined(M68K) && defined(AMIGA)
-    STATIC void GC_push_regs(void)
+    /* This function is not static because it could also be             */
+    /* errorneously defined in .S file, so this error would be caught   */
+    /* by the linker.                                                   */
+    void GC_push_regs(void)
     {
          /*  AMIGA - could be replaced by generic code                  */
          /* a0, a1, d0 and d1 are caller save */
@@ -131,7 +134,7 @@ asm static void PushMacRegisters()
 #     define PushMacReg(reg) \
               move.l  reg,(sp) \
               jsr             GC_push_one
-      STATIC void GC_push_regs(void)
+      void GC_push_regs(void)
       {
           asm {
               sub.w   #4,sp          ; reserve space for one parameter.
@@ -151,7 +154,7 @@ asm static void PushMacRegisters()
 #     define HAVE_PUSH_REGS
 #     undef PushMacReg
 #   elif defined(__MWERKS__)
-      STATIC void GC_push_regs(void)
+      void GC_push_regs(void)
       {
           PushMacRegisters();
       }
diff --git a/misc.c b/misc.c
index 4254096..3cec690 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -237,9 +237,11 @@ GC_INNER void GC_extend_size_map(size_t i)
 #if defined(ASM_CLEAR_CODE)
   void *GC_clear_stack_inner(void *, ptr_t);
 #else
-  /* Clear the stack up to about limit.  Return arg. */
+  /* Clear the stack up to about limit.  Return arg.  This function is  */
+  /* not static because it could also be errorneously defined in .S     */
+  /* file, so this error would be caught by the linker.                 */
   /*ARGSUSED*/
-  STATIC void * GC_clear_stack_inner(void *arg, ptr_t limit)
+  void * GC_clear_stack_inner(void *arg, ptr_t limit)
   {
     word dummy[CLEAR_SIZE];
 
index e8ad655..3920a00 100644 (file)
@@ -6,7 +6,7 @@
 
        .seg    "text"
        .globl  GC_save_regs_in_stack
-       .globl  GC_push_regs
+!      .globl  GC_push_regs
 GC_save_regs_in_stack:
 #if defined(__arch64__) || defined(__sparcv9)
        save    %sp,-128,%sp
@@ -21,12 +21,11 @@ GC_save_regs_in_stack:
 #endif /* 32 bit SPARC */
 .GC_save_regs_in_stack_end:
        .size GC_save_regs_in_stack,.GC_save_regs_in_stack_end-GC_save_regs_in_stack
-       
 
 ! GC_clear_stack_inner(arg, limit) clears stack area up to limit and
 ! returns arg.  Stack clearing is crucial on SPARC, so we supply
 ! an assembly version that s more careful.  Assumes limit is hotter
-! than sp, and limit is 8 byte aligned.        
+! than sp, and limit is 8 byte aligned.
        .globl  GC_clear_stack_inner
 GC_clear_stack_inner:
 #if defined(__arch64__) || defined(__sparcv9)
@@ -42,7 +41,7 @@ loop:
        bgu,pt %xcc, loop       ! if (p > limit) goto loop
           add %o3,-8,%o3       ! p -= 8 (delay slot)
        retl
-         mov %o2,%sp           ! Restore sp., delay slot       
+         mov %o2,%sp           ! Restore sp., delay slot
 #else  /* 32 bit SPARC */
        mov     %sp,%o2         ! Save sp
        add     %sp,-8,%o3      ! p = sp-8
@@ -61,10 +60,3 @@ loop:
 #endif  /* 32 bit SPARC */
 .GC_clear_stack_inner_end:
        .size GC_clear_stack_inner,.GC_clear_stack_inner_end-GC_clear_stack_inner
-
-       
-               
-               
-               
-               
-