Commit 46107b99 by Richard Earnshaw

arm.h (MACHMODE): New define.

	* arm.h (MACHMODE): New define.  Include insn-modes.h if available.
	(CUMULATIVE_ARGS): Use MACHMODE for declaration of aapcs_vfp_mode.
	* arm.c (aapcs_vfp_is_call_or_return_candidate): Change base_mode
	to pointer to enum machine_mode.  Update all callers as needed.

From-SVN: r150990
parent 50dbf0b4
2009-08-21 Richard Earnshaw <rearnsha@arm.com>
* arm.h (MACHMODE): New define. Include insn-modes.h if available.
(CUMULATIVE_ARGS): Use MACHMODE for declaration of aapcs_vfp_mode.
* arm.c (aapcs_vfp_is_call_or_return_candidate): Change base_mode
to pointer to enum machine_mode. Update all callers as needed.
2009-08-21 Uros Bizjak <ubizjak@gmail.com> 2009-08-21 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.md (exception_receiver): Emit alternative * config/alpha/alpha.md (exception_receiver): Emit alternative
...@@ -436,7 +443,7 @@ ...@@ -436,7 +443,7 @@
* config/mmix/mmix.c (mmix_promote_function_mode): Likewise. * config/mmix/mmix.c (mmix_promote_function_mode): Likewise.
* config/pa/pa.c (pa_promote_function_mode): Likewise. * config/pa/pa.c (pa_promote_function_mode): Likewise.
2009-08-11 Andrew Haley <aph@redhat.com> 2009-08-12 Andrew Haley <aph@redhat.com>
* config/arm/arm.c (arm_init_libfuncs): Add __sync_synchronize. * config/arm/arm.c (arm_init_libfuncs): Add __sync_synchronize.
......
...@@ -3696,7 +3696,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep) ...@@ -3696,7 +3696,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep)
static bool static bool
aapcs_vfp_is_call_or_return_candidate (enum machine_mode mode, const_tree type, aapcs_vfp_is_call_or_return_candidate (enum machine_mode mode, const_tree type,
int *base_mode, enum machine_mode *base_mode,
int *count) int *count)
{ {
if (GET_MODE_CLASS (mode) == MODE_FLOAT if (GET_MODE_CLASS (mode) == MODE_FLOAT
...@@ -3733,7 +3733,7 @@ aapcs_vfp_is_return_candidate (enum arm_pcs pcs_variant, ...@@ -3733,7 +3733,7 @@ aapcs_vfp_is_return_candidate (enum arm_pcs pcs_variant,
enum machine_mode mode, const_tree type) enum machine_mode mode, const_tree type)
{ {
int count ATTRIBUTE_UNUSED; int count ATTRIBUTE_UNUSED;
int ag_mode ATTRIBUTE_UNUSED; enum machine_mode ag_mode ATTRIBUTE_UNUSED;
if (!(pcs_variant == ARM_PCS_AAPCS_VFP if (!(pcs_variant == ARM_PCS_AAPCS_VFP
|| (pcs_variant == ARM_PCS_AAPCS_LOCAL || (pcs_variant == ARM_PCS_AAPCS_LOCAL
...@@ -3818,7 +3818,7 @@ aapcs_vfp_allocate_return_reg (enum arm_pcs pcs_variant ATTRIBUTE_UNUSED, ...@@ -3818,7 +3818,7 @@ aapcs_vfp_allocate_return_reg (enum arm_pcs pcs_variant ATTRIBUTE_UNUSED,
if (mode == BLKmode || (mode == TImode && !TARGET_NEON)) if (mode == BLKmode || (mode == TImode && !TARGET_NEON))
{ {
int count; int count;
int ag_mode; enum machine_mode ag_mode;
int i; int i;
rtx par; rtx par;
int shift; int shift;
......
...@@ -26,6 +26,16 @@ ...@@ -26,6 +26,16 @@
#ifndef GCC_ARM_H #ifndef GCC_ARM_H
#define GCC_ARM_H #define GCC_ARM_H
/* We can't use enum machine_mode inside a generator file because it
hasn't been created yet; we shouldn't be using any code that
needs the real definition though, so this ought to be safe. */
#ifdef GENERATOR_FILE
#define MACHMODE int
#else
#include "insn-modes.h"
#define MACHMODE enum machine_mode
#endif
#include "config/vxworks-dummy.h" #include "config/vxworks-dummy.h"
/* The architecture define. */ /* The architecture define. */
...@@ -1646,8 +1656,6 @@ enum arm_pcs ...@@ -1646,8 +1656,6 @@ enum arm_pcs
ARM_PCS_UNKNOWN ARM_PCS_UNKNOWN
}; };
/* We can't define this inside a generator file because it needs enum
machine_mode. */
/* A C type for declaring a variable that is used as the first argument of /* A C type for declaring a variable that is used as the first argument of
`FUNCTION_ARG' and other related values. */ `FUNCTION_ARG' and other related values. */
typedef struct typedef struct
...@@ -1679,12 +1687,9 @@ typedef struct ...@@ -1679,12 +1687,9 @@ typedef struct
unsigned aapcs_vfp_regs_free; unsigned aapcs_vfp_regs_free;
unsigned aapcs_vfp_reg_alloc; unsigned aapcs_vfp_reg_alloc;
int aapcs_vfp_rcount; int aapcs_vfp_rcount;
/* Can't include insn-modes.h because this header is needed before we MACHMODE aapcs_vfp_rmode;
generate it. */
int /* enum machine_mode */ aapcs_vfp_rmode;
} CUMULATIVE_ARGS; } CUMULATIVE_ARGS;
/* Define where to put the arguments to a function. /* Define where to put the arguments to a function.
Value is zero to push the argument on the stack, Value is zero to push the argument on the stack,
or a hard register in which to store the argument. or a hard register in which to store the argument.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment