mips.h (CRT_CALL_STATIC_FUNCTION): Add nomips16 asm directives, remove #ifndef __mips...
authorChung-Lin Tang <cltang@codesourcery.com>
Wed, 29 Aug 2012 09:33:49 +0000 (09:33 +0000)
committerChung-Lin Tang <cltang@gcc.gnu.org>
Wed, 29 Aug 2012 09:33:49 +0000 (09:33 +0000)
2012-08-29  Chung-Lin Tang  <cltang@codesourcery.com>

* config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Add nomips16 asm
directives, remove #ifndef __mips16 guards.
* config/mips/t-linux64 (MULTILIB_OSDIRNAMES): Change to use
mapping style, add ../lib/mips16.
(MULTILIB_OPTIONS,MULTILIB_DIRNAMES): Add mips16.
(MULTILIB_EXCLUSIONS): Exclude mips16 when not -mabi=32.

From-SVN: r190774

gcc/ChangeLog
gcc/config/mips/mips.h
gcc/config/mips/t-linux64

index d6525216a6d6b75d9a8082fab470c70463b2b392..76738f344d5bdf37333e85bd7630f2523716fb8d 100644 (file)
@@ -1,3 +1,12 @@
+2012-08-29  Chung-Lin Tang  <cltang@codesourcery.com>
+
+       * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Add nomips16 asm
+       directives, remove #ifndef __mips16 guards.
+       * config/mips/t-linux64 (MULTILIB_OSDIRNAMES): Change to use
+       mapping style, add ../lib/mips16.
+       (MULTILIB_OPTIONS,MULTILIB_DIRNAMES): Add mips16.
+       (MULTILIB_EXCLUSIONS): Exclude mips16 when not -mabi=32.
+
 2012-08-28  Walter Lee  <walt@tilera.com>
        * confg/tilegx/tilegx.md: Fix code style.
        (*zero_extendsidi_truncdisi): Fix typo.
index caad3c36db85de70b2ecda4b4af709a6384ca4aa..090b6a3cede21ae25126655a3ae5f87fbddcece3 100644 (file)
@@ -2793,7 +2793,6 @@ while (0)
 #define STORE_BY_PIECES_P(SIZE, ALIGN) \
   mips_store_by_pieces_p (SIZE, ALIGN)
 \f
-#ifndef __mips16
 /* Since the bits of the _init and _fini function is spread across
    many object files, each potentially with its own GP, we must assume
    we need to load our GP.  We don't preserve $gp or $ra, since each
@@ -2802,27 +2801,32 @@ while (0)
 #if (defined _ABIO32 && _MIPS_SIM == _ABIO32)
 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)     \
    asm (SECTION_OP "\n\
+       .set push\n\
+       .set nomips16\n\
        .set noreorder\n\
        bal 1f\n\
        nop\n\
 1:     .cpload $31\n\
        .set reorder\n\
        jal " USER_LABEL_PREFIX #FUNC "\n\
+       .set pop\n\
        " TEXT_SECTION_ASM_OP);
 #endif /* Switch to #elif when we're no longer limited by K&R C.  */
 #if (defined _ABIN32 && _MIPS_SIM == _ABIN32) \
    || (defined _ABI64 && _MIPS_SIM == _ABI64)
 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)     \
    asm (SECTION_OP "\n\
+       .set push\n\
+       .set nomips16\n\
        .set noreorder\n\
        bal 1f\n\
        nop\n\
 1:     .set reorder\n\
        .cpsetup $31, $2, 1b\n\
        jal " USER_LABEL_PREFIX #FUNC "\n\
+       .set pop\n\
        " TEXT_SECTION_ASM_OP);
 #endif
-#endif
 
 #ifndef HAVE_AS_TLS
 #define HAVE_AS_TLS 0
index 5197e5ee209285656da8fab91646cae4d828dcfb..420ee68269077abe58295d983d7386be7821a1ce 100644 (file)
 
 MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
 MULTILIB_DIRNAMES = n32 32 64
-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
+MULTILIB_OSDIRNAMES  = mabi.n32=../lib32
+MULTILIB_OSDIRNAMES += mabi.32=../lib
+MULTILIB_OSDIRNAMES += mabi.64=../lib64
+
+# MIPS16 is currently only supported under O32
+MULTILIB_OPTIONS += mips16
+MULTILIB_DIRNAMES += mips16
+MULTILIB_OSDIRNAMES += mabi.32/mips16=../lib/mips16
+MULTILIB_EXCLUSIONS = !mabi=32/mips16