diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2009-06-04 10:32:52 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2009-06-04 10:32:52 +0200 |
commit | 72fa360537c90daf18cce1a4e4a5ba34a7413b57 (patch) | |
tree | 94350cc21c3bf770e5cbe5a3dd4aee7c4d68f346 | |
parent | bdde878c07fd7c77d7b09819d84b49c68e682878 (diff) | |
download | gcc-72fa360537c90daf18cce1a4e4a5ba34a7413b57.zip gcc-72fa360537c90daf18cce1a4e4a5ba34a7413b57.tar.gz gcc-72fa360537c90daf18cce1a4e4a5ba34a7413b57.tar.bz2 |
i386.h (X86_64_MS_REGPARM_MAX): Rename from X64_REGPARM_MAX.
* config/i386/i386.h (X86_64_MS_REGPARM_MAX): Rename from
X64_REGPARM_MAX.
(REGPARM_MAX): Use X86_64_MS_REGPARM_MAX.
(X86_64_MS_SSE_REGPARM_MAX): Rename from X64_SSE_REGPARM_MAX.
(SSE_REGPARM_MAX): Use X86_64_MS_SSE_REGPARM_MAX.
* config/i386/i386.c: Use X86_64_MS_REGPARM_MAX instead of
X64_REGPARM_MAX. Use X86_64_MS_SSE_REGPARM_MAX instead of
X64_SSE_REGPARM_MAX.
* config/i386/i386.md: Use X86_64_MS_SSE_REGPARM_MAX instead of
X64_SSE_REGPARM_MAX.
From-SVN: r148163
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 29 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 16 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 2 |
4 files changed, 39 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3730967..84bf219 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2009-06-04 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.h (X86_64_MS_REGPARM_MAX): Rename from + X64_REGPARM_MAX. + (REGPARM_MAX): Use X86_64_MS_REGPARM_MAX. + (X86_64_MS_SSE_REGPARM_MAX): Rename from X64_SSE_REGPARM_MAX. + (SSE_REGPARM_MAX): Use X86_64_MS_SSE_REGPARM_MAX. + * config/i386/i386.c: Use X86_64_MS_REGPARM_MAX instead of + X64_REGPARM_MAX. Use X86_64_MS_SSE_REGPARM_MAX instead of + X64_SSE_REGPARM_MAX. + * config/i386/i386.md: Use X86_64_MS_SSE_REGPARM_MAX instead of + X64_SSE_REGPARM_MAX. + 2009-06-04 Alexandre Oliva <aoliva@redhat.com> * gcc.c (report_times_to_file): New. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index be9c7ad..80f3ea3 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4407,7 +4407,7 @@ ix86_function_regparm (const_tree type, const_tree decl) if (TARGET_64BIT) return (ix86_function_type_abi (type) == SYSV_ABI - ? X86_64_REGPARM_MAX : X64_REGPARM_MAX); + ? X86_64_REGPARM_MAX : X86_64_MS_REGPARM_MAX); regparm = ix86_regparm; attr = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type)); @@ -4650,8 +4650,8 @@ ix86_function_arg_regno_p (int regno) parm_regs = x86_64_ms_abi_int_parameter_registers; else parm_regs = x86_64_int_parameter_registers; - for (i = 0; i < (ix86_abi == MS_ABI ? X64_REGPARM_MAX - : X86_64_REGPARM_MAX); i++) + for (i = 0; i < (ix86_abi == MS_ABI + ? X86_64_MS_REGPARM_MAX : X86_64_REGPARM_MAX); i++) if (regno == parm_regs[i]) return true; return false; @@ -4777,8 +4777,8 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */ if (TARGET_64BIT) { if (cum->call_abi != ix86_abi) - cum->nregs = ix86_abi != SYSV_ABI ? X86_64_REGPARM_MAX - : X64_REGPARM_MAX; + cum->nregs = (ix86_abi != SYSV_ABI + ? X86_64_REGPARM_MAX : X86_64_MS_REGPARM_MAX); } if (TARGET_SSE) { @@ -4786,8 +4786,9 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */ if (TARGET_64BIT) { if (cum->call_abi != ix86_abi) - cum->sse_nregs = ix86_abi != SYSV_ABI ? X86_64_SSE_REGPARM_MAX - : X64_SSE_REGPARM_MAX; + cum->sse_nregs = (ix86_abi != SYSV_ABI + ? X86_64_SSE_REGPARM_MAX + : X86_64_MS_SSE_REGPARM_MAX); } } if (TARGET_MMX) @@ -5898,10 +5899,11 @@ function_arg_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode, return GEN_INT (cum->maybe_vaarg ? (cum->sse_nregs < 0 ? (cum->call_abi == ix86_abi - ? SSE_REGPARM_MAX - : (ix86_abi != SYSV_ABI ? X86_64_SSE_REGPARM_MAX - : X64_SSE_REGPARM_MAX)) - : cum->sse_regno) + ? SSE_REGPARM_MAX + : (ix86_abi != SYSV_ABI + ? X86_64_SSE_REGPARM_MAX + : X86_64_MS_SSE_REGPARM_MAX)) + : cum->sse_regno) : -1); switch (mode) @@ -6603,7 +6605,8 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum) int regparm = ix86_regparm; if (cum->call_abi != ix86_abi) - regparm = ix86_abi != SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX; + regparm = (ix86_abi != SYSV_ABI + ? X86_64_REGPARM_MAX : X86_64_MS_REGPARM_MAX); /* GPR size of varargs save area. */ if (cfun->va_list_gpr_size) @@ -6700,7 +6703,7 @@ setup_incoming_varargs_ms_64 (CUMULATIVE_ARGS *cum) alias_set_type set = get_varargs_alias_set (); int i; - for (i = cum->regno; i < X64_REGPARM_MAX; i++) + for (i = cum->regno; i < X86_64_MS_REGPARM_MAX; i++) { rtx reg, mem; diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 72dcf32..c8fa9c4 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1853,20 +1853,22 @@ typedef struct ix86_args { /* Abi specific values for REGPARM_MAX and SSE_REGPARM_MAX */ #define X86_64_REGPARM_MAX 6 -#define X64_REGPARM_MAX 4 -#define X86_32_REGPARM_MAX 3 +#define X86_64_MS_REGPARM_MAX 4 -#define X86_64_SSE_REGPARM_MAX 8 -#define X64_SSE_REGPARM_MAX 4 -#define X86_32_SSE_REGPARM_MAX (TARGET_SSE ? 3 : 0) +#define X86_32_REGPARM_MAX 3 #define REGPARM_MAX \ - (TARGET_64BIT ? (TARGET_64BIT_MS_ABI ? X64_REGPARM_MAX \ + (TARGET_64BIT ? (TARGET_64BIT_MS_ABI ? X86_64_MS_REGPARM_MAX \ : X86_64_REGPARM_MAX) \ : X86_32_REGPARM_MAX) +#define X86_64_SSE_REGPARM_MAX 8 +#define X86_64_MS_SSE_REGPARM_MAX 4 + +#define X86_32_SSE_REGPARM_MAX (TARGET_SSE ? 3 : 0) + #define SSE_REGPARM_MAX \ - (TARGET_64BIT ? (TARGET_64BIT_MS_ABI ? X64_SSE_REGPARM_MAX \ + (TARGET_64BIT ? (TARGET_64BIT_MS_ABI ? X86_64_MS_SSE_REGPARM_MAX \ : X86_64_SSE_REGPARM_MAX) \ : X86_32_SSE_REGPARM_MAX) diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 2041396..9f9f4c2 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -15761,7 +15761,7 @@ GEN_INT ((TARGET_64BIT ? (ix86_abi == SYSV_ABI ? X86_64_SSE_REGPARM_MAX - : X64_SSE_REGPARM_MAX) + : X86_64_MS_SSE_REGPARM_MAX) : X86_32_SSE_REGPARM_MAX) - 1), NULL, 0); |