OSDN Git Service

libffi:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Oct 2003 18:37:22 +0000 (18:37 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Oct 2003 18:37:22 +0000 (18:37 +0000)
* src/mips/ffi.c: Use _ABIN32, _ABIO32 instead of external
_MIPS_SIM_NABI32, _MIPS_SIM_ABI32.

libstdc++-v3:
* config/cpu/mips/atomicity.h (__atomic_add): Use _ABIO32 instead
of external _MIPS_SIM_ABI32.

boehm-gc:
* mips_sgi_mach_dep.s: Use _ABIO32 instead of external
_MIPS_SIM_ABI32.

gcc:
* config/mips/linux.h (TARGET_OS_CPP_BUILTINS): Define _ABIO32.
Use it in _MIPS_SIM definition.
* config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72713 138bc75d-0d04-0410-961f-82ee72b054a4

boehm-gc/ChangeLog
boehm-gc/mips_sgi_mach_dep.s
gcc/ChangeLog
gcc/config/mips/linux.h
gcc/config/mips/mips.h
libffi/ChangeLog
libffi/src/mips/ffi.c
libstdc++-v3/ChangeLog
libstdc++-v3/config/cpu/mips/atomicity.h

index 60e4cfa..5f5c2c0 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * mips_sgi_mach_dep.s: Use _ABIO32 instead of external
+       _MIPS_SIM_ABI32.
+
 2003-10-18  Alan Modra  <amodra@bigpond.net.au>
 
        * include/private/gcconfig.h (ALIGNMENT <powerpc linux>): Remove
 2003-10-18  Alan Modra  <amodra@bigpond.net.au>
 
        * include/private/gcconfig.h (ALIGNMENT <powerpc linux>): Remove
index 5639028..cadacf5 100644 (file)
@@ -24,7 +24,7 @@
 #   endif
     SAVE_GP(GPOFF)
     REG_S      ra,RAOFF(sp)
 #   endif
     SAVE_GP(GPOFF)
     REG_S      ra,RAOFF(sp)
-#   if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#   if (_MIPS_SIM == _ABIO32)
        call_push($2)
        call_push($3)
 #   endif
        call_push($2)
        call_push($3)
 #   endif
index 5abaefd..6219b28 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * config/mips/linux.h (TARGET_OS_CPP_BUILTINS): Define _ABIO32.
+       Use it in _MIPS_SIM definition.
+       * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Likewise.
+
 2003-10-20  Zack Weinberg  <zack@codesourcery.com>
 
        * config/i386/i386.c (print_reg): Abort if REGNO (x) is a
 2003-10-20  Zack Weinberg  <zack@codesourcery.com>
 
        * config/i386/i386.c (print_reg): Abort if REGNO (x) is a
index de7286d..1785a14 100644 (file)
@@ -81,7 +81,8 @@ Boston, MA 02111-1307, USA.  */
       }                                                                \
      else                                                      \
       {                                                                \
       }                                                                \
      else                                                      \
       {                                                                \
-        builtin_define ("_MIPS_SIM=_MIPS_SIM_ABI32");          \
+       builtin_define ("_ABIO32=1");                   \
+       builtin_define ("_MIPS_SIM=_ABIO32");           \
         builtin_define ("_MIPS_SZLONG=32");                    \
         builtin_define ("_MIPS_SZPTR=32");                     \
       }                                                                \
         builtin_define ("_MIPS_SZLONG=32");                    \
         builtin_define ("_MIPS_SZPTR=32");                     \
       }                                                                \
index 7af1026..1b51913 100644 (file)
@@ -3465,7 +3465,7 @@ while (0)
    we need to load our GP.  We don't preserve $gp or $ra, since each
    init/fini chunk is supposed to initialize $gp, and crti/crtn
    already take care of preserving $ra and, when appropriate, $gp.  */
    we need to load our GP.  We don't preserve $gp or $ra, since each
    init/fini chunk is supposed to initialize $gp, and crti/crtn
    already take care of preserving $ra and, when appropriate, $gp.  */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if (defined _ABIO32 && _MIPS_SIM == _ABIO32)
 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)     \
    asm (SECTION_OP "\n\
        .set noreorder\n\
 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)     \
    asm (SECTION_OP "\n\
        .set noreorder\n\
index 627a5f8..7d553b7 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * src/mips/ffi.c: Use _ABIN32, _ABIO32 instead of external
+       _MIPS_SIM_NABI32, _MIPS_SIM_ABI32.
+
 2003-10-19  Andreas Tobler  <a.tobler@schweiz.ch>
 
        * src/powerpc/ffi_darwin.c (ffi_prep_args): Declare bytes again.
 2003-10-19  Andreas Tobler  <a.tobler@schweiz.ch>
 
        * src/powerpc/ffi_darwin.c (ffi_prep_args): Declare bytes again.
index 93f7923..01ad20e 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <stdlib.h>
 
 
 #include <stdlib.h>
 
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
 #define FIX_ARGP \
 FFI_ASSERT(argp <= &stack[bytes]); \
 if (argp == &stack[bytes]) \
 #define FIX_ARGP \
 FFI_ASSERT(argp <= &stack[bytes]); \
 if (argp == &stack[bytes]) \
@@ -55,7 +55,7 @@ static void ffi_prep_args(char *stack,
   register char *argp;
   register ffi_type **p_arg;
 
   register char *argp;
   register ffi_type **p_arg;
 
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
   /* If more than 8 double words are used, the remainder go
      on the stack. We reorder stuff on the stack here to 
      support this easily. */
   /* If more than 8 double words are used, the remainder go
      on the stack. We reorder stuff on the stack here to 
      support this easily. */
@@ -69,7 +69,7 @@ static void ffi_prep_args(char *stack,
 
   memset(stack, 0, bytes);
 
 
   memset(stack, 0, bytes);
 
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
   if ( ecif->cif->rstruct_flag != 0 )
 #else
   if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT )
   if ( ecif->cif->rstruct_flag != 0 )
 #else
   if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT )
@@ -92,7 +92,7 @@ static void ffi_prep_args(char *stack,
        FIX_ARGP;
       }
 
        FIX_ARGP;
       }
 
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
 #define OFFSET 0
 #else
 #define OFFSET sizeof(int)
 #define OFFSET 0
 #else
 #define OFFSET sizeof(int)
@@ -146,7 +146,7 @@ static void ffi_prep_args(char *stack,
            }
          else
            {
            }
          else
            {
-#if _MIPS_SIM == _MIPS_SIM_ABI32             
+#if _MIPS_SIM == _ABIO32             
              memcpy(argp, *p_argv, z);
 #else
              {
              memcpy(argp, *p_argv, z);
 #else
              {
@@ -178,7 +178,7 @@ static void ffi_prep_args(char *stack,
   return;
 }
 
   return;
 }
 
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
 
 /* The n32 spec says that if "a chunk consists solely of a double 
    float field (but not a double, which is part of a union), it
 
 /* The n32 spec says that if "a chunk consists solely of a double 
    float field (but not a double, which is part of a union), it
@@ -267,7 +267,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
 {
   cif->flags = 0;
 
 {
   cif->flags = 0;
 
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
   /* Set the flags necessary for O32 processing */
 
   if (cif->rtype->type != FFI_TYPE_STRUCT)
   /* Set the flags necessary for O32 processing */
 
   if (cif->rtype->type != FFI_TYPE_STRUCT)
@@ -322,7 +322,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
     }
 #endif
 
     }
 #endif
 
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
   /* Set the flags necessary for N32 processing */
   {
     unsigned shift = 0;
   /* Set the flags necessary for N32 processing */
   {
     unsigned shift = 0;
@@ -441,14 +441,14 @@ void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
     
   switch (cif->abi) 
     {
     
   switch (cif->abi) 
     {
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
     case FFI_O32:
       ffi_call_O32(ffi_prep_args, &ecif, cif->bytes, 
                   cif->flags, ecif.rvalue, fn);
       break;
 #endif
 
     case FFI_O32:
       ffi_call_O32(ffi_prep_args, &ecif, cif->bytes, 
                   cif->flags, ecif.rvalue, fn);
       break;
 #endif
 
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
     case FFI_N32:
       ffi_call_N32(ffi_prep_args, &ecif, cif->bytes, 
                   cif->flags, ecif.rvalue, fn);
     case FFI_N32:
       ffi_call_N32(ffi_prep_args, &ecif, cif->bytes, 
                   cif->flags, ecif.rvalue, fn);
index 6706b0f..b93dac9 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * config/cpu/mips/atomicity.h (__atomic_add): Use _ABIO32 instead
+       of external _MIPS_SIM_ABI32.
+
 2003-10-20  Phil Edwards  <phil@codesourcery.com>
 
        * configure.ac:  Fix comment typo.
 2003-10-20  Phil Edwards  <phil@codesourcery.com>
 
        * configure.ac:  Fix comment typo.
index 51f3e86..f24b059 100644 (file)
@@ -42,7 +42,7 @@ __exchange_and_add (volatile _Atomic_word *__mem, int __val)
     ("/* Inline exchange & add */\n\t"
      "1:\n\t"
      ".set     push\n\t"
     ("/* Inline exchange & add */\n\t"
      "1:\n\t"
      ".set     push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
      ".set     mips2\n\t"
 #endif
      "ll       %0,%3\n\t"
      ".set     mips2\n\t"
 #endif
      "ll       %0,%3\n\t"
@@ -68,7 +68,7 @@ __atomic_add (volatile _Atomic_word *__mem, int __val)
     ("/* Inline atomic add */\n\t"
      "1:\n\t"
      ".set     push\n\t"
     ("/* Inline atomic add */\n\t"
      "1:\n\t"
      ".set     push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
      ".set     mips2\n\t"
 #endif
      "ll       %0,%2\n\t"
      ".set     mips2\n\t"
 #endif
      "ll       %0,%2\n\t"