diff options
author | Michael Meissner <meissner@redhat.com> | 2001-09-11 04:40:44 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2001-09-11 04:40:44 +0000 |
commit | 75dcd8fe99a9b22bf81705c4c898241b042c0873 (patch) | |
tree | 2c45bce97e8151b3a8670a8538d39d5a3a176793 /gcc/config | |
parent | fe5de1176eb897b568be6d0a04e580d4a029280a (diff) | |
download | gcc-75dcd8fe99a9b22bf81705c4c898241b042c0873.zip gcc-75dcd8fe99a9b22bf81705c4c898241b042c0873.tar.gz gcc-75dcd8fe99a9b22bf81705c4c898241b042c0873.tar.bz2 |
Do not allow -mgp32 -mfp64; Fix int/long printf warning
From-SVN: r45533
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/mips/elf.h | 5 | ||||
-rw-r--r-- | gcc/config/mips/elf64.h | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 15 | ||||
-rw-r--r-- | gcc/config/mips/netbsd.h | 5 |
4 files changed, 27 insertions, 3 deletions
diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h index c7e68f1..ef94217 100644 --- a/gcc/config/mips/elf.h +++ b/gcc/config/mips/elf.h @@ -174,7 +174,10 @@ do { \ size_directive_output = 1; \ fprintf (FILE, "%s", SIZE_ASM_OP); \ assemble_name (FILE, name); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, ","); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ + int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, "\n"); \ } \ } while (0) diff --git a/gcc/config/mips/elf64.h b/gcc/config/mips/elf64.h index 894ea51..e07ce46 100644 --- a/gcc/config/mips/elf64.h +++ b/gcc/config/mips/elf64.h @@ -153,7 +153,10 @@ do { \ size_directive_output = 1; \ fprintf (FILE, "%s", SIZE_ASM_OP); \ assemble_name (FILE, name); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, ","); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ + int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, "\n"); \ } \ } while (0) diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 209b9b6..81f675c 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -952,6 +952,9 @@ while (0) #endif /* CC1_SPEC is the set of arguments to pass to the compiler proper. */ +/* Note, we will need to adjust the following if we ever find a MIPS variant + that has 32-bit GPRs and 64-bit FPRs as well as fix all of the reload bugs + that show up in this case. */ #ifndef CC1_SPEC #define CC1_SPEC "\ @@ -962,6 +965,7 @@ while (0) %{mfp64:%{msingle-float:%emay not use both -mfp64 and -msingle-float}} \ %{mfp64:%{m4650:%emay not use both -mfp64 and -m4650}} \ %{mint64|mlong64|mlong32:-mexplicit-type-size }\ +%{mgp32: %{mfp64:%emay not use both -mgp32 and -mfp64} %{!mfp32: -mfp32}} \ %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \ %{pic-none: -mno-half-pic} \ %{pic-lib: -mhalf-pic} \ @@ -999,6 +1003,15 @@ while (0) #endif #endif +/* Define appropriate macros for fpr register size. */ +#ifndef CPP_FPR_SPEC +#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_FLOAT64) +#define CPP_FPR_SPEC "-D__mips_fpr=64" +#else +#define CPP_FPR_SPEC "-D__mips_fpr=32" +#endif +#endif + /* For C++ we need to ensure that _LANGUAGE_C_PLUS_PLUS is defined independent of the source file extension. */ #undef CPLUSPLUS_CPP_SPEC @@ -1017,6 +1030,7 @@ while (0) %{mips3:-U__mips -D__mips=3 -D__mips64} \ %{mips4:-U__mips -D__mips=4 -D__mips64} \ %{mgp32:-U__mips64} %{mgp64:-D__mips64} \ +%{mfp32:-D__mips_fpr=32} %{mfp64:-D__mips_fpr=64} %{!mfp32: %{!mfp64: %{mgp32:-D__mips_fpr=32} %{!mgp32: %(cpp_fpr_spec)}}} \ %{msingle-float:%{!msoft-float:-D__mips_single_float}} \ %{m4650:%{!msoft-float:-D__mips_single_float}} \ %{msoft-float:-D__mips_soft_float} \ @@ -1044,6 +1058,7 @@ while (0) { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ { "subtarget_cpp_size_spec", SUBTARGET_CPP_SIZE_SPEC }, \ { "long_max_spec", LONG_MAX_SPEC }, \ + { "cpp_fpr_spec", CPP_FPR_SPEC }, \ { "mips_as_asm_spec", MIPS_AS_ASM_SPEC }, \ { "gas_asm_spec", GAS_ASM_SPEC }, \ { "target_asm_spec", TARGET_ASM_SPEC }, \ diff --git a/gcc/config/mips/netbsd.h b/gcc/config/mips/netbsd.h index 1458a82..4cb2056 100644 --- a/gcc/config/mips/netbsd.h +++ b/gcc/config/mips/netbsd.h @@ -175,7 +175,10 @@ do { \ size_directive_output = 1; \ fprintf (FILE, "%s", SIZE_ASM_OP); \ assemble_name (FILE, name); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, ","); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ + int_size_in_bytes (TREE_TYPE (DECL))); \ + fprintf (FILE, "\n"); \ } \ } while (0) |