Patchwork RFA: PR44566: accessor macros (2/3): machine_function

login
register
mail settings
Submitter Joern Rennecke
Date June 24, 2010, 10:43 a.m.
Message ID <20100624064359.hs9ji2d0gkwg4w0s-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/56775/
State New
Headers show

Comments

Joern Rennecke - June 24, 2010, 10:43 a.m.
The first paragraph in the ChangeLog entry is for infrastructure that is
shared among the three accessor macro patches.

After doing a global replace of cfun->machine in config and adjusting
formatting, I grepped for '\<machine\>' to check if there was some other
kind of reference.
I've found lots of comments, a few instances of a variable 'machine'  
set to MACHINE_FUNCTION (*cfun), some stuff regarding the   
software-floating point
includes and preprocessor assertions etc, but nothing really relevant.

Bootstrapped in trunk revision 161310; currently undergoing regression  
testing.
2010-06-24  Joern Rennecke  <joern.rennecke@embecosm.com>

	* function.h (target-gtypes.h): Include.
	(INCOMING_ARGS_INFO, MACHINE_FUNCTION, CRTL_ASM_CLOBBERS): Define.
	* function.h (struct function): New member target_arch.
	* Makefile.in (New Makefile variable).
	(cs-tm.h): Add TARGET_NUM to DEFINES.
	(GTFILES): Add target-gtypes.h.

	* Makefile.in (target-gtypes.h): New rule.

	* function.h (struct function): Use machine_function_u for member
	machine.
	* function.c (free_after_compilation): Use MACHINE_FUNCTION.
	(allocate_struct_function): Likewise.
	* doc/tm.texi: Adjust struct machine_function documentation.

	* config/alpha/alpha.c (entire file): Replace cfun->machine with
        MACHINE_FUNCTION (*cfun).
	* config/xtensa/xtensa.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/mmix/mmix.md: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/moxie/moxie.c: Likewise.
	* config/ia64/ia64.md: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/cris/cris.c: Likewise.
	* config/avr/avr.c: Likewise.
	* config/avr/avr.md: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/mips/mips.h: Likewise.
	* config/mips/sde.h: Likewise.
	* config/mips/mips.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/arm/arm.md: Likewise.
	* config/arm/arm.h: Likewise.
	* config/i386/i386.h: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/cygming.h: Likewise.
Joseph S. Myers - June 24, 2010, 11:28 a.m.
I see nothing in this patch that defines EXTRA_TARGET, which would 
indicate that the #ifdef EXTRA_TARGET stanza doesn't belong here.

You should use @code{MACHINE_FUNCTION (@var{function})} in tm.texi.

I think some people have expressed a dislike of svn:mergeinfo properties 
referencing random branches being added to trunk.  (Your patch has:

Property changes on: gcc/config

Patch

Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi	(revision 161310)
+++ gcc/doc/tm.texi	(working copy)
@@ -884,7 +884,8 @@  when another one comes along.
 
 GCC defines a data structure called @code{struct function} which
 contains all of the data specific to an individual function.  This
-structure contains a field called @code{machine} whose type is
+structure contains a field which can be accessed as
+MACHINE_FUNCTION (@var{function}) whose type is
 @code{struct machine_function *}, which can be used by targets to point
 to their own specific data.
 
Index: gcc/function.c
===================================================================
--- gcc/function.c	(revision 161310)
+++ gcc/function.c	(working copy)
@@ -217,7 +217,7 @@  free_after_compilation (struct function 
 
   memset (crtl, 0, sizeof (struct rtl_data));
   f->eh = NULL;
-  f->machine = NULL;
+  MACHINE_FUNCTION (*f) = NULL;
   f->cfg = NULL;
 
   regno_reg_rtx = NULL;
@@ -4201,7 +4201,7 @@  allocate_struct_function (tree fndecl, b
   init_eh_for_function ();
 
   if (init_machine_status)
-    cfun->machine = (*init_machine_status) ();
+    MACHINE_FUNCTION (*cfun) = (*init_machine_status) ();
 
 #ifdef OVERRIDE_ABI_FORMAT
   OVERRIDE_ABI_FORMAT (fndecl);
Index: gcc/function.h
===================================================================
--- gcc/function.h	(revision 161310)
+++ gcc/function.h	(working copy)
@@ -27,6 +27,7 @@  along with GCC; see the file COPYING3.  
 #include "vecprim.h"
 #include "tm.h"		/* For CUMULATIVE_ARGS.  */
 #include "hard-reg-set.h"
+#include "target-gtypes.h"
 
 /* Stack of pending (incomplete) sequences saved by `start_sequence'.
    Each element describes one pending sequence.
@@ -216,6 +217,20 @@  struct GTY(()) incoming_args {
   rtx internal_arg_pointer;
 };
 
+#ifdef EXTRA_TARGET
+#define CONCAT_(A,B) A##B
+#define CONCAT(A,B) CONCAT_(A,B)
+#define INCOMING_ARGS_INFO(INCOMING_ARGS) \
+  ((INCOMING_ARGS).info.CONCAT(EXTRA_TARGET,_ca))
+#define MACHINE_FUNCTION(FUNCTION) \
+  ((FUNCTION).machine.CONCAT(EXTRA_TARGET,_mf))
+#define CRTL_ASM_CLOBBERS (crtl->asm_clobbers.CONCAT(EXTRA_TARGET,_hrs))
+#else
+#define INCOMING_ARGS_INFO(INCOMING_ARGS) ((INCOMING_ARGS).info._ca)
+#define MACHINE_FUNCTION(FUNCTION) ((FUNCTION).machine._mf)
+#define CRTL_ASM_CLOBBERS (crtl->asm_clobbers._hrs)
+#endif
+
 /* Data for function partitioning.  */
 struct GTY(()) function_subsections {
   /* Assembly labels for the hot and cold text sections, to
@@ -509,7 +524,7 @@  struct GTY(()) function {
   /* For md files.  */
 
   /* tm.h can use this to store whatever it likes.  */
-  struct machine_function * GTY ((maybe_undef)) machine;
+  machine_function_u GTY ((desc ("%0.target_arch"))) machine;
 
   /* Language-specific code can use this to store whatever it likes.  */
   struct language_function * language;
@@ -607,6 +622,9 @@  struct GTY(()) function {
      adjusts one of its arguments and forwards to another
      function.  */
   unsigned int is_thunk : 1;
+
+  /* Target architecture to compile this function for.  */
+  unsigned int target_arch : 8;
 };
 
 /* If va_list_[gf]pr_size is set to this, it means we don't know how
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 161310)
+++ gcc/Makefile.in	(working copy)
@@ -800,6 +800,9 @@  T =
 T_TARGET =
 T_TARGET : $(T_TARGET)
 
+# For building rtl pases for extra target architectures.
+TARGET_NUM=0
+
 # This should name the specs file that we're going to install.  Target
 # Makefiles may override it and name another file to be generated from
 # the built-in specs and installed as the default spec, as long as
@@ -1668,7 +1671,9 @@  cs-tconfig.h: Makefile
 
 cs-tm.h: Makefile
 	TARGET_CPU_DEFAULT="$(target_cpu_default)" \
-	HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \
+	HEADERS="$(tm_include_list)" \
+	DEFINES="TARGET_NUM=$(TARGET_NUM) \
+	$(tm_defines)" \
 	$(SHELL) $(srcdir)/mkconfig.sh tm.h
 
 cs-tm_p.h: Makefile
@@ -3671,7 +3676,7 @@  s-constrs-h: $(MD_DEPS) build/genpreds$(
 
 GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(srcdir)/vecprim.h $(srcdir)/vecir.h \
-  $(host_xm_file_list) \
+  $(host_xm_file_list) target-gtypes.h \
   $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
   $(srcdir)/alias.h $(srcdir)/coverage.c $(srcdir)/rtl.h \
   $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
@@ -3848,6 +3853,21 @@  build/genpreds.o : genpreds.c $(RTL_BASE
 build/genrecog.o : genrecog.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H)	\
   coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
 
+# using struct instead of union makes this gty-safe.
+target-gtypes.h: Makefile
+	echo '' > $@ # cumulative_args_u goes here
+	mf_def=` \
+	  cat $(tm_include_list) $(filter-out [%], $(GTFILES)) \
+	  | sed '/struct[       ]*GTY[()        ]*machine_function/!d'`;\
+	if test "x$${mf_def}" = x; then \
+	  echo 'struct GTY (()) machine_function { int dummy; };' >> $@; \
+	fi
+	echo 'typedef union GTY (())' >> $@
+	echo '  {' >> $@
+	echo '    struct machine_function *GTY ((tag ("TARGET_NUM"))) _mf;' \
+		>> $@
+	echo '  } machine_function_u;' >> $@
+
 # Compile the programs that generate insn-* from the machine description.
 # They are compiled with $(COMPILER_FOR_BUILD), and associated libraries,
 # since they need to run on this machine

Property changes on: gcc/config
___________________________________________________________________
Added: svn:mergeinfo
   Merged /branches/multi-target-20100613-branch/gcc/config:r160896

Index: gcc/config/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	(revision 161310)
+++ gcc/config/alpha/alpha.c	(working copy)
@@ -4849,7 +4849,7 @@  alpha_expand_builtin_establish_vms_condi
      slot is needed.  In addition to reserving the slot space, this will force
      the procedure kind to PT_STACK so ensure that the hard_frame_pointer_rtx
      use above is correct.  */
-  cfun->machine->uses_condition_handler = true;
+  MACHINE_FUNCTION (*cfun)->uses_condition_handler = true;
 }
 
 /* Expand code to store the current VMS condition handler into TARGET and
@@ -4885,7 +4885,7 @@  alpha_return_addr (int count, rtx frame 
 rtx
 alpha_gp_save_rtx (void)
 {
-  rtx seq, m = cfun->machine->gp_save_rtx;
+  rtx seq, m = MACHINE_FUNCTION (*cfun)->gp_save_rtx;
 
   if (m == NULL)
     {
@@ -4906,7 +4906,7 @@  alpha_gp_save_rtx (void)
 	 will call commit_edge_insertions thanks to a kludge.  */
       insert_insn_on_edge (seq, single_succ_edge (ENTRY_BLOCK_PTR));
 
-      cfun->machine->gp_save_rtx = m;
+      MACHINE_FUNCTION (*cfun)->gp_save_rtx = m;
     }
 
   return m;
@@ -5051,7 +5051,7 @@  get_some_local_dynamic_name_1 (rtx *px, 
   if (GET_CODE (x) == SYMBOL_REF
       && SYMBOL_REF_TLS_MODEL (x) == TLS_MODEL_LOCAL_DYNAMIC)
     {
-      cfun->machine->some_ld_name = XSTR (x, 0);
+      MACHINE_FUNCTION (*cfun)->some_ld_name = XSTR (x, 0);
       return 1;
     }
 
@@ -5063,13 +5063,13 @@  get_some_local_dynamic_name (void)
 {
   rtx insn;
 
-  if (cfun->machine->some_ld_name)
-    return cfun->machine->some_ld_name;
+  if (MACHINE_FUNCTION (*cfun)->some_ld_name)
+    return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
     if (INSN_P (insn)
 	&& for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
-      return cfun->machine->some_ld_name;
+      return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   gcc_unreachable ();
 }
@@ -7429,7 +7429,7 @@  alpha_sa_size (void)
       /* A VMS condition handler requires a stack procedure in our
 	 implementation. (not required by the calling standard).  */
       if ((vms_save_fp_regno == -1 && alpha_procedure_type == PT_REGISTER)
-	  || cfun->machine->uses_condition_handler)
+	  || MACHINE_FUNCTION (*cfun)->uses_condition_handler)
 	vms_base_regno = REG_PV, alpha_procedure_type = PT_STACK;
       else if (alpha_procedure_type == PT_NULL)
 	vms_base_regno = REG_PV;
@@ -7441,7 +7441,7 @@  alpha_sa_size (void)
       /* If this is a stack procedure, allow space for saving FP, RA and
 	 a condition handler slot if needed.  */
       if (alpha_procedure_type == PT_STACK)
-	sa_size += 2 + cfun->machine->uses_condition_handler;
+	sa_size += 2 + MACHINE_FUNCTION (*cfun)->uses_condition_handler;
     }
   else
     {
@@ -7804,7 +7804,7 @@  alpha_expand_prologue (void)
 				 + crtl->args.pretend_args_size));
 
   if (TARGET_ABI_OPEN_VMS)
-    reg_offset = 8 + 8 * cfun->machine->uses_condition_handler;
+    reg_offset = 8 + 8 * MACHINE_FUNCTION (*cfun)->uses_condition_handler;
   else
     reg_offset = ALPHA_ROUND (crtl->outgoing_args_size);
 
@@ -8142,7 +8142,7 @@  alpha_start_function (FILE *file, const 
 				 + crtl->args.pretend_args_size));
 
   if (TARGET_ABI_OPEN_VMS)
-    reg_offset = 8 + 8 * cfun->machine->uses_condition_handler;
+    reg_offset = 8 + 8 * MACHINE_FUNCTION (*cfun)->uses_condition_handler;
   else
     reg_offset = ALPHA_ROUND (crtl->outgoing_args_size);
 
@@ -8285,7 +8285,7 @@  alpha_start_function (FILE *file, const 
      the procedure descriptor bits to point the Condition Handling Facility
      at the indirection wrapper, and state the fp offset at which the user
      handler may be found.  */
-  if (cfun->machine->uses_condition_handler)
+  if (MACHINE_FUNCTION (*cfun)->uses_condition_handler)
     {
       fprintf (file, "\t.handler __gcc_shell_handler\n");
       fprintf (file, "\t.handler_data %d\n", VMS_COND_HANDLER_FP_OFFSET);
@@ -8362,7 +8362,7 @@  alpha_expand_epilogue (void)
   if (TARGET_ABI_OPEN_VMS)
     {
        if (alpha_procedure_type == PT_STACK)
-          reg_offset = 8 + 8 * cfun->machine->uses_condition_handler;
+          reg_offset = 8 + 8 * MACHINE_FUNCTION (*cfun)->uses_condition_handler;
        else
           reg_offset = 0;
     }
@@ -10427,7 +10427,7 @@  unicosmk_output_align (FILE *file, int a
 void
 unicosmk_defer_case_vector (rtx lab, rtx vec)
 {
-  struct machine_function *machine = cfun->machine;
+  struct machine_function *machine = MACHINE_FUNCTION (*cfun);
 
   vec = gen_rtx_EXPR_LIST (VOIDmode, lab, vec);
   machine->addr_list = gen_rtx_EXPR_LIST (VOIDmode, vec,
@@ -10458,7 +10458,7 @@  unicosmk_output_addr_vec (FILE *file, rt
 static void
 unicosmk_output_deferred_case_vectors (FILE *file)
 {
-  struct machine_function *machine = cfun->machine;
+  struct machine_function *machine = MACHINE_FUNCTION (*cfun);
   rtx t;
 
   if (machine->addr_list == NULL_RTX)
@@ -10578,7 +10578,7 @@  unicosmk_output_ssib (FILE *file, const 
   int i;
   rtx x;
   rtx ciw;
-  struct machine_function *machine = cfun->machine;
+  struct machine_function *machine = MACHINE_FUNCTION (*cfun);
 
   in_section = NULL;
   fprintf (file, "\t.endp\n\n\t.psect\t%s%s,data\n", user_label_prefix,
@@ -10637,7 +10637,7 @@  rtx
 unicosmk_add_call_info_word (rtx x)
 {
   rtx node;
-  struct machine_function *machine = cfun->machine;
+  struct machine_function *machine = MACHINE_FUNCTION (*cfun);
 
   node = gen_rtx_EXPR_LIST (VOIDmode, x, NULL_RTX);
   if (machine->first_ciw == NULL_RTX)
Index: gcc/config/frv/frv.c
===================================================================
--- gcc/config/frv/frv.c	(revision 161310)
+++ gcc/config/frv/frv.c	(working copy)
@@ -1230,7 +1230,7 @@  frv_stack_info (void)
 	  if (df_regs_ever_live_p (LR_REGNO)
               || profile_flag
 	      /* This is set for __builtin_return_address, etc.  */
-	      || cfun->machine->frame_needed
+	      || MACHINE_FUNCTION (*cfun)->frame_needed
               || (TARGET_LINKED_FP && frame_pointer_needed)
               || (!TARGET_FDPIC && flag_pic
 		  && crtl->uses_pic_offset_table))
@@ -2163,7 +2163,7 @@  frv_frame_pointer_required (void)
   if (profile_flag)
     return true;
 
-  if (cfun->machine->frame_needed)
+  if (MACHINE_FUNCTION (*cfun)->frame_needed)
     return true;
 
   return false;
@@ -2527,7 +2527,7 @@  frv_final_prescan_insn (rtx insn, rtx *o
 rtx
 frv_dynamic_chain_address (rtx frame)
 {
-  cfun->machine->frame_needed = 1;
+  MACHINE_FUNCTION (*cfun)->frame_needed = 1;
   return frame;
 }
 
@@ -2547,7 +2547,7 @@  frv_return_addr_rtx (int count, rtx fram
 {
   if (count != 0)
     return const0_rtx;
-  cfun->machine->frame_needed = 1;
+  MACHINE_FUNCTION (*cfun)->frame_needed = 1;
   return gen_rtx_MEM (Pmode, plus_constant (frame, 8));
 }
 
@@ -8254,7 +8254,8 @@  frv_register_nop (rtx nop)
 static void
 frv_reorg (void)
 {
-  if (optimize > 0 && TARGET_OPTIMIZE_MEMBAR && cfun->machine->has_membar_p)
+  if (optimize > 0 && TARGET_OPTIMIZE_MEMBAR
+      && MACHINE_FUNCTION (*cfun)->has_membar_p)
     frv_optimize_membar ();
 
   frv_num_nops = 0;
@@ -9180,7 +9181,7 @@  frv_expand_load_builtin (enum insn_code 
   op0 = frv_volatile_memref (insn_data[icode].operand[0].mode, op0);
   convert_move (target, op0, 1);
   emit_insn (GEN_FCN (icode) (copy_rtx (op0), cookie, GEN_INT (FRV_IO_READ)));
-  cfun->machine->has_membar_p = 1;
+  MACHINE_FUNCTION (*cfun)->has_membar_p = 1;
   return target;
 }
 
@@ -9196,7 +9197,7 @@  frv_expand_store_builtin (enum insn_code
   op0 = frv_volatile_memref (insn_data[icode].operand[0].mode, op0);
   convert_move (op0, force_reg (insn_data[icode].operand[0].mode, op1), 1);
   emit_insn (GEN_FCN (icode) (copy_rtx (op0), cookie, GEN_INT (FRV_IO_WRITE)));
-  cfun->machine->has_membar_p = 1;
+  MACHINE_FUNCTION (*cfun)->has_membar_p = 1;
   return NULL_RTX;
 }
 
Index: gcc/config/s390/s390.c
===================================================================
--- gcc/config/s390/s390.c	(revision 161310)
+++ gcc/config/s390/s390.c	(working copy)
@@ -318,16 +318,17 @@  struct GTY(()) machine_function
   bool has_landing_pad_p;
 };
 
-/* Few accessor macros for struct cfun->machine->s390_frame_layout.  */
+/* Few accessor macros for struct MACHINE_FUNCTION (*cfun)->s390_frame_layout.
+ */
 
-#define cfun_frame_layout (cfun->machine->frame_layout)
+#define cfun_frame_layout (MACHINE_FUNCTION (*cfun)->frame_layout)
 #define cfun_save_high_fprs_p (!!cfun_frame_layout.high_fprs)
 #define cfun_gprs_save_area_size ((cfun_frame_layout.last_save_gpr_slot -           \
   cfun_frame_layout.first_save_gpr_slot + 1) * UNITS_PER_LONG)
-#define cfun_set_fpr_bit(BITNUM) (cfun->machine->frame_layout.fpr_bitmap |=    \
-  (1 << (BITNUM)))
-#define cfun_fpr_bit_p(BITNUM) (!!(cfun->machine->frame_layout.fpr_bitmap &    \
-  (1 << (BITNUM))))
+#define cfun_set_fpr_bit(BITNUM) \
+  (MACHINE_FUNCTION (*cfun)->frame_layout.fpr_bitmap |= (1 << (BITNUM)))
+#define cfun_fpr_bit_p(BITNUM) \
+  (!!(MACHINE_FUNCTION (*cfun)->frame_layout.fpr_bitmap & (1 << (BITNUM))))
 
 /* Number of GPRs and FPRs used for argument passing.  */
 #define GP_ARG_NUM_REG 5
@@ -390,7 +391,7 @@  s390_scalar_mode_supported_p (enum machi
 void
 s390_set_has_landing_pad_p (bool value)
 {
-  cfun->machine->has_landing_pad_p = value;
+  MACHINE_FUNCTION (*cfun)->has_landing_pad_p = value;
 }
 
 /* If two condition code modes are compatible, return a condition code
@@ -1896,7 +1897,7 @@  s390_decompose_address (rtx addr, struct
         pointer = base_ptr = true;
 
       if ((reload_completed || reload_in_progress)
-	  && base == cfun->machine->base_reg)
+	  && base == MACHINE_FUNCTION (*cfun)->base_reg)
         pointer = base_ptr = literal_pool = true;
     }
 
@@ -1944,7 +1945,7 @@  s390_decompose_address (rtx addr, struct
         pointer = indx_ptr = true;
 
       if ((reload_completed || reload_in_progress)
-	  && indx == cfun->machine->base_reg)
+	  && indx == MACHINE_FUNCTION (*cfun)->base_reg)
         pointer = indx_ptr = literal_pool = true;
     }
 
@@ -4915,7 +4916,7 @@  get_some_local_dynamic_name_1 (rtx *px, 
   if (GET_CODE (x) == SYMBOL_REF
       && tls_symbolic_operand (x) == TLS_MODEL_LOCAL_DYNAMIC)
     {
-      cfun->machine->some_ld_name = XSTR (x, 0);
+      MACHINE_FUNCTION (*cfun)->some_ld_name = XSTR (x, 0);
       return 1;
     }
 
@@ -4930,13 +4931,13 @@  get_some_local_dynamic_name (void)
 {
   rtx insn;
 
-  if (cfun->machine->some_ld_name)
-    return cfun->machine->some_ld_name;
+  if (MACHINE_FUNCTION (*cfun)->some_ld_name)
+    return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
     if (INSN_P (insn)
         && for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
-      return cfun->machine->some_ld_name;
+      return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   gcc_unreachable ();
 }
@@ -5454,7 +5455,7 @@  annotate_constant_pool_refs (rtx *x)
       if (GET_CODE (memref) == SYMBOL_REF
 	  && CONSTANT_POOL_ADDRESS_P (memref))
 	{
-	  rtx base = cfun->machine->base_reg;
+	  rtx base = MACHINE_FUNCTION (*cfun)->base_reg;
 	  rtx addr = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, memref, base),
 				     UNSPEC_LTREF);
 
@@ -5470,7 +5471,7 @@  annotate_constant_pool_refs (rtx *x)
 	{
 	  HOST_WIDE_INT off = INTVAL (XEXP (XEXP (memref, 0), 1));
 	  rtx sym = XEXP (XEXP (memref, 0), 0);
-	  rtx base = cfun->machine->base_reg;
+	  rtx base = MACHINE_FUNCTION (*cfun)->base_reg;
 	  rtx addr = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, sym, base),
 				     UNSPEC_LTREF);
 
@@ -5487,7 +5488,7 @@  annotate_constant_pool_refs (rtx *x)
       if (GET_CODE (addrref) == SYMBOL_REF
 	  && CONSTANT_POOL_ADDRESS_P (addrref))
 	{
-	  rtx base = cfun->machine->base_reg;
+	  rtx base = MACHINE_FUNCTION (*cfun)->base_reg;
 	  rtx addr = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, addrref, base),
 				     UNSPEC_LTREF);
 
@@ -5503,7 +5504,7 @@  annotate_constant_pool_refs (rtx *x)
 	{
 	  HOST_WIDE_INT off = INTVAL (XEXP (XEXP (addrref, 0), 1));
 	  rtx sym = XEXP (XEXP (addrref, 0), 0);
-	  rtx base = cfun->machine->base_reg;
+	  rtx base = MACHINE_FUNCTION (*cfun)->base_reg;
 	  rtx addr = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, sym, base),
 				     UNSPEC_LTREF);
 
@@ -5516,7 +5517,7 @@  annotate_constant_pool_refs (rtx *x)
   if (GET_CODE (*x) == UNSPEC
       && XINT (*x, 1) == UNSPEC_LTREL_BASE)
     {
-      rtx base = cfun->machine->base_reg;
+      rtx base = MACHINE_FUNCTION (*cfun)->base_reg;
       *x = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, XVECEXP (*x, 0, 0), base),
 				  UNSPEC_LTREL_BASE);
       return;
@@ -5609,9 +5610,11 @@  s390_split_branches (void)
 	  INSN_ADDRESSES_NEW (tmp, -1);
 	  annotate_constant_pool_refs (&PATTERN (tmp));
 
-          target = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, XEXP (target, 0),
-							cfun->machine->base_reg),
-				   UNSPEC_LTREL_BASE);
+          target
+	    = gen_rtx_UNSPEC (Pmode,
+			      gen_rtvec (2, XEXP (target, 0),
+					 MACHINE_FUNCTION (*cfun)->base_reg),
+			      UNSPEC_LTREL_BASE);
 	  target = gen_rtx_PLUS (Pmode, temp_reg, target);
 	}
 
@@ -6245,14 +6248,14 @@  s390_mainpool_start (void)
 static void
 s390_mainpool_finish (struct constant_pool *pool)
 {
-  rtx base_reg = cfun->machine->base_reg;
+  rtx base_reg = MACHINE_FUNCTION (*cfun)->base_reg;
   rtx insn;
 
   /* If the pool is empty, we're done.  */
   if (pool->size == 0)
     {
       /* We don't actually need a base register after all.  */
-      cfun->machine->base_reg = NULL_RTX;
+      MACHINE_FUNCTION (*cfun)->base_reg = NULL_RTX;
 
       if (pool->pool_insn)
 	remove_insn (pool->pool_insn);
@@ -6623,7 +6626,7 @@  s390_chunkify_start (void)
 
   for (curr_pool = pool_list; curr_pool; curr_pool = curr_pool->next)
     {
-      rtx new_insn = gen_reload_base (cfun->machine->base_reg,
+      rtx new_insn = gen_reload_base (MACHINE_FUNCTION (*cfun)->base_reg,
 				      curr_pool->label);
       rtx insn = curr_pool->first_insn;
       INSN_ADDRESSES_NEW (emit_insn_before (new_insn, insn), -1);
@@ -6638,7 +6641,7 @@  s390_chunkify_start (void)
 	struct constant_pool *pool = s390_find_pool (pool_list, insn);
 	if (pool)
 	  {
-	    rtx new_insn = gen_reload_base (cfun->machine->base_reg,
+	    rtx new_insn = gen_reload_base (MACHINE_FUNCTION (*cfun)->base_reg,
 					    pool->label);
 	    INSN_ADDRESSES_NEW (emit_insn_after (new_insn, insn), -1);
 	  }
@@ -6931,10 +6934,10 @@  s390_regs_ever_clobbered (int *regs_ever
      may use the eh registers, but the code which sets these registers is not
      contained in that function.  Hence s390_regs_ever_clobbered is not able to
      deal with this automatically.  */
-  if (crtl->calls_eh_return || cfun->machine->has_landing_pad_p)
+  if (crtl->calls_eh_return || MACHINE_FUNCTION (*cfun)->has_landing_pad_p)
     for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM ; i++)
       if (crtl->calls_eh_return
-	  || (cfun->machine->has_landing_pad_p
+	  || (MACHINE_FUNCTION (*cfun)->has_landing_pad_p
 	      && df_regs_ever_live_p (EH_RETURN_DATA_REGNO (i))))
 	regs_ever_clobbered[EH_RETURN_DATA_REGNO (i)] = 1;
 
@@ -7001,7 +7004,8 @@  s390_frame_area (int *area_bottom, int *
   *area_top = t;
 }
 
-/* Fill cfun->machine with info about register usage of current function.
+/* Fill MACHINE_FUNCTION (*cfun) with info about register usage of
+   current function.
    Return in CLOBBERED_REGS which GPRs are currently considered set.  */
 
 static void
@@ -7039,13 +7043,13 @@  s390_register_info (int clobbered_regs[]
       |= df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM);
 
   clobbered_regs[BASE_REGNUM]
-    |= (cfun->machine->base_reg
-        && REGNO (cfun->machine->base_reg) == BASE_REGNUM);
+    |= (MACHINE_FUNCTION (*cfun)->base_reg
+        && REGNO (MACHINE_FUNCTION (*cfun)->base_reg) == BASE_REGNUM);
 
   clobbered_regs[RETURN_REGNUM]
     |= (!current_function_is_leaf
 	|| TARGET_TPF_PROFILING
-	|| cfun->machine->split_branches_pending_p
+	|| MACHINE_FUNCTION (*cfun)->split_branches_pending_p
 	|| cfun_frame_layout.save_return_addr_p
 	|| crtl->calls_eh_return
 	|| cfun->stdarg);
@@ -7160,7 +7164,7 @@  s390_register_info (int clobbered_regs[]
 	cfun_set_fpr_bit (i);
 }
 
-/* Fill cfun->machine with info about frame of current function.  */
+/* Fill MACHINE_FUNCTION (*cfun) with info about frame of current function.  */
 
 static void
 s390_frame_info (void)
@@ -7270,8 +7274,8 @@  s390_frame_info (void)
 }
 
 /* Generate frame layout.  Fills in register and frame data for the current
-   function in cfun->machine.  This routine can be called multiple times;
-   it will re-do the complete frame layout every time.  */
+   function in MACHINE_FUNCTION (*cfun).  This routine can be called multiple
+   times; it will re-do the complete frame layout every time.  */
 
 static void
 s390_init_frame_layout (void)
@@ -7285,14 +7289,14 @@  s390_init_frame_layout (void)
      choice but to assume we're going to need them until right at the
      end of the machine dependent reorg phase.  */
   if (!TARGET_CPU_ZARCH)
-    cfun->machine->split_branches_pending_p = true;
+    MACHINE_FUNCTION (*cfun)->split_branches_pending_p = true;
 
   do
     {
       frame_size = cfun_frame_layout.frame_size;
 
       /* Try to predict whether we'll need the base register.  */
-      base_used = cfun->machine->split_branches_pending_p
+      base_used = MACHINE_FUNCTION (*cfun)->split_branches_pending_p
 		  || crtl->uses_const_pool
 		  || (!DISP_IN_RANGE (frame_size)
 		      && !CONST_OK_FOR_K (frame_size));
@@ -7301,11 +7305,11 @@  s390_init_frame_layout (void)
 	 leaf functions, try to use an unused call-clobbered register
 	 as base register to avoid save/restore overhead.  */
       if (!base_used)
-	cfun->machine->base_reg = NULL_RTX;
+	MACHINE_FUNCTION (*cfun)->base_reg = NULL_RTX;
       else if (current_function_is_leaf && !df_regs_ever_live_p (5))
-	cfun->machine->base_reg = gen_rtx_REG (Pmode, 5);
+	MACHINE_FUNCTION (*cfun)->base_reg = gen_rtx_REG (Pmode, 5);
       else
-	cfun->machine->base_reg = gen_rtx_REG (Pmode, BASE_REGNUM);
+	MACHINE_FUNCTION (*cfun)->base_reg = gen_rtx_REG (Pmode, BASE_REGNUM);
 
       s390_register_info (clobbered_regs);
       s390_frame_info ();
@@ -7332,8 +7336,8 @@  s390_update_frame_layout (void)
   df_set_regs_ever_live (STACK_POINTER_REGNUM,
 			 clobbered_regs[STACK_POINTER_REGNUM] ? true : false);
 
-  if (cfun->machine->base_reg)
-    df_set_regs_ever_live (REGNO (cfun->machine->base_reg), true);
+  if (MACHINE_FUNCTION (*cfun)->base_reg)
+    df_set_regs_ever_live (REGNO (MACHINE_FUNCTION (*cfun)->base_reg), true);
 }
 
 /* Return true if it is legal to put a value with MODE into REGNO.  */
@@ -7391,9 +7395,9 @@  s390_hard_regno_rename_ok (unsigned int 
 {
    /* Once we've decided upon a register to use as base register, it must
       no longer be used for any other purpose.  */
-  if (cfun->machine->base_reg)
-    if (REGNO (cfun->machine->base_reg) == old_reg
-	|| REGNO (cfun->machine->base_reg) == new_reg)
+  if (MACHINE_FUNCTION (*cfun)->base_reg)
+    if (REGNO (MACHINE_FUNCTION (*cfun)->base_reg) == old_reg
+	|| REGNO (MACHINE_FUNCTION (*cfun)->base_reg) == new_reg)
       return false;
 
   return true;
@@ -7438,7 +7442,7 @@  s390_can_eliminate (const int from, cons
       if (TARGET_CPU_ZARCH)
 	{
 	  s390_init_frame_layout ();
-	  return cfun->machine->base_reg == NULL_RTX;
+	  return MACHINE_FUNCTION (*cfun)->base_reg == NULL_RTX;
 	}
 
       return false;
@@ -7786,8 +7790,8 @@  s390_emit_prologue (void)
 
   /* Dummy insn to mark literal pool slot.  */
 
-  if (cfun->machine->base_reg)
-    emit_insn (gen_main_pool (cfun->machine->base_reg));
+  if (MACHINE_FUNCTION (*cfun)->base_reg)
+    emit_insn (gen_main_pool (MACHINE_FUNCTION (*cfun)->base_reg));
 
   offset = cfun_frame_layout.f0_offset;
 
@@ -10150,7 +10154,7 @@  s390_reorg (void)
 	s390_mainpool_finish (pool);
 
       /* We're done splitting branches.  */
-      cfun->machine->split_branches_pending_p = false;
+      MACHINE_FUNCTION (*cfun)->split_branches_pending_p = false;
       break;
     }
 
Index: gcc/config/m32c/m32c.c
===================================================================
--- gcc/config/m32c/m32c.c	(revision 161310)
+++ gcc/config/m32c/m32c.c	(working copy)
@@ -1154,14 +1154,14 @@  m32c_eh_return_data_regno (int n)
 rtx
 m32c_eh_return_stackadj_rtx (void)
 {
-  if (!cfun->machine->eh_stack_adjust)
+  if (!MACHINE_FUNCTION (*cfun)->eh_stack_adjust)
     {
       rtx sa;
 
       sa = gen_rtx_REG (Pmode, R0_REGNO);
-      cfun->machine->eh_stack_adjust = sa;
+      MACHINE_FUNCTION (*cfun)->eh_stack_adjust = sa;
     }
-  return cfun->machine->eh_stack_adjust;
+  return MACHINE_FUNCTION (*cfun)->eh_stack_adjust;
 }
 
 /* Registers That Address the Stack Frame */
@@ -1261,14 +1261,14 @@  need_to_save (int regno)
     return 1;
   if (regno == FP_REGNO)
     return 0;
-  if (cfun->machine->is_interrupt
-      && (!cfun->machine->is_leaf
+  if (MACHINE_FUNCTION (*cfun)->is_interrupt
+      && (!MACHINE_FUNCTION (*cfun)->is_leaf
 	  || (regno == A0_REGNO
 	      && m32c_function_needs_enter ())
 	  ))
     return 1;
   if (df_regs_ever_live_p (regno)
-      && (!call_used_regs[regno] || cfun->machine->is_interrupt))
+      && (!call_used_regs[regno] || MACHINE_FUNCTION (*cfun)->is_interrupt))
     return 1;
   return 0;
 }
@@ -1292,7 +1292,7 @@  m32c_pushm_popm (Push_Pop_Type ppt)
 
   if (crtl->return_rtx
       && GET_CODE (crtl->return_rtx) == PARALLEL
-      && !(crtl->calls_eh_return || cfun->machine->is_interrupt))
+      && !(crtl->calls_eh_return || MACHINE_FUNCTION (*cfun)->is_interrupt))
     {
       rtx exp = XVECEXP (crtl->return_rtx, 0, 0);
       rtx rv = XEXP (exp, 0);
@@ -1342,19 +1342,19 @@  m32c_pushm_popm (Push_Pop_Type ppt)
       byte_count += bytes;
     }
 
-  if (cfun->machine->is_interrupt)
+  if (MACHINE_FUNCTION (*cfun)->is_interrupt)
     {
-      cfun->machine->intr_pushm = reg_mask & 0xfe;
+      MACHINE_FUNCTION (*cfun)->intr_pushm = reg_mask & 0xfe;
       reg_mask = 0;
       byte_count = 0;
     }
 
-  if (cfun->machine->is_interrupt)
+  if (MACHINE_FUNCTION (*cfun)->is_interrupt)
     for (i = MEM0_REGNO; i <= MEM7_REGNO; i++)
       if (need_to_save (i))
 	{
 	  byte_count += 2;
-	  cfun->machine->intr_pushmem[i - MEM0_REGNO] = 1;
+	  MACHINE_FUNCTION (*cfun)->intr_pushmem[i - MEM0_REGNO] = 1;
 	}
 
   if (ppt == PP_pushm && byte_count)
@@ -1381,9 +1381,9 @@  m32c_pushm_popm (Push_Pop_Type ppt)
 						 REG_NOTES (pushm));
 	}
 
-      if (cfun->machine->is_interrupt)
+      if (MACHINE_FUNCTION (*cfun)->is_interrupt)
 	for (i = MEM0_REGNO; i <= MEM7_REGNO; i++)
-	  if (cfun->machine->intr_pushmem[i - MEM0_REGNO])
+	  if (MACHINE_FUNCTION (*cfun)->intr_pushmem[i - MEM0_REGNO])
 	    {
 	      if (TARGET_A16)
 		pushm = emit_insn (gen_pushhi_16 (gen_rtx_REG (HImode, i)));
@@ -1394,9 +1394,9 @@  m32c_pushm_popm (Push_Pop_Type ppt)
     }
   if (ppt == PP_popm && byte_count)
     {
-      if (cfun->machine->is_interrupt)
+      if (MACHINE_FUNCTION (*cfun)->is_interrupt)
 	for (i = MEM7_REGNO; i >= MEM0_REGNO; i--)
-	  if (cfun->machine->intr_pushmem[i - MEM0_REGNO])
+	  if (MACHINE_FUNCTION (*cfun)->intr_pushmem[i - MEM0_REGNO])
 	    {
 	      if (TARGET_A16)
 		emit_insn (gen_pophi_16 (gen_rtx_REG (HImode, i)));
@@ -1694,7 +1694,7 @@  m32c_struct_value_rtx (tree fndecl ATTRI
 int
 m32c_epilogue_uses (int regno ATTRIBUTE_UNUSED)
 {
-  if (cfun->machine->is_interrupt)
+  if (MACHINE_FUNCTION (*cfun)->is_interrupt)
     return 1;
   return 0;
 }
@@ -3985,10 +3985,10 @@  m32c_emit_prologue (void)
   int frame_size, extra_frame_size = 0, reg_save_size;
   int complex_prologue = 0;
 
-  cfun->machine->is_leaf = m32c_leaf_function_p ();
+  MACHINE_FUNCTION (*cfun)->is_leaf = m32c_leaf_function_p ();
   if (interrupt_p (cfun->decl))
     {
-      cfun->machine->is_interrupt = 1;
+      MACHINE_FUNCTION (*cfun)->is_interrupt = 1;
       complex_prologue = 1;
     }
   else if (bank_switch_p (cfun->decl))
@@ -4001,22 +4001,22 @@  m32c_emit_prologue (void)
     {
       if (bank_switch_p (cfun->decl))
 	emit_insn (gen_fset_b ());
-      else if (cfun->machine->intr_pushm)
-	emit_insn (gen_pushm (GEN_INT (cfun->machine->intr_pushm)));
+      else if (MACHINE_FUNCTION (*cfun)->intr_pushm)
+	emit_insn (gen_pushm (GEN_INT (MACHINE_FUNCTION (*cfun)->intr_pushm)));
     }
 
   frame_size =
     m32c_initial_elimination_offset (FB_REGNO, SP_REGNO) - reg_save_size;
   if (frame_size == 0
       && !m32c_function_needs_enter ())
-    cfun->machine->use_rts = 1;
+    MACHINE_FUNCTION (*cfun)->use_rts = 1;
 
   if (frame_size > 254)
     {
       extra_frame_size = frame_size - 254;
       frame_size = 254;
     }
-  if (cfun->machine->use_rts == 0)
+  if (MACHINE_FUNCTION (*cfun)->use_rts == 0)
     F (emit_insn (m32c_all_frame_related
 		  (TARGET_A16
 		   ? gen_prologue_enter_16 (GEN_INT (frame_size + 2))
@@ -4049,19 +4049,20 @@  void
 m32c_emit_epilogue (void)
 {
   /* This just emits a comment into the .s file for debugging.  */
-  if (m32c_pushm_popm (PP_justcount) > 0 || cfun->machine->is_interrupt)
+  if (m32c_pushm_popm (PP_justcount) > 0
+      || MACHINE_FUNCTION (*cfun)->is_interrupt)
     emit_insn (gen_epilogue_start ());
 
   m32c_pushm_popm (PP_popm);
 
-  if (cfun->machine->is_interrupt)
+  if (MACHINE_FUNCTION (*cfun)->is_interrupt)
     {
       enum machine_mode spmode = TARGET_A16 ? HImode : PSImode;
 
       /* REIT clears B flag and restores $fp for us, but we still
 	 have to fix up the stack.  USE_RTS just means we didn't
 	 emit ENTER.  */
-      if (!cfun->machine->use_rts)
+      if (!MACHINE_FUNCTION (*cfun)->use_rts)
 	{
 	  emit_move_insn (gen_rtx_REG (spmode, A0_REGNO),
 			  gen_rtx_REG (spmode, FP_REGNO));
@@ -4075,8 +4076,8 @@  m32c_emit_epilogue (void)
 	  else
 	    emit_insn (gen_poppsi (gen_rtx_REG (PSImode, FP_REGNO)));
 	}
-      if (!bank_switch_p (cfun->decl) && cfun->machine->intr_pushm)
-	emit_insn (gen_popm (GEN_INT (cfun->machine->intr_pushm)));
+      if (!bank_switch_p (cfun->decl) && MACHINE_FUNCTION (*cfun)->intr_pushm)
+	emit_insn (gen_popm (GEN_INT (MACHINE_FUNCTION (*cfun)->intr_pushm)));
 
       /* The FREIT (Fast REturn from InTerrupt) instruction should be
          generated only for M32C/M32CM targets (generate the REIT
@@ -4103,7 +4104,7 @@  m32c_emit_epilogue (void)
       else
 	emit_jump_insn (gen_epilogue_reit_24 ());
     }
-  else if (cfun->machine->use_rts)
+  else if (MACHINE_FUNCTION (*cfun)->use_rts)
     emit_jump_insn (gen_epilogue_rts ());
   else if (TARGET_A16)
     emit_jump_insn (gen_epilogue_exitd_16 ());
@@ -4119,7 +4120,8 @@  m32c_emit_eh_epilogue (rtx ret_addr)
      return to.  We have to fudge the stack, pop everything, pop SP
      (fudged), and return (fudged).  This is actually easier to do in
      assembler, so punt to libgcc.  */
-  emit_jump_insn (gen_eh_epilogue (ret_addr, cfun->machine->eh_stack_adjust));
+  emit_jump_insn (gen_eh_epilogue (ret_addr,
+				   MACHINE_FUNCTION (*cfun)->eh_stack_adjust));
   /*  emit_clobber (gen_rtx_REG (HImode, R0L_REGNO)); */
   emit_barrier ();
 }
Index: gcc/config/sparc/sparc.c
===================================================================
--- gcc/config/sparc/sparc.c	(revision 161310)
+++ gcc/config/sparc/sparc.c	(working copy)
@@ -332,8 +332,9 @@  struct GTY(()) machine_function
   bool prologue_data_valid_p;
 };
 
-#define sparc_leaf_function_p  cfun->machine->leaf_function_p
-#define sparc_prologue_data_valid_p  cfun->machine->prologue_data_valid_p
+#define sparc_leaf_function_p  MACHINE_FUNCTION (*cfun)->leaf_function_p
+#define sparc_prologue_data_valid_p \
+  MACHINE_FUNCTION (*cfun)->prologue_data_valid_p
 
 /* Register we pretend to think the frame pointer is allocated to.
    Normally, this is %fp, but if we are in a leaf procedure, this
@@ -9043,13 +9044,13 @@  get_some_local_dynamic_name (void)
 {
   rtx insn;
 
-  if (cfun->machine->some_ld_name)
-    return cfun->machine->some_ld_name;
+  if (MACHINE_FUNCTION (*cfun)->some_ld_name)
+    return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
     if (INSN_P (insn)
 	&& for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
-      return cfun->machine->some_ld_name;
+      return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   gcc_unreachable ();
 }
@@ -9063,7 +9064,7 @@  get_some_local_dynamic_name_1 (rtx *px, 
       && GET_CODE (x) == SYMBOL_REF
       && SYMBOL_REF_TLS_MODEL (x) == TLS_MODEL_LOCAL_DYNAMIC)
     {
-      cfun->machine->some_ld_name = XSTR (x, 0);
+      MACHINE_FUNCTION (*cfun)->some_ld_name = XSTR (x, 0);
       return 1;
     }
 
Index: gcc/config/mep/mep.c
===================================================================
--- gcc/config/mep/mep.c	(revision 161310)
+++ gcc/config/mep/mep.c	(working copy)
@@ -1477,7 +1477,7 @@  mep_expand_mov (rtx *operands, enum mach
       rtx r;
 
       if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) == TP_REGNO)
-	cfun->machine->reload_changes_tp = true;
+	MACHINE_FUNCTION (*cfun)->reload_changes_tp = true;
 
       if (tag[0] == 't' || tag[1] == 't')
 	{
@@ -1491,7 +1491,7 @@  mep_expand_mov (rtx *operands, enum mach
 	  if (!r || GET_CODE (r) != REG || REGNO (r) != TP_REGNO)
 	    post_reload = 1;
 	}
-      if (cfun->machine->reload_changes_tp == true)
+      if (MACHINE_FUNCTION (*cfun)->reload_changes_tp == true)
 	post_reload = 1;
     }
 
@@ -2390,13 +2390,14 @@  mep_allocate_initial_value (rtx reg)
     if (mep_interrupt_p ())
       return NULL_RTX;
 
-  if (! cfun->machine->reg_save_slot[REGNO(reg)])
+  if (! MACHINE_FUNCTION (*cfun)->reg_save_slot[REGNO(reg)])
     {
-      cfun->machine->reg_save_size += 4;
-      cfun->machine->reg_save_slot[REGNO(reg)] = cfun->machine->reg_save_size;
+      MACHINE_FUNCTION (*cfun)->reg_save_size += 4;
+      MACHINE_FUNCTION (*cfun)->reg_save_slot[REGNO(reg)]
+	= MACHINE_FUNCTION (*cfun)->reg_save_size;
     }
 
-  rss = cfun->machine->reg_save_slot[REGNO(reg)];
+  rss = MACHINE_FUNCTION (*cfun)->reg_save_slot[REGNO(reg)];
   return gen_rtx_MEM (SImode, plus_constant (arg_pointer_rtx, -rss));
 }
 
@@ -2424,29 +2425,29 @@  mep_gp_rtx (void)
 static bool
 mep_interrupt_p (void)
 {
-  if (cfun->machine->interrupt_handler == 0)
+  if (MACHINE_FUNCTION (*cfun)->interrupt_handler == 0)
     {
       int interrupt_handler
 	= (lookup_attribute ("interrupt",
 			     DECL_ATTRIBUTES (current_function_decl))
 	   != NULL_TREE);
-      cfun->machine->interrupt_handler = interrupt_handler ? 2 : 1;
+      MACHINE_FUNCTION (*cfun)->interrupt_handler = interrupt_handler ? 2 : 1;
     }
-  return cfun->machine->interrupt_handler == 2;
+  return MACHINE_FUNCTION (*cfun)->interrupt_handler == 2;
 }
 
 static bool
 mep_disinterrupt_p (void)
 {
-  if (cfun->machine->disable_interrupts == 0)
+  if (MACHINE_FUNCTION (*cfun)->disable_interrupts == 0)
     {
       int disable_interrupts
 	= (lookup_attribute ("disinterrupt",
 			     DECL_ATTRIBUTES (current_function_decl))
 	   != NULL_TREE);
-      cfun->machine->disable_interrupts = disable_interrupts ? 2 : 1;
+      MACHINE_FUNCTION (*cfun)->disable_interrupts = disable_interrupts ? 2 : 1;
     }
-  return cfun->machine->disable_interrupts == 2;
+  return MACHINE_FUNCTION (*cfun)->disable_interrupts == 2;
 }
 
 
@@ -2507,7 +2508,7 @@  mep_reg_set_in_function (int regno)
 static bool
 mep_asm_without_operands_p (void)
 {
-  if (cfun->machine->asms_without_operands == 0)
+  if (MACHINE_FUNCTION (*cfun)->asms_without_operands == 0)
     {
       rtx insn;
 
@@ -2515,20 +2516,20 @@  mep_asm_without_operands_p (void)
       insn = get_insns ();
       pop_topmost_sequence ();
 
-      cfun->machine->asms_without_operands = 1;
+      MACHINE_FUNCTION (*cfun)->asms_without_operands = 1;
       while (insn)
 	{
 	  if (INSN_P (insn)
 	      && GET_CODE (PATTERN (insn)) == ASM_INPUT)
 	    {
-	      cfun->machine->asms_without_operands = 2;
+	      MACHINE_FUNCTION (*cfun)->asms_without_operands = 2;
 	      break;
 	    }
 	  insn = NEXT_INSN (insn);
 	}
 
     }
-  return cfun->machine->asms_without_operands == 2;
+  return MACHINE_FUNCTION (*cfun)->asms_without_operands == 2;
 }
 
 /* Interrupt functions save/restore every call-preserved register, and
@@ -2558,7 +2559,7 @@  mep_interrupt_saved_reg (int r)
     /* Function calls mean we need to save $lp.  */
     if (r == LP_REGNO || IVC2_ISAVED_REG (r))
       return true;
-  if (!current_function_is_leaf || cfun->machine->doloop_tags > 0)
+  if (!current_function_is_leaf || MACHINE_FUNCTION (*cfun)->doloop_tags > 0)
     /* The interrupt handler might use these registers for repeat blocks,
        or it might call a function that does so.  */
     if (r == RPB_REGNO || r == RPE_REGNO || r == RPC_REGNO)
@@ -2578,11 +2579,11 @@  mep_interrupt_saved_reg (int r)
 static bool
 mep_call_saves_register (int r)
 {
-  if (! cfun->machine->frame_locked)
+  if (! MACHINE_FUNCTION (*cfun)->frame_locked)
     {
       int rv = MEP_SAVES_NO;
 
-      if (cfun->machine->reg_save_slot[r])
+      if (MACHINE_FUNCTION (*cfun)->reg_save_slot[r])
   	rv = MEP_SAVES_YES;
       else if (r == LP_REGNO && (profile_arc_flag > 0 || profile_flag > 0))
 	rv = MEP_SAVES_YES;
@@ -2596,9 +2597,9 @@  mep_call_saves_register (int r)
 	rv = MEP_SAVES_YES;
       else if (mep_interrupt_saved_reg (r))
 	rv = MEP_SAVES_YES;
-      cfun->machine->reg_saved[r] = rv;
+      MACHINE_FUNCTION (*cfun)->reg_saved[r] = rv;
     }
-  return cfun->machine->reg_saved[r] == MEP_SAVES_YES;
+  return MACHINE_FUNCTION (*cfun)->reg_saved[r] == MEP_SAVES_YES;
 }
 
 /* Return true if epilogue uses register REGNO.  */
@@ -2643,8 +2644,9 @@  mep_elimination_offset (int from, int to
   int frame_size = get_frame_size () + crtl->outgoing_args_size;
   int total_size;
 
-  if (!cfun->machine->frame_locked)
-    memset (cfun->machine->reg_saved, 0, sizeof (cfun->machine->reg_saved));
+  if (!MACHINE_FUNCTION (*cfun)->frame_locked)
+    memset (MACHINE_FUNCTION (*cfun)->reg_saved, 0,
+	    sizeof (MACHINE_FUNCTION (*cfun)->reg_saved));
 
   /* We don't count arg_regs_to_save in the arg pointer offset, because
      gcc thinks the arg pointer has moved along with the saved regs.
@@ -2655,27 +2657,29 @@  mep_elimination_offset (int from, int to
       reg_save_size += mep_reg_size (i);
 
   if (reg_save_size % 8)
-    cfun->machine->regsave_filler = 8 - (reg_save_size % 8);
+    MACHINE_FUNCTION (*cfun)->regsave_filler = 8 - (reg_save_size % 8);
   else
-    cfun->machine->regsave_filler = 0;
+    MACHINE_FUNCTION (*cfun)->regsave_filler = 0;
 
   /* This is what our total stack adjustment looks like.  */
-  total_size = (reg_save_size + frame_size + cfun->machine->regsave_filler);
+  total_size = (reg_save_size + frame_size
+		+ MACHINE_FUNCTION (*cfun)->regsave_filler);
 
   if (total_size % 8)
-    cfun->machine->frame_filler = 8 - (total_size % 8);
+    MACHINE_FUNCTION (*cfun)->frame_filler = 8 - (total_size % 8);
   else
-    cfun->machine->frame_filler = 0;
+    MACHINE_FUNCTION (*cfun)->frame_filler = 0;
 
 
   if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM)
-    return reg_save_size + cfun->machine->regsave_filler;
+    return reg_save_size + MACHINE_FUNCTION (*cfun)->regsave_filler;
 
   if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
-    return cfun->machine->frame_filler + frame_size;
+    return MACHINE_FUNCTION (*cfun)->frame_filler + frame_size;
 
   if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
-    return reg_save_size + cfun->machine->regsave_filler + cfun->machine->frame_filler + frame_size;
+    return (reg_save_size + MACHINE_FUNCTION (*cfun)->regsave_filler
+	    + MACHINE_FUNCTION (*cfun)->frame_filler + frame_size);
 
   gcc_unreachable ();
 }
@@ -2803,21 +2807,23 @@  mep_assign_save_slots (int reg_save_size
 	    || mep_reg_set_in_function (i))
 	  really_need_stack_frame = true;
 
-	if (cfun->machine->reg_save_slot[i])
+	if (MACHINE_FUNCTION (*cfun)->reg_save_slot[i])
 	  continue;
 
 	if (regsize < 8)
 	  {
-	    cfun->machine->reg_save_size += regsize;
-	    cfun->machine->reg_save_slot[i] = cfun->machine->reg_save_size;
+	    MACHINE_FUNCTION (*cfun)->reg_save_size += regsize;
+	    MACHINE_FUNCTION (*cfun)->reg_save_slot[i]
+	      = MACHINE_FUNCTION (*cfun)->reg_save_size;
 	  }
 	else
 	  {
-	    cfun->machine->reg_save_slot[i] = reg_save_size - di_ofs;
+	    MACHINE_FUNCTION (*cfun)->reg_save_slot[i]
+	      = reg_save_size - di_ofs;
 	    di_ofs += 8;
 	  }
       }
-  cfun->machine->frame_locked = 1;
+  MACHINE_FUNCTION (*cfun)->frame_locked = 1;
   return really_need_stack_frame;
 }
 
@@ -2837,7 +2843,7 @@  mep_expand_prologue (void)
   if (mep_disinterrupt_p ())
     emit_insn (gen_mep_disable_int ());
 
-  cfun->machine->mep_frame_pointer_needed = frame_pointer_needed;
+  MACHINE_FUNCTION (*cfun)->mep_frame_pointer_needed = frame_pointer_needed;
 
   reg_save_size = mep_elimination_offset (ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM);
   frame_size = mep_elimination_offset (FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM);
@@ -2858,7 +2864,7 @@  mep_expand_prologue (void)
 	bool maybe_dead_p;
 	enum machine_mode rmode;
 
-	rss = cfun->machine->reg_save_slot[i];
+	rss = MACHINE_FUNCTION (*cfun)->reg_save_slot[i];
 
   	if ((i == TP_REGNO || i == GP_REGNO || i == LP_REGNO)
 	    && (!mep_reg_set_in_function (i)
@@ -2962,9 +2968,9 @@  mep_start_function (FILE *file, HOST_WID
   frame_size = mep_elimination_offset (FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM);
   sp_offset = reg_save_size + frame_size;
 
-  ffill = cfun->machine->frame_filler;
+  ffill = MACHINE_FUNCTION (*cfun)->frame_filler;
 
-  if (cfun->machine->mep_frame_pointer_needed)
+  if (MACHINE_FUNCTION (*cfun)->mep_frame_pointer_needed)
     reg_names[FP_REGNO] = "$fp";
   else
     reg_names[FP_REGNO] = "$8";
@@ -2996,8 +3002,8 @@  mep_start_function (FILE *file, HOST_WID
     slot_map[si] = si;
   for (si=0; si<FIRST_PSEUDO_REGISTER-1; si++)
     for (sj=si+1; sj<FIRST_PSEUDO_REGISTER; sj++)
-      if (cfun->machine->reg_save_slot[slot_map[si]]
-	  > cfun->machine->reg_save_slot[slot_map[sj]])
+      if (MACHINE_FUNCTION (*cfun)->reg_save_slot[slot_map[si]]
+	  > MACHINE_FUNCTION (*cfun)->reg_save_slot[slot_map[sj]])
 	{
 	  int t = slot_map[si];
 	  slot_map[si] = slot_map[sj];
@@ -3009,7 +3015,7 @@  mep_start_function (FILE *file, HOST_WID
     {
       int rsize;
       int r = slot_map[i];
-      int rss = cfun->machine->reg_save_slot[r];
+      int rss = MACHINE_FUNCTION (*cfun)->reg_save_slot[r];
 
       if (!mep_call_saves_register (r))
 	continue;
@@ -3094,7 +3100,7 @@  mep_expand_epilogue (void)
     if (mep_call_saves_register (i))
       {
 	enum machine_mode rmode;
-	int rss = cfun->machine->reg_save_slot[i];
+	int rss = MACHINE_FUNCTION (*cfun)->reg_save_slot[i];
 
 	if (mep_reg_size (i) == 8)
 	  rmode = DImode;
@@ -3151,7 +3157,7 @@  mep_expand_epilogue (void)
   if (crtl->calls_eh_return && mep_prevent_lp_restore)
     emit_insn (gen_addsi3 (gen_rtx_REG (SImode, SP_REGNO),
 			   gen_rtx_REG (SImode, SP_REGNO),
-			   cfun->machine->eh_stack_adjust));
+			   MACHINE_FUNCTION (*cfun)->eh_stack_adjust));
 
   if (mep_sibcall_epilogue)
     return;
@@ -3186,7 +3192,7 @@  mep_expand_eh_return (rtx *operands)
 void
 mep_emit_eh_epilogue (rtx *operands ATTRIBUTE_UNUSED)
 {
-  cfun->machine->eh_stack_adjust = gen_rtx_REG (Pmode, 0);
+  MACHINE_FUNCTION (*cfun)->eh_stack_adjust = gen_rtx_REG (Pmode, 0);
   mep_prevent_lp_restore = 1;
   mep_expand_epilogue ();
   mep_prevent_lp_restore = 0;
@@ -3533,7 +3539,7 @@  mep_setup_incoming_varargs (CUMULATIVE_A
   int nsave = 4 - (cum->nregs + 1);
 
   if (nsave > 0)
-    cfun->machine->arg_regs_to_save = nsave;
+    MACHINE_FUNCTION (*cfun)->arg_regs_to_save = nsave;
   *pretend_size = nsave * 4;
 }
 
@@ -3551,7 +3557,7 @@  mep_expand_builtin_saveregs (void)
   int bufsize, i, ns;
   rtx regbuf;
 
-  ns = cfun->machine->arg_regs_to_save;
+  ns = MACHINE_FUNCTION (*cfun)->arg_regs_to_save;
   if (TARGET_IVC2)
     {
       bufsize = 8 * ((ns + 1) / 2) + 8 * ns;
@@ -3627,7 +3633,7 @@  mep_expand_va_start (tree valist, rtx ne
   tree t, u;
   int ns;
 
-  ns = cfun->machine->arg_regs_to_save;
+  ns = MACHINE_FUNCTION (*cfun)->arg_regs_to_save;
 
   f_next_gp = TYPE_FIELDS (va_list_type_node);
   f_next_gp_limit = TREE_CHAIN (f_next_gp);
@@ -5216,14 +5222,14 @@  mep_emit_doloop (rtx *operands, int is_e
 {
   rtx tag;
 
-  if (cfun->machine->doloop_tags == 0
-      || cfun->machine->doloop_tag_from_end == is_end)
+  if (MACHINE_FUNCTION (*cfun)->doloop_tags == 0
+      || MACHINE_FUNCTION (*cfun)->doloop_tag_from_end == is_end)
     {
-      cfun->machine->doloop_tags++;
-      cfun->machine->doloop_tag_from_end = is_end;
+      MACHINE_FUNCTION (*cfun)->doloop_tags++;
+      MACHINE_FUNCTION (*cfun)->doloop_tag_from_end = is_end;
     }
 
-  tag = GEN_INT (cfun->machine->doloop_tags - 1);
+  tag = GEN_INT (MACHINE_FUNCTION (*cfun)->doloop_tags - 1);
   if (is_end)
     emit_jump_insn (gen_doloop_end_internal (operands[0], operands[4], tag));
   else
@@ -5403,12 +5409,14 @@  mep_reorg_repeat (rtx insns)
   struct mep_doloop_end *end;
 
   /* Quick exit if we haven't created any loops.  */
-  if (cfun->machine->doloop_tags == 0)
+  if (MACHINE_FUNCTION (*cfun)->doloop_tags == 0)
     return;
 
   /* Create an array of mep_doloop structures.  */
-  loops = (struct mep_doloop *) alloca (sizeof (loops[0]) * cfun->machine->doloop_tags);
-  memset (loops, 0, sizeof (loops[0]) * cfun->machine->doloop_tags);
+  loops
+    = (struct mep_doloop *) alloca (sizeof (loops[0])
+				    * MACHINE_FUNCTION (*cfun)->doloop_tags);
+  memset (loops, 0, sizeof (loops[0]) * MACHINE_FUNCTION (*cfun)->doloop_tags);
 
   /* Search the function for do-while insns and group them by loop tag.  */
   for (insn = insns; insn; insn = NEXT_INSN (insn))
@@ -5454,7 +5462,8 @@  mep_reorg_repeat (rtx insns)
 	}
 
   /* Convert the insns for each loop in turn.  */
-  for (loop = loops; loop < loops + cfun->machine->doloop_tags; loop++)
+  for (loop = loops; loop < loops + MACHINE_FUNCTION (*cfun)->doloop_tags;
+       loop++)
     if (mep_repeat_loop_p (loop))
       {
 	/* Case (1) or (2).  */
Index: gcc/config/i386/i386.h
===================================================================
--- gcc/config/i386/i386.h	(revision 161310)
+++ gcc/config/i386/i386.h	(working copy)
@@ -2384,13 +2384,14 @@  struct GTY(()) machine_function {
 };
 #endif
 
-#define ix86_stack_locals (cfun->machine->stack_locals)
-#define ix86_varargs_gpr_size (cfun->machine->varargs_gpr_size)
-#define ix86_varargs_fpr_size (cfun->machine->varargs_fpr_size)
-#define ix86_optimize_mode_switching (cfun->machine->optimize_mode_switching)
-#define ix86_current_function_needs_cld (cfun->machine->needs_cld)
+#define ix86_stack_locals (MACHINE_FUNCTION (*cfun)->stack_locals)
+#define ix86_varargs_gpr_size (MACHINE_FUNCTION (*cfun)->varargs_gpr_size)
+#define ix86_varargs_fpr_size (MACHINE_FUNCTION (*cfun)->varargs_fpr_size)
+#define ix86_optimize_mode_switching \
+  (MACHINE_FUNCTION (*cfun)->optimize_mode_switching)
+#define ix86_current_function_needs_cld (MACHINE_FUNCTION (*cfun)->needs_cld)
 #define ix86_tls_descriptor_calls_expanded_in_cfun \
-  (cfun->machine->tls_descriptor_call_expanded_p)
+  (MACHINE_FUNCTION (*cfun)->tls_descriptor_call_expanded_p)
 /* Since tls_descriptor_call_expanded is not cleared, even if all TLS
    calls are optimized away, we try to detect cases in which it was
    optimized away.  Since such instructions (use (reg REG_SP)), we can
@@ -2398,8 +2399,9 @@  struct GTY(()) machine_function {
    REG_SP is live.  */
 #define ix86_current_function_calls_tls_descriptor \
   (ix86_tls_descriptor_calls_expanded_in_cfun && df_regs_ever_live_p (SP_REG))
-#define ix86_cfa_state (&cfun->machine->cfa)
-#define ix86_static_chain_on_stack (cfun->machine->static_chain_on_stack)
+#define ix86_cfa_state (&MACHINE_FUNCTION (*cfun)->cfa)
+#define ix86_static_chain_on_stack \
+  (MACHINE_FUNCTION (*cfun)->static_chain_on_stack)
 
 /* Control behavior of x86_file_start.  */
 #define X86_FILE_START_VERSION_DIRECTIVE false
Index: gcc/config/i386/cygming.h
===================================================================
--- gcc/config/i386/cygming.h	(revision 161310)
+++ gcc/config/i386/cygming.h	(working copy)
@@ -34,7 +34,9 @@  along with GCC; see the file COPYING3.  
 #endif
 
 #undef TARGET_64BIT_MS_ABI
-#define TARGET_64BIT_MS_ABI (!cfun ? ix86_abi == MS_ABI : TARGET_64BIT && cfun->machine->call_abi == MS_ABI)
+#define TARGET_64BIT_MS_ABI \
+  (!cfun ? ix86_abi == MS_ABI \
+   : TARGET_64BIT && MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI)
 
 #undef DEFAULT_ABI
 #define DEFAULT_ABI (TARGET_64BIT ? MS_ABI : SYSV_ABI)
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 161310)
+++ gcc/config/i386/i386.c	(working copy)
@@ -4480,7 +4480,7 @@  ix86_function_ok_for_sibcall (tree decl,
     {
       /* The SYSV ABI has more call-clobbered registers;
 	 disallow sibcalls from MS to SYSV.  */
-      if (cfun->machine->call_abi == MS_ABI
+      if (MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI
 	  && ix86_function_type_abi (type) == SYSV_ABI)
 	return false;
     }
@@ -5013,7 +5013,7 @@  ix86_cfun_abi (void)
 {
   if (! cfun || ! TARGET_64BIT)
     return ix86_abi;
-  return cfun->machine->call_abi;
+  return MACHINE_FUNCTION (*cfun)->call_abi;
 }
 
 /* regclass.c  */
@@ -5026,9 +5026,10 @@  void
 ix86_call_abi_override (const_tree fndecl)
 {
   if (fndecl == NULL_TREE)
-    cfun->machine->call_abi = ix86_abi;
+    MACHINE_FUNCTION (*cfun)->call_abi = ix86_abi;
   else
-    cfun->machine->call_abi = ix86_function_type_abi (TREE_TYPE (fndecl));
+    MACHINE_FUNCTION (*cfun)->call_abi
+      = ix86_function_type_abi (TREE_TYPE (fndecl));
 }
 
 /* MS and SYSV ABI have different set of call used registers.  Avoid expensive
@@ -5038,7 +5039,7 @@  static void
 ix86_maybe_switch_abi (void)
 {
   if (TARGET_64BIT &&
-      call_used_regs[SI_REG] == (cfun->machine->call_abi == MS_ABI))
+      call_used_regs[SI_REG] == (MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI))
     reinit_regs ();
 }
 
@@ -7688,7 +7689,7 @@  ix86_frame_pointer_required (void)
 {
   /* If we accessed previous frames, then the generated code expects
      to be able to access the saved ebp value in our frame.  */
-  if (cfun->machine->accesses_prev_frame)
+  if (MACHINE_FUNCTION (*cfun)->accesses_prev_frame)
     return true;
 
   /* Several x86 os'es need a frame pointer for other reasons,
@@ -7715,7 +7716,7 @@  ix86_frame_pointer_required (void)
 void
 ix86_setup_frame_addresses (void)
 {
-  cfun->machine->accesses_prev_frame = 1;
+  MACHINE_FUNCTION (*cfun)->accesses_prev_frame = 1;
 }
 
 #ifndef USE_HIDDEN_LINKONCE
@@ -8149,12 +8150,13 @@  ix86_compute_frame_layout (struct ix86_f
      didn't change as reload does multiple calls to the function and does not
      expect the decision to change within single iteration.  */
   if (!optimize_function_for_size_p (cfun)
-      && cfun->machine->use_fast_prologue_epilogue_nregs != frame->nregs)
+      && (MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue_nregs
+	  != frame->nregs))
     {
       int count = frame->nregs;
       struct cgraph_node *node = cgraph_node (current_function_decl);
 
-      cfun->machine->use_fast_prologue_epilogue_nregs = count;
+      MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue_nregs = count;
       /* The fast prologue uses move instead of push to save registers.  This
          is significantly longer, but also executes faster as modern hardware
          can execute the moves in parallel, but can't do that for push/pop.
@@ -8170,13 +8172,13 @@  ix86_compute_frame_layout (struct ix86_f
       if (node->frequency < NODE_FREQUENCY_NORMAL
 	  || (flag_branch_probabilities
 	      && node->frequency < NODE_FREQUENCY_HOT))
-        cfun->machine->use_fast_prologue_epilogue = false;
+        MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue = false;
       else
-        cfun->machine->use_fast_prologue_epilogue
+        MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue
 	   = !expensive_function_p (count);
     }
   if (TARGET_PROLOGUE_USING_MOVE
-      && cfun->machine->use_fast_prologue_epilogue)
+      && MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue)
     frame->save_regs_using_mov = true;
   else
     frame->save_regs_using_mov = false;
@@ -8807,7 +8809,7 @@  ix86_expand_prologue (void)
       bool eax_live;
       rtx t;
 
-      if (cfun->machine->call_abi == MS_ABI)
+      if (MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI)
 	eax_live = false;
       else
 	eax_live = ix86_eax_live_at_start_p ();
@@ -9183,13 +9185,13 @@  ix86_expand_epilogue (int style)
      tuning in future.  */
   if ((!sp_valid && (frame.nregs + frame.nsseregs) <= 1)
       || (TARGET_EPILOGUE_USING_MOVE
-	  && cfun->machine->use_fast_prologue_epilogue
+	  && MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue
 	  && ((frame.nregs + frame.nsseregs) > 1
 	      || (frame.to_allocate + frame.padding0) != 0))
       || (frame_pointer_needed && !(frame.nregs + frame.nsseregs)
 	  && (frame.to_allocate + frame.padding0) != 0)
       || (frame_pointer_needed && TARGET_USE_LEAVE
-	  && cfun->machine->use_fast_prologue_epilogue
+	  && MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue
 	  && (frame.nregs + frame.nsseregs) == 1)
       || crtl->calls_eh_return)
     {
@@ -9301,7 +9303,7 @@  ix86_expand_epilogue (int style)
 				   style, !using_drap);
       /* If not an i386, mov & pop is faster than "leave".  */
       else if (TARGET_USE_LEAVE || optimize_function_for_size_p (cfun)
-	       || !cfun->machine->use_fast_prologue_epilogue)
+	       || !MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue)
 	ix86_emit_leave (red_offset);
       else
 	{
@@ -11556,7 +11558,7 @@  get_some_local_dynamic_name_1 (rtx *px, 
   if (GET_CODE (x) == SYMBOL_REF
       && SYMBOL_REF_TLS_MODEL (x) == TLS_MODEL_LOCAL_DYNAMIC)
     {
-      cfun->machine->some_ld_name = XSTR (x, 0);
+      MACHINE_FUNCTION (*cfun)->some_ld_name = XSTR (x, 0);
       return 1;
     }
 
@@ -11568,13 +11570,13 @@  get_some_local_dynamic_name (void)
 {
   rtx insn;
 
-  if (cfun->machine->some_ld_name)
-    return cfun->machine->some_ld_name;
+  if (MACHINE_FUNCTION (*cfun)->some_ld_name)
+    return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
     if (NONDEBUG_INSN_P (insn)
 	&& for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
-      return cfun->machine->some_ld_name;
+      return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   return NULL;
 }
@@ -26589,7 +26591,7 @@  x86_output_mi_thunk (FILE *file,
 	output_asm_insn ("jmp\t%P0", xops);
       /* All thunks should be in the same object as their target,
 	 and thus binds_local_p should be true.  */
-      else if (TARGET_64BIT && cfun->machine->call_abi == MS_ABI)
+      else if (TARGET_64BIT && MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI)
 	gcc_unreachable ();
       else
 	{
Index: gcc/config/avr/avr.md
===================================================================
--- gcc/config/avr/avr.md	(revision 161310)
+++ gcc/config/avr/avr.md	(working copy)
@@ -3203,9 +3203,10 @@  (define_insn "return"
 (define_insn "return_from_epilogue"
   [(return)]
   "(reload_completed 
-    && cfun->machine 
-    && !(cfun->machine->is_interrupt || cfun->machine->is_signal)
-    && !cfun->machine->is_naked)"
+    && MACHINE_FUNCTION (*cfun) 
+    && !(MACHINE_FUNCTION (*cfun)->is_interrupt
+	 || MACHINE_FUNCTION (*cfun)->is_signal)
+    && !MACHINE_FUNCTION (*cfun)->is_naked)"
   "ret"
   [(set_attr "cc" "none")
    (set_attr "length" "1")])
@@ -3213,9 +3214,10 @@  (define_insn "return_from_epilogue"
 (define_insn "return_from_interrupt_epilogue"
   [(return)]
   "(reload_completed 
-    && cfun->machine 
-    && (cfun->machine->is_interrupt || cfun->machine->is_signal)
-    && !cfun->machine->is_naked)"
+    && MACHINE_FUNCTION (*cfun) 
+    && (MACHINE_FUNCTION (*cfun)->is_interrupt
+	|| MACHINE_FUNCTION (*cfun)->is_signal)
+    && !MACHINE_FUNCTION (*cfun)->is_naked)"
   "reti"
   [(set_attr "cc" "none")
    (set_attr "length" "1")])
@@ -3223,8 +3225,8 @@  (define_insn "return_from_interrupt_epil
 (define_insn "return_from_naked_epilogue"
   [(return)]
   "(reload_completed 
-    && cfun->machine 
-    && cfun->machine->is_naked)"
+    && MACHINE_FUNCTION (*cfun) 
+    && MACHINE_FUNCTION (*cfun)->is_naked)"
   ""
   [(set_attr "cc" "none")
    (set_attr "length" "0")])
Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c	(revision 161310)
+++ gcc/config/avr/avr.c	(working copy)
@@ -342,8 +342,8 @@  avr_regs_to_save (HARD_REG_SET *set)
   /* No need to save any registers if the function never returns or 
      is have "OS_task" or "OS_main" attribute.  */
   if (TREE_THIS_VOLATILE (current_function_decl)
-      || cfun->machine->is_OS_task
-      || cfun->machine->is_OS_main)
+      || MACHINE_FUNCTION (*cfun)->is_OS_task
+      || MACHINE_FUNCTION (*cfun)->is_OS_main)
     return 0;
 
   for (reg = 0; reg < 32; reg++)
@@ -524,16 +524,21 @@  expand_prologue (void)
                   gen_rtx_POST_DEC (HImode, stack_pointer_rtx));
   rtx insn;
   
-  /* Init cfun->machine.  */
-  cfun->machine->is_naked = avr_naked_function_p (current_function_decl);
-  cfun->machine->is_interrupt = interrupt_function_p (current_function_decl);
-  cfun->machine->is_signal = signal_function_p (current_function_decl);
-  cfun->machine->is_OS_task = avr_OS_task_function_p (current_function_decl);
-  cfun->machine->is_OS_main = avr_OS_main_function_p (current_function_decl);
-  cfun->machine->stack_usage = 0;
+  /* Init MACHINE_FUNCTION (*cfun).  */
+  MACHINE_FUNCTION (*cfun)->is_naked
+    = avr_naked_function_p (current_function_decl);
+  MACHINE_FUNCTION (*cfun)->is_interrupt
+    = interrupt_function_p (current_function_decl);
+  MACHINE_FUNCTION (*cfun)->is_signal
+    = signal_function_p (current_function_decl);
+  MACHINE_FUNCTION (*cfun)->is_OS_task
+    = avr_OS_task_function_p (current_function_decl);
+  MACHINE_FUNCTION (*cfun)->is_OS_main
+    = avr_OS_main_function_p (current_function_decl);
+  MACHINE_FUNCTION (*cfun)->stack_usage = 0;
   
   /* Prologue: naked.  */
-  if (cfun->machine->is_naked)
+  if (MACHINE_FUNCTION (*cfun)->is_naked)
     {
       return;
     }
@@ -541,15 +546,16 @@  expand_prologue (void)
   avr_regs_to_save (&set);
   live_seq = sequent_regs_live ();
   minimize = (TARGET_CALL_PROLOGUES
-	      && !cfun->machine->is_interrupt
-	      && !cfun->machine->is_signal
-	      && !cfun->machine->is_OS_task
-	      && !cfun->machine->is_OS_main
+	      && !MACHINE_FUNCTION (*cfun)->is_interrupt
+	      && !MACHINE_FUNCTION (*cfun)->is_signal
+	      && !MACHINE_FUNCTION (*cfun)->is_OS_task
+	      && !MACHINE_FUNCTION (*cfun)->is_OS_main
 	      && live_seq);
 
-  if (cfun->machine->is_interrupt || cfun->machine->is_signal)
+  if (MACHINE_FUNCTION (*cfun)->is_interrupt
+      || MACHINE_FUNCTION (*cfun)->is_signal)
     {
-      if (cfun->machine->is_interrupt)
+      if (MACHINE_FUNCTION (*cfun)->is_interrupt)
         {
           /* Enable interrupts.  */
           insn = emit_insn (gen_enable_interrupt ());
@@ -559,12 +565,12 @@  expand_prologue (void)
       /* Push zero reg.  */
       insn = emit_move_insn (pushbyte, zero_reg_rtx);
       RTX_FRAME_RELATED_P (insn) = 1;
-      cfun->machine->stack_usage++;
+      MACHINE_FUNCTION (*cfun)->stack_usage++;
 
       /* Push tmp reg.  */
       insn = emit_move_insn (pushbyte, tmp_reg_rtx);
       RTX_FRAME_RELATED_P (insn) = 1;
-      cfun->machine->stack_usage++;
+      MACHINE_FUNCTION (*cfun)->stack_usage++;
 
       /* Push SREG.  */
       insn = emit_move_insn (tmp_reg_rtx, 
@@ -572,7 +578,7 @@  expand_prologue (void)
       RTX_FRAME_RELATED_P (insn) = 1;
       insn = emit_move_insn (pushbyte, tmp_reg_rtx);
       RTX_FRAME_RELATED_P (insn) = 1;
-      cfun->machine->stack_usage++;
+      MACHINE_FUNCTION (*cfun)->stack_usage++;
 
       /* Push RAMPZ.  */
       if(AVR_HAVE_RAMPZ 
@@ -583,7 +589,7 @@  expand_prologue (void)
           RTX_FRAME_RELATED_P (insn) = 1;
           insn = emit_move_insn (pushbyte, tmp_reg_rtx);
           RTX_FRAME_RELATED_P (insn) = 1;
-          cfun->machine->stack_usage++;
+          MACHINE_FUNCTION (*cfun)->stack_usage++;
         }
 	
       /* Clear zero reg.  */
@@ -605,7 +611,7 @@  expand_prologue (void)
         emit_insn (gen_call_prologue_saves (gen_int_mode (live_seq, HImode),
 					    gen_int_mode (size + live_seq, HImode)));
       RTX_FRAME_RELATED_P (insn) = 1;
-      cfun->machine->stack_usage += size + live_seq;
+      MACHINE_FUNCTION (*cfun)->stack_usage += size + live_seq;
     }
   else
     {
@@ -617,17 +623,18 @@  expand_prologue (void)
               /* Emit push of register to save.  */
               insn=emit_move_insn (pushbyte, gen_rtx_REG (QImode, reg));
               RTX_FRAME_RELATED_P (insn) = 1;
-              cfun->machine->stack_usage++;
+              MACHINE_FUNCTION (*cfun)->stack_usage++;
             }
         }
       if (frame_pointer_needed)
         {
-	  if (!(cfun->machine->is_OS_task || cfun->machine->is_OS_main))
+	  if (!(MACHINE_FUNCTION (*cfun)->is_OS_task
+	      || MACHINE_FUNCTION (*cfun)->is_OS_main))
 	    {
               /* Push frame pointer.  */
 	      insn = emit_move_insn (pushword, frame_pointer_rtx);
               RTX_FRAME_RELATED_P (insn) = 1;
-	      cfun->machine->stack_usage += 2;
+	      MACHINE_FUNCTION (*cfun)->stack_usage += 2;
 	    }
 
           if (!size)
@@ -684,15 +691,15 @@  expand_prologue (void)
 		  RTX_FRAME_RELATED_P (insn) = 1;
 		}
 	      else if (TARGET_NO_INTERRUPTS 
-		       || cfun->machine->is_signal
-		       || cfun->machine->is_OS_main)
+		       || MACHINE_FUNCTION (*cfun)->is_signal
+		       || MACHINE_FUNCTION (*cfun)->is_OS_main)
 		{
 		  insn = 
 		    emit_insn (gen_movhi_sp_r_irq_off (stack_pointer_rtx, 
 						       frame_pointer_rtx));
 		  RTX_FRAME_RELATED_P (insn) = 1;		
 		}
-	      else if (cfun->machine->is_interrupt)
+	      else if (MACHINE_FUNCTION (*cfun)->is_interrupt)
 		{
 		  insn = emit_insn (gen_movhi_sp_r_irq_on (stack_pointer_rtx, 
 							   frame_pointer_rtx));
@@ -734,7 +741,7 @@  expand_prologue (void)
 		emit_insn (sp_plus_insns);
               else
 		emit_insn (fp_plus_insns);
-	      cfun->machine->stack_usage += size;
+	      MACHINE_FUNCTION (*cfun)->stack_usage += size;
             }
         }
     }
@@ -745,17 +752,17 @@  expand_prologue (void)
 static void
 avr_asm_function_end_prologue (FILE *file)
 {
-  if (cfun->machine->is_naked)
+  if (MACHINE_FUNCTION (*cfun)->is_naked)
     {
       fputs ("/* prologue: naked */\n", file);
     }
   else
     {
-      if (cfun->machine->is_interrupt)
+      if (MACHINE_FUNCTION (*cfun)->is_interrupt)
         {
           fputs ("/* prologue: Interrupt */\n", file);
         }
-      else if (cfun->machine->is_signal)
+      else if (MACHINE_FUNCTION (*cfun)->is_signal)
         {
           fputs ("/* prologue: Signal */\n", file);
         }
@@ -765,10 +772,11 @@  avr_asm_function_end_prologue (FILE *fil
   fprintf (file, "/* frame size = " HOST_WIDE_INT_PRINT_DEC " */\n",
                  get_frame_size());
   fprintf (file, "/* stack size = %d */\n",
-                 cfun->machine->stack_usage);
+                 MACHINE_FUNCTION (*cfun)->stack_usage);
   /* Create symbol stack offset here so all functions have it. Add 1 to stack
      usage for offset so that SP + .L__stack_offset = return address.  */
-  fprintf (file, ".L__stack_usage = %d\n", cfun->machine->stack_usage);
+  fprintf (file, ".L__stack_usage = %d\n",
+	   MACHINE_FUNCTION (*cfun)->stack_usage);
 }
 
 
@@ -778,8 +786,9 @@  int
 avr_epilogue_uses (int regno ATTRIBUTE_UNUSED)
 {
   if (reload_completed 
-      && cfun->machine
-      && (cfun->machine->is_interrupt || cfun->machine->is_signal))
+      && MACHINE_FUNCTION (*cfun)
+      && (MACHINE_FUNCTION (*cfun)->is_interrupt
+	  || MACHINE_FUNCTION (*cfun)->is_signal))
     return 1;
   return 0;
 }
@@ -796,7 +805,7 @@  expand_epilogue (void)
   HOST_WIDE_INT size = get_frame_size();
   
   /* epilogue: naked  */
-  if (cfun->machine->is_naked)
+  if (MACHINE_FUNCTION (*cfun)->is_naked)
     {
       emit_jump_insn (gen_return ());
       return;
@@ -805,10 +814,10 @@  expand_epilogue (void)
   avr_regs_to_save (&set);
   live_seq = sequent_regs_live ();
   minimize = (TARGET_CALL_PROLOGUES
-	      && !cfun->machine->is_interrupt
-	      && !cfun->machine->is_signal
-	      && !cfun->machine->is_OS_task
-	      && !cfun->machine->is_OS_main
+	      && !MACHINE_FUNCTION (*cfun)->is_interrupt
+	      && !MACHINE_FUNCTION (*cfun)->is_signal
+	      && !MACHINE_FUNCTION (*cfun)->is_OS_task
+	      && !MACHINE_FUNCTION (*cfun)->is_OS_main
 	      && live_seq);
   
   if (minimize && (frame_pointer_needed || live_seq > 4))
@@ -864,12 +873,12 @@  expand_epilogue (void)
 		  emit_move_insn (stack_pointer_rtx, frame_pointer_rtx);
 		}
 	      else if (TARGET_NO_INTERRUPTS 
-		       || cfun->machine->is_signal)
+		       || MACHINE_FUNCTION (*cfun)->is_signal)
 		{
 		  emit_insn (gen_movhi_sp_r_irq_off (stack_pointer_rtx, 
 						     frame_pointer_rtx));
 		}
-	      else if (cfun->machine->is_interrupt)
+	      else if (MACHINE_FUNCTION (*cfun)->is_interrupt)
 		{
 		  emit_insn (gen_movhi_sp_r_irq_on (stack_pointer_rtx, 
 						    frame_pointer_rtx));
@@ -903,7 +912,8 @@  expand_epilogue (void)
               else
 		emit_insn (fp_plus_insns);
             }
-	  if (!(cfun->machine->is_OS_task || cfun->machine->is_OS_main))
+	  if (!(MACHINE_FUNCTION (*cfun)->is_OS_task
+		|| MACHINE_FUNCTION (*cfun)->is_OS_main))
 	    {
               /* Restore previous frame_pointer.  */
 	      emit_insn (gen_pophi (frame_pointer_rtx));
@@ -915,7 +925,8 @@  expand_epilogue (void)
           if (TEST_HARD_REG_BIT (set, reg))
               emit_insn (gen_popqi (gen_rtx_REG (QImode, reg)));
         }
-      if (cfun->machine->is_interrupt || cfun->machine->is_signal)
+      if (MACHINE_FUNCTION (*cfun)->is_interrupt
+	  || MACHINE_FUNCTION (*cfun)->is_signal)
         {
           /* Restore RAMPZ using tmp reg as scratch.  */
 	  if(AVR_HAVE_RAMPZ 
@@ -4642,7 +4653,7 @@  avr_asm_declare_function_name (FILE *fil
      make sure that the name of the function is "__vector_NN" so as to
      catch when the user misspells the interrupt vector name.  */
 
-  if (cfun->machine->is_interrupt)
+  if (MACHINE_FUNCTION (*cfun)->is_interrupt)
     {
       if (strncmp (name, "__vector", strlen ("__vector")) != 0)
         {
@@ -4651,7 +4662,7 @@  avr_asm_declare_function_name (FILE *fil
                       name);
         }
     }
-  else if (cfun->machine->is_signal)
+  else if (MACHINE_FUNCTION (*cfun)->is_signal)
     {
       if (strncmp (name, "__vector", strlen ("__vector")) != 0)
         {
@@ -6011,7 +6022,8 @@  avr_hard_regno_scratch_ok (unsigned int 
   /* Interrupt functions can only use registers that have already been saved
      by the prologue, even if they would normally be call-clobbered.  */
 
-  if ((cfun->machine->is_interrupt || cfun->machine->is_signal)
+  if ((MACHINE_FUNCTION (*cfun)->is_interrupt
+       || MACHINE_FUNCTION (*cfun)->is_signal)
       && !df_regs_ever_live_p (regno))
     return false;
 
@@ -6028,7 +6040,8 @@  avr_hard_regno_rename_ok (unsigned int o
      saved by the prologue, even if they would normally be
      call-clobbered.  */
 
-  if ((cfun->machine->is_interrupt || cfun->machine->is_signal)
+  if ((MACHINE_FUNCTION (*cfun)->is_interrupt
+       || MACHINE_FUNCTION (*cfun)->is_signal)
       && !df_regs_ever_live_p (new_reg))
     return 0;
 
Index: gcc/config/xtensa/xtensa.c
===================================================================
--- gcc/config/xtensa/xtensa.c	(revision 161310)
+++ gcc/config/xtensa/xtensa.c	(working copy)
@@ -1056,11 +1056,11 @@  xtensa_copy_incoming_a7 (rtx opnd)
   rtx reg, tmp;
   enum machine_mode mode;
 
-  if (!cfun->machine->need_a7_copy)
+  if (!MACHINE_FUNCTION (*cfun)->need_a7_copy)
     return opnd;
 
   /* This function should never be called again once a7 has been copied.  */
-  gcc_assert (!cfun->machine->set_frame_ptr_insn);
+  gcc_assert (!MACHINE_FUNCTION (*cfun)->set_frame_ptr_insn);
 
   mode = GET_MODE (opnd);
 
@@ -1080,7 +1080,7 @@  xtensa_copy_incoming_a7 (rtx opnd)
   /* 1-word args will always be in a7; 2-word args in a6/a7.  */
   gcc_assert (REGNO (reg) + HARD_REGNO_NREGS (A7_REG, mode) - 1 == A7_REG);
 
-  cfun->machine->need_a7_copy = false;
+  MACHINE_FUNCTION (*cfun)->need_a7_copy = false;
 
   /* Copy a7 to a new pseudo at the function entry.  Use gen_raw_REG to
      create the REG for a7 so that hard_frame_pointer_rtx is not used.  */
@@ -1115,7 +1115,8 @@  xtensa_copy_incoming_a7 (rtx opnd)
       gcc_unreachable ();
     }
 
-  cfun->machine->set_frame_ptr_insn = emit_insn (gen_set_frame_ptr ());
+  MACHINE_FUNCTION (*cfun)->set_frame_ptr_insn
+    = emit_insn (gen_set_frame_ptr ());
 
   /* For DF and DI mode arguments, copy the incoming value in A6 now.  */
   if (mode == DFmode || mode == DImode)
@@ -1124,13 +1125,13 @@  xtensa_copy_incoming_a7 (rtx opnd)
   entry_insns = get_insns ();
   end_sequence ();
 
-  if (cfun->machine->vararg_a7)
+  if (MACHINE_FUNCTION (*cfun)->vararg_a7)
     {
       /* This is called from within builtin_saveregs, which will insert the
 	 saveregs code at the function entry, ahead of anything placed at
 	 the function entry now.  Instead, save the sequence to be inserted
 	 at the beginning of the saveregs code.  */
-      cfun->machine->vararg_a7_copy = entry_insns;
+      MACHINE_FUNCTION (*cfun)->vararg_a7_copy = entry_insns;
     }
   else
     {
@@ -1546,7 +1547,7 @@  void
 xtensa_setup_frame_addresses (void)
 {
   /* Set flag to cause TARGET_FRAME_POINTER_REQUIRED to return true.  */
-  cfun->machine->accesses_prev_frame = 1;
+  MACHINE_FUNCTION (*cfun)->accesses_prev_frame = 1;
 
   emit_library_call
     (gen_rtx_SYMBOL_REF (Pmode, "__xtensa_libgcc_window_spill"),
@@ -2036,7 +2037,7 @@  function_arg (CUMULATIVE_ARGS *cum, enum
   regno = regbase + *arg_words;
 
   if (cum->incoming && regno <= A7_REG && regno + words > A7_REG)
-    cfun->machine->need_a7_copy = true;
+    MACHINE_FUNCTION (*cfun)->need_a7_copy = true;
 
   return gen_rtx_REG (mode, regno);
 }
@@ -2516,7 +2517,7 @@  xtensa_frame_pointer_required (void)
      This seems wrong but maybe it's necessary for other architectures.
      This function is derived from the i386 code.  */
 
-  if (cfun->machine->accesses_prev_frame)
+  if (MACHINE_FUNCTION (*cfun)->accesses_prev_frame)
     return true;
 
   return false;
@@ -2551,7 +2552,7 @@  xtensa_expand_prologue (void)
 
   if (frame_pointer_needed)
     {
-      if (cfun->machine->set_frame_ptr_insn)
+      if (MACHINE_FUNCTION (*cfun)->set_frame_ptr_insn)
 	{
 	  rtx first;
 
@@ -2562,7 +2563,7 @@  xtensa_expand_prologue (void)
 	  /* For all instructions prior to set_frame_ptr_insn, replace
 	     hard_frame_pointer references with stack_pointer.  */
 	  for (insn = first;
-	       insn != cfun->machine->set_frame_ptr_insn;
+	       insn != MACHINE_FUNCTION (*cfun)->set_frame_ptr_insn;
 	       insn = NEXT_INSN (insn))
 	    {
 	      if (INSN_P (insn))
@@ -2711,14 +2712,14 @@  xtensa_builtin_saveregs (void)
   set_mem_alias_set (gp_regs, get_varargs_alias_set ());
 
   /* Now store the incoming registers.  */
-  cfun->machine->need_a7_copy = true;
-  cfun->machine->vararg_a7 = true;
+  MACHINE_FUNCTION (*cfun)->need_a7_copy = true;
+  MACHINE_FUNCTION (*cfun)->vararg_a7 = true;
   move_block_from_reg (GP_ARG_FIRST + arg_words,
 		       adjust_address (gp_regs, BLKmode,
 				       arg_words * UNITS_PER_WORD),
 		       gp_left);
-  gcc_assert (cfun->machine->vararg_a7_copy != 0);
-  emit_insn_before (cfun->machine->vararg_a7_copy, get_insns ());
+  gcc_assert (MACHINE_FUNCTION (*cfun)->vararg_a7_copy != 0);
+  emit_insn_before (MACHINE_FUNCTION (*cfun)->vararg_a7_copy, get_insns ());
 
   return XEXP (gp_regs, 0);
 }
Index: gcc/config/moxie/moxie.c
===================================================================
--- gcc/config/moxie/moxie.c	(revision 161310)
+++ gcc/config/moxie/moxie.c	(working copy)
@@ -251,25 +251,25 @@  moxie_compute_frame (void)
   int regno;
 
   /* Padding needed for each element of the frame.  */
-  cfun->machine->local_vars_size = get_frame_size ();
+  MACHINE_FUNCTION (*cfun)->local_vars_size = get_frame_size ();
 
   /* Align to the stack alignment.  */
-  padding_locals = cfun->machine->local_vars_size % stack_alignment;
+  padding_locals = MACHINE_FUNCTION (*cfun)->local_vars_size % stack_alignment;
   if (padding_locals)
     padding_locals = stack_alignment - padding_locals;
 
-  cfun->machine->local_vars_size += padding_locals;
+  MACHINE_FUNCTION (*cfun)->local_vars_size += padding_locals;
 
-  cfun->machine->callee_saved_reg_size = 0;
+  MACHINE_FUNCTION (*cfun)->callee_saved_reg_size = 0;
 
   /* Save callee-saved registers.  */
   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
     if (df_regs_ever_live_p (regno) && (! call_used_regs[regno]))
-      cfun->machine->callee_saved_reg_size += 4;
+      MACHINE_FUNCTION (*cfun)->callee_saved_reg_size += 4;
 
-  cfun->machine->size_for_adjusting_sp = 
+  MACHINE_FUNCTION (*cfun)->size_for_adjusting_sp = 
     crtl->args.pretend_args_size
-    + cfun->machine->local_vars_size 
+    + MACHINE_FUNCTION (*cfun)->local_vars_size 
     + (ACCUMULATE_OUTGOING_ARGS ? crtl->outgoing_args_size : 0);
 }
 
@@ -291,9 +291,9 @@  moxie_expand_prologue (void)
 	}
     }
 
-  if (cfun->machine->size_for_adjusting_sp > 0)
+  if (MACHINE_FUNCTION (*cfun)->size_for_adjusting_sp > 0)
     {
-      int i = cfun->machine->size_for_adjusting_sp;
+      int i = MACHINE_FUNCTION (*cfun)->size_for_adjusting_sp;
       while (i > 255)
 	{
 	  insn = emit_insn (gen_subsi3 (stack_pointer_rtx, 
@@ -318,20 +318,22 @@  moxie_expand_epilogue (void)
   int regno;
   rtx insn, reg, cfa_restores = NULL;
 
-  if (cfun->machine->callee_saved_reg_size != 0)
+  if (MACHINE_FUNCTION (*cfun)->callee_saved_reg_size != 0)
     {
       reg = gen_rtx_REG (Pmode, MOXIE_R5);
-      if (cfun->machine->callee_saved_reg_size <= 255)
+      if (MACHINE_FUNCTION (*cfun)->callee_saved_reg_size <= 255)
 	{
 	  emit_move_insn (reg, hard_frame_pointer_rtx);
 	  emit_insn (gen_subsi3 
 		     (reg, reg, 
-		      GEN_INT (cfun->machine->callee_saved_reg_size)));
+		      (GEN_INT
+		       (MACHINE_FUNCTION (*cfun)->callee_saved_reg_size))));
 	}
       else
 	{
 	  emit_move_insn (reg,
-			  GEN_INT (-cfun->machine->callee_saved_reg_size));
+			  (GEN_INT
+			   (-MACHINE_FUNCTION (*cfun)->callee_saved_reg_size)));
 	  emit_insn (gen_addsi3 (reg, reg, hard_frame_pointer_rtx));
 	}
       for (regno = FIRST_PSEUDO_REGISTER; regno-- > 0; )
@@ -355,9 +357,10 @@  moxie_initial_elimination_offset (int fr
   
   if ((from) == FRAME_POINTER_REGNUM && (to) == HARD_FRAME_POINTER_REGNUM)
     {
-      /* Compute this since we need to use cfun->machine->local_vars_size.  */
+      /* Compute this since we need to use
+	 MACHINE_FUNCTION (*cfun)->local_vars_size.  */
       moxie_compute_frame ();
-      ret = -cfun->machine->callee_saved_reg_size;
+      ret = -MACHINE_FUNCTION (*cfun)->callee_saved_reg_size;
     }
   else if ((from) == ARG_POINTER_REGNUM && (to) == HARD_FRAME_POINTER_REGNUM)
     ret = 0x00;
Index: gcc/config/cris/cris.c
===================================================================
--- gcc/config/cris/cris.c	(revision 161310)
+++ gcc/config/cris/cris.c	(working copy)
@@ -1188,7 +1188,7 @@  cris_print_operand_address (FILE *file, 
 rtx
 cris_return_addr_rtx (int count, rtx frameaddr ATTRIBUTE_UNUSED)
 {
-  cfun->machine->needs_return_address_on_stack = 1;
+  MACHINE_FUNCTION (*cfun)->needs_return_address_on_stack = 1;
 
   /* The return-address is stored just above the saved frame-pointer (if
      present).  Apparently we can't eliminate from the frame-pointer in
@@ -1198,23 +1198,23 @@  cris_return_addr_rtx (int count, rtx fra
     : NULL_RTX;
 }
 
-/* Accessor used in cris.md:return because cfun->machine isn't available
-   there.  */
+/* Accessor used in cris.md:return because
+   MACHINE_FUNCTION (*cfun) isn't available there.  */
 
 bool
 cris_return_address_on_stack (void)
 {
   return df_regs_ever_live_p (CRIS_SRP_REGNUM)
-    || cfun->machine->needs_return_address_on_stack;
+    || MACHINE_FUNCTION (*cfun)->needs_return_address_on_stack;
 }
 
-/* Accessor used in cris.md:return because cfun->machine isn't available
-   there.  */
+/* Accessor used in cris.md:return because
+   MACHINE_FUNCTION (*cfun) isn't available there.  */
 
 bool
 cris_return_address_on_stack_for_return (void)
 {
-  return cfun->machine->return_type == CRIS_RETINSN_RET ? false
+  return MACHINE_FUNCTION (*cfun)->return_type == CRIS_RETINSN_RET ? false
     : cris_return_address_on_stack ();
 }
 
@@ -1791,10 +1791,12 @@  cris_expand_return (bool on_stack)
      to check that it doesn't change half-way through.  */
   emit_jump_insn (gen_rtx_RETURN (VOIDmode));
 
-  CRIS_ASSERT (cfun->machine->return_type != CRIS_RETINSN_RET || !on_stack);
-  CRIS_ASSERT (cfun->machine->return_type != CRIS_RETINSN_JUMP || on_stack);
+  CRIS_ASSERT (MACHINE_FUNCTION (*cfun)->return_type != CRIS_RETINSN_RET
+	       || !on_stack);
+  CRIS_ASSERT (MACHINE_FUNCTION (*cfun)->return_type != CRIS_RETINSN_JUMP
+	       || on_stack);
 
-  cfun->machine->return_type
+  MACHINE_FUNCTION (*cfun)->return_type
     = on_stack ? CRIS_RETINSN_JUMP : CRIS_RETINSN_RET;
 }
 
@@ -2838,14 +2840,14 @@  cris_expand_prologue (void)
   if (pretend)
     {
       /* See also cris_setup_incoming_varargs where
-	 cfun->machine->stdarg_regs is set.  There are other setters of
-	 crtl->args.pretend_args_size than stdarg handling, like
+	 MACHINE_FUNCTION (*cfun)->stdarg_regs is set.  There are other
+	 setters of crtl->args.pretend_args_size than stdarg handling, like
 	 for an argument passed with parts in R13 and stack.  We must
 	 not store R13 into the pretend-area for that case, as GCC does
 	 that itself.  "Our" store would be marked as redundant and GCC
 	 will attempt to remove it, which will then be flagged as an
 	 internal error; trying to remove a frame-related insn.  */
-      int stdarg_regs = cfun->machine->stdarg_regs;
+      int stdarg_regs = MACHINE_FUNCTION (*cfun)->stdarg_regs;
 
       framesize += pretend;
 
@@ -3769,7 +3771,7 @@  cris_setup_incoming_varargs (CUMULATIVE_
   if (ca->regs < CRIS_MAX_ARGS_IN_REGS)
     {
       int stdarg_regs = CRIS_MAX_ARGS_IN_REGS - ca->regs;
-      cfun->machine->stdarg_regs = stdarg_regs;
+      MACHINE_FUNCTION (*cfun)->stdarg_regs = stdarg_regs;
       *pretend_arg_size = stdarg_regs * 4;
     }
 
Index: gcc/config/iq2000/iq2000.c
===================================================================
--- gcc/config/iq2000/iq2000.c	(revision 161310)
+++ gcc/config/iq2000/iq2000.c	(working copy)
@@ -1480,9 +1480,9 @@  iq2000_debugger_offset (rtx addr, HOST_W
   if (reg == stack_pointer_rtx || reg == frame_pointer_rtx
       || reg == hard_frame_pointer_rtx)
     {
-      HOST_WIDE_INT frame_size = (!cfun->machine->initialized)
+      HOST_WIDE_INT frame_size = (!MACHINE_FUNCTION (*cfun)->initialized)
 				  ? compute_frame_size (get_frame_size ())
-				  : cfun->machine->total_size;
+				  : MACHINE_FUNCTION (*cfun)->total_size;
 
       offset = offset - frame_size;
     }
@@ -1667,15 +1667,15 @@  compute_frame_size (HOST_WIDE_INT size)
   total_size += IQ2000_STACK_ALIGN (crtl->args.pretend_args_size);
 
   /* Save other computed information.  */
-  cfun->machine->total_size = total_size;
-  cfun->machine->var_size = var_size;
-  cfun->machine->args_size = args_size;
-  cfun->machine->extra_size = extra_size;
-  cfun->machine->gp_reg_size = gp_reg_size;
-  cfun->machine->fp_reg_size = fp_reg_size;
-  cfun->machine->mask = mask;
-  cfun->machine->initialized = reload_completed;
-  cfun->machine->num_gp = gp_reg_size / UNITS_PER_WORD;
+  MACHINE_FUNCTION (*cfun)->total_size = total_size;
+  MACHINE_FUNCTION (*cfun)->var_size = var_size;
+  MACHINE_FUNCTION (*cfun)->args_size = args_size;
+  MACHINE_FUNCTION (*cfun)->extra_size = extra_size;
+  MACHINE_FUNCTION (*cfun)->gp_reg_size = gp_reg_size;
+  MACHINE_FUNCTION (*cfun)->fp_reg_size = fp_reg_size;
+  MACHINE_FUNCTION (*cfun)->mask = mask;
+  MACHINE_FUNCTION (*cfun)->initialized = reload_completed;
+  MACHINE_FUNCTION (*cfun)->num_gp = gp_reg_size / UNITS_PER_WORD;
 
   if (mask)
     {
@@ -1684,17 +1684,17 @@  compute_frame_size (HOST_WIDE_INT size)
       offset = (args_size + extra_size + var_size
 		+ gp_reg_size - GET_MODE_SIZE (gpr_mode));
 
-      cfun->machine->gp_sp_offset = offset;
-      cfun->machine->gp_save_offset = offset - total_size;
+      MACHINE_FUNCTION (*cfun)->gp_sp_offset = offset;
+      MACHINE_FUNCTION (*cfun)->gp_save_offset = offset - total_size;
     }
   else
     {
-      cfun->machine->gp_sp_offset = 0;
-      cfun->machine->gp_save_offset = 0;
+      MACHINE_FUNCTION (*cfun)->gp_sp_offset = 0;
+      MACHINE_FUNCTION (*cfun)->gp_save_offset = 0;
     }
 
-  cfun->machine->fp_sp_offset = 0;
-  cfun->machine->fp_save_offset = 0;
+  MACHINE_FUNCTION (*cfun)->fp_sp_offset = 0;
+  MACHINE_FUNCTION (*cfun)->fp_save_offset = 0;
 
   /* Ok, we're done.  */
   return total_size;
@@ -1729,12 +1729,12 @@  iq2000_initial_elimination_offset (int f
   if ((from) == FRAME_POINTER_REGNUM) 
     (offset) = 0; 
   else if ((from) == ARG_POINTER_REGNUM) 
-    (offset) = (cfun->machine->total_size); 
+    (offset) = (MACHINE_FUNCTION (*cfun)->total_size); 
   else if ((from) == RETURN_ADDRESS_POINTER_REGNUM) 
     {
       if (leaf_function_p ()) 
 	(offset) = 0; 
-      else (offset) = cfun->machine->gp_sp_offset 
+      else (offset) = MACHINE_FUNCTION (*cfun)->gp_sp_offset 
 	     + ((UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT)) 
 		* (BYTES_BIG_ENDIAN != 0)); 
     }
@@ -1798,7 +1798,7 @@  iq2000_emit_frame_related_store (rtx mem
 static void
 save_restore_insns (int store_p)
 {
-  long mask = cfun->machine->mask;
+  long mask = MACHINE_FUNCTION (*cfun)->mask;
   int regno;
   rtx base_reg_rtx;
   HOST_WIDE_INT base_offset;
@@ -1826,9 +1826,9 @@  save_restore_insns (int store_p)
      the constant created in the prologue/epilogue to adjust the stack
      frame.  */
 
-  gp_offset = cfun->machine->gp_sp_offset;
+  gp_offset = MACHINE_FUNCTION (*cfun)->gp_sp_offset;
   end_offset
-    = gp_offset - (cfun->machine->gp_reg_size
+    = gp_offset - (MACHINE_FUNCTION (*cfun)->gp_reg_size
 		   - GET_MODE_SIZE (gpr_mode));
 
   if (gp_offset < 0 || end_offset < 0)
@@ -2057,7 +2057,7 @@  iq2000_expand_prologue (void)
 void
 iq2000_expand_epilogue (void)
 {
-  HOST_WIDE_INT tsize = cfun->machine->total_size;
+  HOST_WIDE_INT tsize = MACHINE_FUNCTION (*cfun)->total_size;
   rtx tsize_rtx = GEN_INT (tsize);
   rtx tmp_rtx = (rtx)0;
 
@@ -2117,7 +2117,7 @@  iq2000_expand_epilogue (void)
 void
 iq2000_expand_eh_return (rtx address)
 {
-  HOST_WIDE_INT gp_offset = cfun->machine->gp_sp_offset;
+  HOST_WIDE_INT gp_offset = MACHINE_FUNCTION (*cfun)->gp_sp_offset;
   rtx scratch;
 
   scratch = plus_constant (stack_pointer_rtx, gp_offset);
@@ -2137,8 +2137,8 @@  iq2000_can_use_return_insn (void)
   if (df_regs_ever_live_p (31) || profile_flag)
     return 0;
 
-  if (cfun->machine->initialized)
-    return cfun->machine->total_size == 0;
+  if (MACHINE_FUNCTION (*cfun)->initialized)
+    return MACHINE_FUNCTION (*cfun)->total_size == 0;
 
   return compute_frame_size (get_frame_size ()) == 0;
 }
Index: gcc/config/ia64/ia64.c
===================================================================
--- gcc/config/ia64/ia64.c	(revision 161310)
+++ gcc/config/ia64/ia64.c	(working copy)
@@ -2489,10 +2489,11 @@  ia64_compute_frame_size (HOST_WIDE_INT s
   diddle_return_value (mark_reg_gr_used_mask, NULL);
 
   /* Don't allocate scratches to the EH scratch registers.  */
-  if (cfun->machine->ia64_eh_epilogue_sp)
-    mark_reg_gr_used_mask (cfun->machine->ia64_eh_epilogue_sp, NULL);
-  if (cfun->machine->ia64_eh_epilogue_bsp)
-    mark_reg_gr_used_mask (cfun->machine->ia64_eh_epilogue_bsp, NULL);
+  if (MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_sp)
+    mark_reg_gr_used_mask (MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_sp, NULL);
+  if (MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_bsp)
+    mark_reg_gr_used_mask (MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_bsp,
+			   NULL);
 
   /* Find the size of the register stack frame.  We have only 80 local
      registers, because we reserve 8 for the inputs and 8 for the
@@ -2510,7 +2511,7 @@  ia64_compute_frame_size (HOST_WIDE_INT s
      all eight input registers as in use, so that locals aren't visible to
      the caller.  */
 
-  if (cfun->machine->n_varargs > 0
+  if (MACHINE_FUNCTION (*cfun)->n_varargs > 0
       || lookup_attribute ("syscall_linkage",
 			   TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
     current_frame_info.n_input_regs = 8;
@@ -2698,7 +2699,7 @@  ia64_compute_frame_size (HOST_WIDE_INT s
   /* If we're forced to use st8.spill, we're forced to save and restore
      ar.unat as well.  The check for existing liveness allows inline asm
      to touch ar.unat.  */
-  if (spilled_gr_p || cfun->machine->n_varargs
+  if (spilled_gr_p || MACHINE_FUNCTION (*cfun)->n_varargs
       || df_regs_ever_live_p (AR_UNAT_REGNUM))
     {
       df_set_regs_ever_live (AR_UNAT_REGNUM, true);
@@ -3183,7 +3184,7 @@  ia64_expand_prologue (void)
 
   /* Set up frame pointer, stack pointer, and spill iterators.  */
 
-  n_varargs = cfun->machine->n_varargs;
+  n_varargs = MACHINE_FUNCTION (*cfun)->n_varargs;
   setup_spill_pointers (current_frame_info.n_spilled + n_varargs,
 			stack_pointer_rtx, 0);
 
@@ -3610,7 +3611,7 @@  ia64_expand_epilogue (int sibcall_p)
   finish_spill_pointers ();
 
   if (current_frame_info.total_size
-      || cfun->machine->ia64_eh_epilogue_sp
+      || MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_sp
       || frame_pointer_needed)
     {
       /* ??? At this point we must generate a magic insn that appears to
@@ -3620,8 +3621,9 @@  ia64_expand_epilogue (int sibcall_p)
       emit_insn (gen_blockage ());
     }
 
-  if (cfun->machine->ia64_eh_epilogue_sp)
-    emit_move_insn (stack_pointer_rtx, cfun->machine->ia64_eh_epilogue_sp);
+  if (MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_sp)
+    emit_move_insn (stack_pointer_rtx,
+		    MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_sp);
   else if (frame_pointer_needed)
     {
       insn = emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx);
@@ -3654,8 +3656,8 @@  ia64_expand_epilogue (int sibcall_p)
 						 frame_size_rtx)));
     }
 
-  if (cfun->machine->ia64_eh_epilogue_bsp)
-    emit_insn (gen_set_bsp (cfun->machine->ia64_eh_epilogue_bsp));
+  if (MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_bsp)
+    emit_insn (gen_set_bsp (MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_bsp));
 
   if (! sibcall_p)
     emit_jump_insn (gen_return_internal (gen_rtx_REG (DImode, BR_REG (0))));
@@ -4063,7 +4065,7 @@  ia64_setup_incoming_varargs (CUMULATIVE_
     {
       int n = MAX_ARGUMENT_SLOTS - next_cum.words;
       *pretend_size = n * UNITS_PER_WORD;
-      cfun->machine->n_varargs = n;
+      MACHINE_FUNCTION (*cfun)->n_varargs = n;
     }
 }
 
@@ -9532,7 +9534,7 @@  process_epilogue (FILE *asm_out_file, rt
     {
       if (unwind)
 	fprintf (asm_out_file, "\t.label_state %d\n",
-		 ++cfun->machine->state_num);
+		 ++MACHINE_FUNCTION (*cfun)->state_num);
       need_copy_state = true;
     }
 
@@ -9802,7 +9804,7 @@  process_for_unwind_directive (FILE *asm_
 		{
 		  fprintf (asm_out_file, "\t.body\n");
 		  fprintf (asm_out_file, "\t.copy_state %d\n",
-			   cfun->machine->state_num);
+			   MACHINE_FUNCTION (*cfun)->state_num);
 		}
 	      if (IA64_CHANGE_CFA_IN_EPILOGUE)
 		ia64_dwarf2out_def_steady_cfa (insn, frame);
Index: gcc/config/ia64/ia64.md
===================================================================
--- gcc/config/ia64/ia64.md	(revision 161310)
+++ gcc/config/ia64/ia64.md	(working copy)
@@ -5079,8 +5079,8 @@  (define_expand "eh_epilogue"
   emit_use (sp);
   emit_use (bsp);
 
-  cfun->machine->ia64_eh_epilogue_sp = sp;
-  cfun->machine->ia64_eh_epilogue_bsp = bsp;
+  MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_sp = sp;
+  MACHINE_FUNCTION (*cfun)->ia64_eh_epilogue_bsp = bsp;
 })
 
 ;; Builtin apply support.
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 161310)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -6809,14 +6809,16 @@  rs6000_emit_move (rtx dest, rtx source, 
       return;
     }
 
-  if (reload_in_progress && cfun->machine->sdmode_stack_slot != NULL_RTX)
-    cfun->machine->sdmode_stack_slot =
-      eliminate_regs (cfun->machine->sdmode_stack_slot, VOIDmode, NULL_RTX);
+  if (reload_in_progress
+      && MACHINE_FUNCTION (*cfun)->sdmode_stack_slot != NULL_RTX)
+    MACHINE_FUNCTION (*cfun)->sdmode_stack_slot =
+      eliminate_regs (MACHINE_FUNCTION (*cfun)->sdmode_stack_slot, VOIDmode,
+		      NULL_RTX);
 
   if (reload_in_progress
       && mode == SDmode
       && MEM_P (operands[0])
-      && rtx_equal_p (operands[0], cfun->machine->sdmode_stack_slot)
+      && rtx_equal_p (operands[0], MACHINE_FUNCTION (*cfun)->sdmode_stack_slot)
       && REG_P (operands[1]))
     {
       if (FP_REGNO_P (REGNO (operands[1])))
@@ -6839,7 +6841,7 @@  rs6000_emit_move (rtx dest, rtx source, 
       && mode == SDmode
       && REG_P (operands[0])
       && MEM_P (operands[1])
-      && rtx_equal_p (operands[1], cfun->machine->sdmode_stack_slot))
+      && rtx_equal_p (operands[1], MACHINE_FUNCTION (*cfun)->sdmode_stack_slot))
     {
       if (FP_REGNO_P (REGNO (operands[0])))
 	{
@@ -8546,7 +8548,7 @@  setup_incoming_varargs (CUMULATIVE_ARGS 
 		gcc_assert (reg_save_area == virtual_stack_vars_rtx);
 	    }
 
-	  cfun->machine->varargs_save_offset = offset;
+	  MACHINE_FUNCTION (*cfun)->varargs_save_offset = offset;
 	  save_area = plus_constant (virtual_stack_vars_rtx, offset);
 	}
     }
@@ -8764,9 +8766,9 @@  rs6000_va_start (tree valist, rtx nextar
 
   /* Find the register save area.  */
   t = make_tree (TREE_TYPE (sav), virtual_stack_vars_rtx);
-  if (cfun->machine->varargs_save_offset)
+  if (MACHINE_FUNCTION (*cfun)->varargs_save_offset)
     t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (sav), t,
-	        size_int (cfun->machine->varargs_save_offset));
+	        size_int (MACHINE_FUNCTION (*cfun)->varargs_save_offset));
   t = build2 (MODIFY_EXPR, TREE_TYPE (sav), sav, t);
   TREE_SIDE_EFFECTS (t) = 1;
   expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
@@ -13643,13 +13645,13 @@  rs6000_secondary_memory_needed_rtx (enum
     ret = assign_stack_local (mode, GET_MODE_SIZE (mode), 0);
   else
     {
-      rtx mem = cfun->machine->sdmode_stack_slot;
+      rtx mem = MACHINE_FUNCTION (*cfun)->sdmode_stack_slot;
       gcc_assert (mem != NULL_RTX);
 
       if (!eliminated)
 	{
 	  mem = eliminate_regs (mem, VOIDmode, NULL_RTX);
-	  cfun->machine->sdmode_stack_slot = mem;
+	  MACHINE_FUNCTION (*cfun)->sdmode_stack_slot = mem;
 	  eliminated = true;
 	}
       ret = mem;
@@ -14150,7 +14152,7 @@  rs6000_alloc_sdmode_stack_slot (void)
   basic_block bb;
   gimple_stmt_iterator gsi;
 
-  gcc_assert (cfun->machine->sdmode_stack_slot == NULL_RTX);
+  gcc_assert (MACHINE_FUNCTION (*cfun)->sdmode_stack_slot == NULL_RTX);
 
   FOR_EACH_BB (bb)
     for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
@@ -14159,8 +14161,8 @@  rs6000_alloc_sdmode_stack_slot (void)
 	if (ret)
 	  {
 	    rtx stack = assign_stack_local (DDmode, GET_MODE_SIZE (DDmode), 0);
-	    cfun->machine->sdmode_stack_slot = adjust_address_nv (stack,
-								  SDmode, 0);
+	    MACHINE_FUNCTION (*cfun)->sdmode_stack_slot
+	      = adjust_address_nv (stack, SDmode, 0);
 	    return;
 	  }
       }
@@ -14175,8 +14177,8 @@  rs6000_alloc_sdmode_stack_slot (void)
 	  || TYPE_MODE (DECL_ARG_TYPE (t)) == SDmode)
 	{
 	  rtx stack = assign_stack_local (DDmode, GET_MODE_SIZE (DDmode), 0);
-	  cfun->machine->sdmode_stack_slot = adjust_address_nv (stack,
-								SDmode, 0);
+	  MACHINE_FUNCTION (*cfun)->sdmode_stack_slot
+	    = adjust_address_nv (stack, SDmode, 0);
 	  return;
 	}
     }
@@ -14185,8 +14187,8 @@  rs6000_alloc_sdmode_stack_slot (void)
 static void
 rs6000_instantiate_decls (void)
 {
-  if (cfun->machine->sdmode_stack_slot != NULL_RTX)
-    instantiate_decl_rtl (cfun->machine->sdmode_stack_slot);
+  if (MACHINE_FUNCTION (*cfun)->sdmode_stack_slot != NULL_RTX)
+    instantiate_decl_rtl (MACHINE_FUNCTION (*cfun)->sdmode_stack_slot);
 }
 
 /* Given an rtx X being reloaded into a reg required to be
@@ -14656,14 +14658,14 @@  rs6000_get_some_local_dynamic_name (void
 {
   rtx insn;
 
-  if (cfun->machine->some_ld_name)
-    return cfun->machine->some_ld_name;
+  if (MACHINE_FUNCTION (*cfun)->some_ld_name)
+    return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
     if (INSN_P (insn)
 	&& for_each_rtx (&PATTERN (insn),
 			 rs6000_get_some_local_dynamic_name_1, 0))
-      return cfun->machine->some_ld_name;
+      return MACHINE_FUNCTION (*cfun)->some_ld_name;
 
   gcc_unreachable ();
 }
@@ -14680,7 +14682,7 @@  rs6000_get_some_local_dynamic_name_1 (rt
       const char *str = XSTR (x, 0);
       if (SYMBOL_REF_TLS_MODEL (x) == TLS_MODEL_LOCAL_DYNAMIC)
 	{
-	  cfun->machine->some_ld_name = str;
+	  MACHINE_FUNCTION (*cfun)->some_ld_name = str;
 	  return 1;
 	}
     }
@@ -17591,10 +17593,11 @@  rs6000_stack_info (void)
   if (TARGET_SPE)
     {
       /* Cache value so we don't rescan instruction chain over and over.  */
-      if (cfun->machine->insn_chain_scanned_p == 0)
-	cfun->machine->insn_chain_scanned_p
+      if (MACHINE_FUNCTION (*cfun)->insn_chain_scanned_p == 0)
+	MACHINE_FUNCTION (*cfun)->insn_chain_scanned_p
 	  = spe_func_has_64bit_regs_p () + 1;
-      info_ptr->spe_64bit_regs_used = cfun->machine->insn_chain_scanned_p - 1;
+      info_ptr->spe_64bit_regs_used
+	= MACHINE_FUNCTION (*cfun)->insn_chain_scanned_p - 1;
     }
 
   /* Select which calling sequence.  */
@@ -17641,7 +17644,7 @@  rs6000_stack_info (void)
 
   /* Does this function call anything?  */
   info_ptr->calls_p = (! current_function_is_leaf
-		       || cfun->machine->ra_needs_full_frame);
+		       || MACHINE_FUNCTION (*cfun)->ra_needs_full_frame);
 
   /* Determine if we need to save the link register.  */
   if ((DEFAULT_ABI == ABI_AIX
@@ -18067,7 +18070,7 @@  rs6000_return_addr (int count, rtx frame
      don't try to be too clever here.  */
   if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
     {
-      cfun->machine->ra_needs_full_frame = 1;
+      MACHINE_FUNCTION (*cfun)->ra_needs_full_frame = 1;
 
       return
 	gen_rtx_MEM
@@ -18080,7 +18083,7 @@  rs6000_return_addr (int count, rtx frame
 			   RETURN_ADDRESS_OFFSET)));
     }
 
-  cfun->machine->ra_need_lr = 1;
+  MACHINE_FUNCTION (*cfun)->ra_need_lr = 1;
   return get_hard_reg_initial_val (Pmode, LR_REGNO);
 }
 
@@ -18148,8 +18151,8 @@  rs6000_ra_ever_killed (void)
   if (cfun->is_thunk)
     return 0;
 
-  if (cfun->machine->lr_save_state)
-    return cfun->machine->lr_save_state - 1;
+  if (MACHINE_FUNCTION (*cfun)->lr_save_state)
+    return MACHINE_FUNCTION (*cfun)->lr_save_state - 1;
 
   /* regs_ever_live has LR marked as used if any sibcalls are present,
      but this should not force saving and restoring in the
@@ -18325,7 +18328,7 @@  rs6000_emit_eh_reg_restore (rtx source, 
      state of lr_save_p so any change from here on would be a bug.  In
      particular, stop rs6000_ra_ever_killed from considering the SET
      of lr we may have added just above.  */ 
-  cfun->machine->lr_save_state = info->lr_save_p + 1;
+  MACHINE_FUNCTION (*cfun)->lr_save_state = info->lr_save_p + 1;
 }
 
 static GTY(()) alias_set_type set = -1;
@@ -19077,7 +19080,7 @@  rs6000_savres_strategy (rs6000_stack_t *
 	    || sibcall
 	    || crtl->calls_eh_return
 	    || !info->lr_save_p
-	    || cfun->machine->ra_need_lr
+	    || MACHINE_FUNCTION (*cfun)->ra_need_lr
 	    || info->total_size > 32767);
   savres_fprs_inline = (common
 			|| info->first_fp_reg_save == 64
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	(revision 161310)
+++ gcc/config/arm/arm.c	(working copy)
@@ -1989,10 +1989,10 @@  arm_compute_func_type (void)
 unsigned long
 arm_current_func_type (void)
 {
-  if (ARM_FUNC_TYPE (cfun->machine->func_type) == ARM_FT_UNKNOWN)
-    cfun->machine->func_type = arm_compute_func_type ();
+  if (ARM_FUNC_TYPE (MACHINE_FUNCTION (*cfun)->func_type) == ARM_FT_UNKNOWN)
+    MACHINE_FUNCTION (*cfun)->func_type = arm_compute_func_type ();
 
-  return cfun->machine->func_type;
+  return MACHINE_FUNCTION (*cfun)->func_type;
 }
 
 bool
@@ -2115,7 +2115,7 @@  use_return_insn (int iscond, rtx sibling
 
   /* As do variadic functions.  */
   if (crtl->args.pretend_args_size
-      || cfun->machine->uses_anonymous_args
+      || MACHINE_FUNCTION (*cfun)->uses_anonymous_args
       /* Or if the function calls __builtin_eh_return () */
       || crtl->calls_eh_return
       /* Or if the function calls alloca */
@@ -4778,7 +4778,7 @@  arm_function_ok_for_sibcall (tree decl, 
 {
   unsigned long func_type;
 
-  if (cfun->machine->sibcall_blocked)
+  if (MACHINE_FUNCTION (*cfun)->sibcall_blocked)
     return false;
 
   /* Never tailcall something for which we have no decl, or if we
@@ -4848,7 +4848,7 @@  legitimate_pic_operand_p (rtx x)
 }
 
 /* Record that the current function needs a PIC register.  Initialize
-   cfun->machine->pic_reg if we have not already done so.  */
+   MACHINE_FUNCTION (*cfun)->pic_reg if we have not already done so.  */
 
 static void
 require_pic_register (void)
@@ -4863,8 +4863,9 @@  require_pic_register (void)
       gcc_assert (can_create_pseudo_p ());
       if (arm_pic_register != INVALID_REGNUM)
 	{
-	  if (!cfun->machine->pic_reg)
-	    cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register);
+	  if (!MACHINE_FUNCTION (*cfun)->pic_reg)
+	    MACHINE_FUNCTION (*cfun)->pic_reg
+	      = gen_rtx_REG (Pmode, arm_pic_register);
 
 	  /* Play games to avoid marking the function as needing pic
 	     if we are being called as part of the cost-estimation
@@ -4876,8 +4877,8 @@  require_pic_register (void)
 	{
 	  rtx seq;
 
-	  if (!cfun->machine->pic_reg)
-	    cfun->machine->pic_reg = gen_reg_rtx (Pmode);
+	  if (!MACHINE_FUNCTION (*cfun)->pic_reg)
+	    MACHINE_FUNCTION (*cfun)->pic_reg = gen_reg_rtx (Pmode);
 
 	  /* Play games to avoid marking the function as needing pic
 	     if we are being called as part of the cost-estimation
@@ -4941,9 +4942,11 @@  legitimize_pic_address (rtx orig, enum m
 	  else /* TARGET_THUMB1 */
 	    emit_insn (gen_pic_load_addr_thumb1 (address, orig));
 
-	  pic_ref = gen_const_mem (Pmode,
-				   gen_rtx_PLUS (Pmode, cfun->machine->pic_reg,
-					         address));
+	  pic_ref
+	    = gen_const_mem (Pmode,
+			     gen_rtx_PLUS (Pmode,
+					   MACHINE_FUNCTION (*cfun)->pic_reg,
+					   address));
 	  insn = emit_move_insn (reg, pic_ref);
 	}
 
@@ -4958,7 +4961,7 @@  legitimize_pic_address (rtx orig, enum m
       rtx base, offset;
 
       if (GET_CODE (XEXP (orig, 0)) == PLUS
-	  && XEXP (XEXP (orig, 0), 0) == cfun->machine->pic_reg)
+	  && XEXP (XEXP (orig, 0), 0) == MACHINE_FUNCTION (*cfun)->pic_reg)
 	return orig;
 
       /* Handle the case where we have: const (UNSPEC_TLS).  */
@@ -5040,7 +5043,7 @@  thumb_find_work_register (unsigned long 
      pushed right at the start of the function.  Hence it will be available
      for the rest of the prologue.
      (*): ie crtl->args.pretend_args_size is greater than 0.  */
-  if (cfun->machine->uses_anonymous_args
+  if (MACHINE_FUNCTION (*cfun)->uses_anonymous_args
       && crtl->args.pretend_args_size > 0)
     return LAST_ARG_REGNUM;
 
@@ -5056,7 +5059,7 @@  thumb_find_work_register (unsigned long 
      function but which are not used.  Hence we could miss an opportunity
      when a function has an unused argument in r3.  But it is better to be
      safe than to be sorry.  */
-  if (! cfun->machine->uses_anonymous_args
+  if (! MACHINE_FUNCTION (*cfun)->uses_anonymous_args
       && crtl->args.size >= 0
       && crtl->args.size <= (LAST_ARG_REGNUM * UNITS_PER_WORD)
       && crtl->args.info.nregs < 4)
@@ -5094,7 +5097,7 @@  arm_load_pic_register (unsigned long sav
 
   gcc_assert (flag_pic);
 
-  pic_reg = cfun->machine->pic_reg;
+  pic_reg = MACHINE_FUNCTION (*cfun)->pic_reg;
   if (TARGET_VXWORKS_RTP)
     {
       pic_rtx = gen_rtx_SYMBOL_REF (Pmode, VXWORKS_GOTT_BASE);
@@ -11916,7 +11919,8 @@  arm_emit_call_insn (rtx pat, rtx addr)
 	  : !SYMBOL_REF_LOCAL_P (addr)))
     {
       require_pic_register ();
-      use_reg (&CALL_INSN_FUNCTION_USAGE (insn), cfun->machine->pic_reg);
+      use_reg (&CALL_INSN_FUNCTION_USAGE (insn),
+	       MACHINE_FUNCTION (*cfun)->pic_reg);
     }
 }
 
@@ -13122,7 +13126,7 @@  arm_compute_save_reg_mask (void)
 	  && !crtl->calls_eh_return))
     save_reg_mask |= 1 << LR_REGNUM;
 
-  if (cfun->machine->lr_save_eliminated)
+  if (MACHINE_FUNCTION (*cfun)->lr_save_eliminated)
     save_reg_mask &= ~ (1 << LR_REGNUM);
 
   if (TARGET_REALLY_IWMMXT
@@ -13148,7 +13152,7 @@  arm_compute_save_reg_mask (void)
 	save_reg_mask |= (1 << reg);
       else
 	{
-	  cfun->machine->sibcall_blocked = 1;
+	  MACHINE_FUNCTION (*cfun)->sibcall_blocked = 1;
 	  save_reg_mask |= (1 << 3);
 	}
     }
@@ -13322,7 +13326,7 @@  output_return_instruction (rtx operand, 
 
   sprintf (conditional, "%%?%%%c0", reverse ? 'D' : 'd');
 
-  cfun->machine->return_used_this_function = 1;
+  MACHINE_FUNCTION (*cfun)->return_used_this_function = 1;
 
   offsets = arm_get_frame_offsets ();
   live_regs_mask = offsets->saved_regs_mask;
@@ -13589,9 +13593,9 @@  arm_output_function_prologue (FILE *f, H
 
   asm_fprintf (f, "\t%@ frame_needed = %d, uses_anonymous_args = %d\n",
 	       frame_pointer_needed,
-	       cfun->machine->uses_anonymous_args);
+	       MACHINE_FUNCTION (*cfun)->uses_anonymous_args);
 
-  if (cfun->machine->lr_save_eliminated)
+  if (MACHINE_FUNCTION (*cfun)->lr_save_eliminated)
     asm_fprintf (f, "\t%@ link register save eliminated.\n");
 
   if (crtl->calls_eh_return)
@@ -13618,7 +13622,7 @@  arm_output_epilogue (rtx sibling)
   /* If we have already generated the return instruction
      then it is futile to generate anything else.  */
   if (use_return_insn (FALSE, sibling) && 
-      (cfun->machine->return_used_this_function != 0))
+      (MACHINE_FUNCTION (*cfun)->return_used_this_function != 0))
     return "";
 
   func_type = arm_current_func_type ();
@@ -14056,7 +14060,7 @@  arm_output_function_epilogue (FILE *file
 	 of call_reg and call_value_reg type insns.  */
       for (regno = 0; regno < LR_REGNUM; regno++)
 	{
-	  rtx label = cfun->machine->call_via[regno];
+	  rtx label = MACHINE_FUNCTION (*cfun)->call_via[regno];
 
 	  if (label != NULL)
 	    {
@@ -14070,7 +14074,7 @@  arm_output_function_epilogue (FILE *file
       /* ??? Probably not safe to set this here, since it assumes that a
 	 function will be emitted as assembly immediately after we generate
 	 RTL for it.  This does not happen for inline functions.  */
-      cfun->machine->return_used_this_function = 0;
+      MACHINE_FUNCTION (*cfun)->return_used_this_function = 0;
     }
   else /* TARGET_32BIT */
     {
@@ -14078,7 +14082,7 @@  arm_output_function_epilogue (FILE *file
       offsets = arm_get_frame_offsets ();
 
       gcc_assert (!use_return_insn (FALSE, NULL)
-		  || (cfun->machine->return_used_this_function != 0)
+		  || (MACHINE_FUNCTION (*cfun)->return_used_this_function != 0)
 		  || offsets->saved_regs == offsets->outgoing_args
 		  || frame_pointer_needed);
 
@@ -14307,7 +14311,7 @@  emit_sfm (int base_reg, int count)
 static bool
 thumb_force_lr_save (void)
 {
-  return !cfun->machine->lr_save_eliminated
+  return !MACHINE_FUNCTION (*cfun)->lr_save_eliminated
 	 && (!leaf_function_p ()
 	     || thumb_far_jump_used_p ()
 	     || df_regs_ever_live_p (LR_REGNUM));
@@ -14378,7 +14382,7 @@  arm_get_frame_offsets (void)
   HOST_WIDE_INT frame_size;
   int i;
 
-  offsets = &cfun->machine->stack_offsets;
+  offsets = &MACHINE_FUNCTION (*cfun)->stack_offsets;
 
   /* We need to know if we are a leaf function.  Unfortunately, it
      is possible to be called after start_sequence has been called,
@@ -14870,7 +14874,7 @@  arm_expand_prologue (void)
 	  else
 	    {
 	      /* Store the args on the stack.  */
-	      if (cfun->machine->uses_anonymous_args)
+	      if (MACHINE_FUNCTION (*cfun)->uses_anonymous_args)
 		insn = emit_multi_reg_push
 		  ((0xf0 >> (args_to_push / 4)) & 0xf);
 	      else
@@ -14897,7 +14901,7 @@  arm_expand_prologue (void)
   if (args_to_push)
     {
       /* Push the argument registers, or reserve space for them.  */
-      if (cfun->machine->uses_anonymous_args)
+      if (MACHINE_FUNCTION (*cfun)->uses_anonymous_args)
 	insn = emit_multi_reg_push
 	  ((0xf0 >> (args_to_push / 4)) & 0xf);
       else
@@ -15039,7 +15043,7 @@  arm_expand_prologue (void)
   /* If the link register is being kept alive, with the return address in it,
      then make sure that it does not get reused by the ce2 pass.  */
   if ((live_regs_mask & (1 << LR_REGNUM)) == 0)
-    cfun->machine->lr_save_eliminated = 1;
+    MACHINE_FUNCTION (*cfun)->lr_save_eliminated = 1;
 }
 
 /* Print condition code to STREAM.  Helper function for arm_print_operand.  */
@@ -19236,7 +19240,7 @@  thumb_far_jump_used_p (void)
      it turns out that they are not being used.  Once we have made
      the decision that far jumps are present (and that hence the link
      register will be pushed onto the stack) we cannot go back on it.  */
-  if (cfun->machine->far_jump_used)
+  if (MACHINE_FUNCTION (*cfun)->far_jump_used)
     return 1;
 
   /* If this function is not being called from the prologue/epilogue
@@ -19266,8 +19270,8 @@  thumb_far_jump_used_p (void)
 	 If we need doubleword stack alignment this could affect the other
 	 elimination offsets so we can't risk getting it wrong.  */
       if (df_regs_ever_live_p (ARG_POINTER_REGNUM))
-	cfun->machine->arg_pointer_live = 1;
-      else if (!cfun->machine->arg_pointer_live)
+	MACHINE_FUNCTION (*cfun)->arg_pointer_live = 1;
+      else if (!MACHINE_FUNCTION (*cfun)->arg_pointer_live)
 	return 0;
     }
 
@@ -19284,7 +19288,7 @@  thumb_far_jump_used_p (void)
 	{
 	  /* Record the fact that we have decided that
 	     the function does use far jumps.  */
-	  cfun->machine->far_jump_used = 1;
+	  MACHINE_FUNCTION (*cfun)->far_jump_used = 1;
 	  return 1;
 	}
     }
@@ -19320,7 +19324,7 @@  thumb_unexpanded_epilogue (void)
   int had_to_push_lr;
   int size;
 
-  if (cfun->machine->return_used_this_function != 0)
+  if (MACHINE_FUNCTION (*cfun)->return_used_this_function != 0)
     return "";
 
   if (IS_NAKED (arm_current_func_type ()))
@@ -19706,9 +19710,9 @@  thumb1_expand_prologue (void)
       || (ARM_EABI_UNWIND_TABLES && cfun->can_throw_non_call_exceptions))
     emit_insn (gen_blockage ());
 
-  cfun->machine->lr_save_eliminated = !thumb_force_lr_save ();
+  MACHINE_FUNCTION (*cfun)->lr_save_eliminated = !thumb_force_lr_save ();
   if (live_regs_mask & 0xff)
-    cfun->machine->lr_save_eliminated = 0;
+    MACHINE_FUNCTION (*cfun)->lr_save_eliminated = 0;
 }
 
 
@@ -19819,7 +19823,7 @@  thumb1_output_function_prologue (FILE *f
 	fprintf (f, "\t.pad #%d\n",
 		 crtl->args.pretend_args_size);
 
-      if (cfun->machine->uses_anonymous_args)
+      if (MACHINE_FUNCTION (*cfun)->uses_anonymous_args)
 	{
 	  int num_pushes;
 
@@ -20199,9 +20203,9 @@  thumb_call_via_reg (rtx reg)
     }
   else
     {
-      if (cfun->machine->call_via[regno] == NULL)
-	cfun->machine->call_via[regno] = gen_label_rtx ();
-      labelp = cfun->machine->call_via + regno;
+      if (MACHINE_FUNCTION (*cfun)->call_via[regno] == NULL)
+	MACHINE_FUNCTION (*cfun)->call_via[regno] = gen_label_rtx ();
+      labelp = MACHINE_FUNCTION (*cfun)->call_via + regno;
     }
 
   output_asm_insn ("bl\t%a0", labelp);
@@ -20690,7 +20694,7 @@  arm_setup_incoming_varargs (CUMULATIVE_A
 {
   int nregs;
   
-  cfun->machine->uses_anonymous_args = 1;
+  MACHINE_FUNCTION (*cfun)->uses_anonymous_args = 1;
   if (pcum->pcs_variant <= ARM_PCS_AAPCS_LOCAL)
     {
       nregs = pcum->aapcs_ncrn;
Index: gcc/config/arm/arm.h
===================================================================
--- gcc/config/arm/arm.h	(revision 161310)
+++ gcc/config/arm/arm.h	(working copy)
@@ -1131,8 +1131,8 @@  extern int arm_structure_size_boundary;
    saved by the prologue, even if they would normally be
    call-clobbered.  */
 #define HARD_REGNO_RENAME_OK(SRC, DST)					\
-	(! IS_INTERRUPT (cfun->machine->func_type) ||			\
-	 df_regs_ever_live_p (DST))
+	(! IS_INTERRUPT (MACHINE_FUNCTION (*cfun)->func_type)		\
+	 || df_regs_ever_live_p (DST))
 
 /* Register and constant classes.  */
 
Index: gcc/config/arm/arm.md
===================================================================
--- gcc/config/arm/arm.md	(revision 161310)
+++ gcc/config/arm/arm.md	(working copy)
@@ -10661,7 +10661,7 @@  (define_expand "eh_epilogue"
   "TARGET_EITHER"
   "
   {
-    cfun->machine->eh_epilogue_sp_ofs = operands[1];
+    MACHINE_FUNCTION (*cfun)->eh_epilogue_sp_ofs = operands[1];
     if (GET_CODE (operands[2]) != REG || REGNO (operands[2]) != 2)
       {
 	rtx ra = gen_rtx_REG (Pmode, 2);
@@ -10671,7 +10671,7 @@  (define_expand "eh_epilogue"
       }
     /* This is a hack -- we may have crystalized the function type too
        early.  */
-    cfun->machine->func_type = 0;
+    MACHINE_FUNCTION (*cfun)->func_type = 0;
   }"
 )
 
Index: gcc/config/pa/pa.c
===================================================================
--- gcc/config/pa/pa.c	(revision 161310)
+++ gcc/config/pa/pa.c	(working copy)
@@ -4061,7 +4061,7 @@  pa_output_function_epilogue (FILE *file,
 	 debug information.  Forget that we are in this subspace to ensure
 	 that the next function is output in its own subspace.  */
       in_section = NULL;
-      cfun->machine->in_nsubspa = 2;
+      MACHINE_FUNCTION (*cfun)->in_nsubspa = 2;
     }
 
   if (INSN_ADDRESSES_SET_P ())
@@ -8240,7 +8240,7 @@  pa_asm_output_mi_thunk (FILE *file, tree
 	 debug information.  Forget that we are in this subspace to ensure
 	 that the next function is output in its own subspace.  */
       in_section = NULL;
-      cfun->machine->in_nsubspa = 2;
+      MACHINE_FUNCTION (*cfun)->in_nsubspa = 2;
     }
 
   if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
@@ -9533,11 +9533,12 @@  som_output_text_section_asm_op (const vo
   gcc_assert (TARGET_SOM);
   if (TARGET_GAS)
     {
-      if (cfun && cfun->machine && !cfun->machine->in_nsubspa)
+      if (cfun && MACHINE_FUNCTION (*cfun)
+	  && !MACHINE_FUNCTION (*cfun)->in_nsubspa)
 	{
 	  /* We only want to emit a .nsubspa directive once at the
 	     start of the function.  */
-	  cfun->machine->in_nsubspa = 1;
+	  MACHINE_FUNCTION (*cfun)->in_nsubspa = 1;
 
 	  /* Create a new subspace for the text.  This provides
 	     better stub placement and one-only functions.  */
@@ -9558,8 +9559,8 @@  som_output_text_section_asm_op (const vo
 	     text section to output debugging information.  Thus, we
 	     need to forget that we are in the text section so that
 	     varasm.c will call us when text_section is selected again.  */
-	  gcc_assert (!cfun || !cfun->machine
-		      || cfun->machine->in_nsubspa == 2);
+	  gcc_assert (!cfun || !MACHINE_FUNCTION (*cfun)
+		      || MACHINE_FUNCTION (*cfun)->in_nsubspa == 2);
 	  in_section = NULL;
 	}
       output_section_asm_op ("\t.SPACE $TEXT$\n\t.NSUBSPA $CODE$");
Index: gcc/config/mips/sde.h
===================================================================
--- gcc/config/mips/sde.h	(revision 161310)
+++ gcc/config/mips/sde.h	(working copy)
@@ -91,7 +91,8 @@  along with GCC; see the file COPYING3.  
 /* Use $5 as a temporary for both MIPS16 and non-MIPS16.  */
 #undef MIPS_EPILOGUE_TEMP_REGNUM
 #define MIPS_EPILOGUE_TEMP_REGNUM \
-  (cfun->machine->interrupt_handler_p ? K0_REG_NUM : GP_REG_FIRST + 5)
+  (MACHINE_FUNCTION (*cfun)->interrupt_handler_p \
+   ? K0_REG_NUM : GP_REG_FIRST + 5)
 
 /* Using long will always be right for size_t and ptrdiff_t, since
    sizeof(long) must equal sizeof(void *), following from the setting
Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	(revision 161310)
+++ gcc/config/mips/mips.c	(working copy)
@@ -2622,13 +2622,13 @@  gen_load_const_gp (rtx reg)
 static rtx
 mips16_gp_pseudo_reg (void)
 {
-  if (cfun->machine->mips16_gp_pseudo_rtx == NULL_RTX)
-    cfun->machine->mips16_gp_pseudo_rtx = gen_reg_rtx (Pmode);
+  if (MACHINE_FUNCTION (*cfun)->mips16_gp_pseudo_rtx == NULL_RTX)
+    MACHINE_FUNCTION (*cfun)->mips16_gp_pseudo_rtx = gen_reg_rtx (Pmode);
 
   /* Don't emit an instruction to initialize the pseudo register if
      we are being called from the tree optimizers' cost-calculation
      routines.  */
-  if (!cfun->machine->initialized_mips16_gp_pseudo_p
+  if (!MACHINE_FUNCTION (*cfun)->initialized_mips16_gp_pseudo_p
       && (current_ir_type () != IR_GIMPLE || currently_expanding_to_rtl))
     {
       rtx insn, scan;
@@ -2639,15 +2639,15 @@  mips16_gp_pseudo_reg (void)
       while (NEXT_INSN (scan) && !INSN_P (NEXT_INSN (scan)))
 	scan = NEXT_INSN (scan);
 
-      insn = gen_load_const_gp (cfun->machine->mips16_gp_pseudo_rtx);
+      insn = gen_load_const_gp (MACHINE_FUNCTION (*cfun)->mips16_gp_pseudo_rtx);
       emit_insn_after (insn, scan);
 
       pop_topmost_sequence ();
 
-      cfun->machine->initialized_mips16_gp_pseudo_p = true;
+      MACHINE_FUNCTION (*cfun)->initialized_mips16_gp_pseudo_p = true;
     }
 
-  return cfun->machine->mips16_gp_pseudo_rtx;
+  return MACHINE_FUNCTION (*cfun)->mips16_gp_pseudo_rtx;
 }
 
 /* Return a base register that holds pic_offset_table_rtx.
@@ -5377,8 +5377,8 @@  mips_setup_incoming_varargs (CUMULATIVE_
 	}
     }
   if (REG_PARM_STACK_SPACE (cfun->decl) == 0)
-    cfun->machine->varargs_size = (gp_saved * UNITS_PER_WORD
-				   + fp_saved * UNITS_PER_FPREG);
+    MACHINE_FUNCTION (*cfun)->varargs_size
+      = (gp_saved * UNITS_PER_WORD + fp_saved * UNITS_PER_FPREG);
 }
 
 /* Implement TARGET_BUILTIN_VA_LIST.  */
@@ -5536,7 +5536,8 @@  mips_va_start (tree valist, rtx nextarg)
     }
   else
     {
-      nextarg = plus_constant (nextarg, -cfun->machine->varargs_size);
+      nextarg
+	= plus_constant (nextarg, -MACHINE_FUNCTION (*cfun)->varargs_size);
       std_expand_builtin_va_start (valist, nextarg);
     }
 }
@@ -7830,9 +7831,9 @@  mips_debugger_offset (rtx addr, HOST_WID
       || reg == frame_pointer_rtx
       || reg == hard_frame_pointer_rtx)
     {
-      offset -= cfun->machine->frame.total_size;
+      offset -= MACHINE_FUNCTION (*cfun)->frame.total_size;
       if (reg == hard_frame_pointer_rtx)
-	offset += cfun->machine->frame.hard_frame_pointer_offset;
+	offset += MACHINE_FUNCTION (*cfun)->frame.hard_frame_pointer_offset;
     }
 
   /* sdbout_parms does not want this to crash for unrecognized cases.  */
@@ -8367,9 +8368,11 @@  mips16e_collect_argument_save_p (rtx des
      frame-pointer access.  */
   addr = mips16e_collect_propagate_value (XEXP (dest, 0), reg_values);
   mips_split_plus (addr, &base, &offset);
-  required_offset = cfun->machine->frame.total_size + argno * UNITS_PER_WORD;
+  required_offset
+    = MACHINE_FUNCTION (*cfun)->frame.total_size + argno * UNITS_PER_WORD;
   if (base == hard_frame_pointer_rtx)
-    required_offset -= cfun->machine->frame.hard_frame_pointer_offset;
+    required_offset
+      -= MACHINE_FUNCTION (*cfun)->frame.hard_frame_pointer_offset;
   else if (base != stack_pointer_rtx)
     return false;
   if (offset != required_offset)
@@ -8413,7 +8416,7 @@  mips16e_collect_argument_saves (void)
       src = SET_SRC (set);
       if (mips16e_collect_argument_save_p (dest, src, reg_values, &regno))
 	{
-	  if (!BITSET_P (cfun->machine->frame.mask, regno))
+	  if (!BITSET_P (MACHINE_FUNCTION (*cfun)->frame.mask, regno))
 	    {
 	      delete_insn (insn);
 	      nargs = MAX (nargs, (regno - GP_ARG_FIRST) + 1);
@@ -8478,7 +8481,7 @@  mips16e_build_save_restore (bool restore
   unsigned int i, regno;
   int n;
 
-  gcc_assert (cfun->machine->frame.num_fp == 0);
+  gcc_assert (MACHINE_FUNCTION (*cfun)->frame.num_fp == 0);
 
   /* Calculate the number of elements in the PARALLEL.  We need one element
      for the stack adjustment, one for each argument register save, and one
@@ -8786,7 +8789,7 @@  mips_cfun_has_inflexible_gp_ref_p (void)
 	return true;
     }
 
-  return mips_find_gp_ref (&cfun->machine->has_inflexible_gp_insn_p,
+  return mips_find_gp_ref (&MACHINE_FUNCTION (*cfun)->has_inflexible_gp_insn_p,
 			   mips_insn_has_inflexible_gp_ref_p);
 }
 
@@ -8824,7 +8827,7 @@  mips_cfun_has_flexible_gp_ref_p (void)
   if (TARGET_ABICALLS_PIC2 && !reload_completed && crtl->uses_const_pool)
     return true;
 
-  return mips_find_gp_ref (&cfun->machine->has_flexible_gp_insn_p,
+  return mips_find_gp_ref (&MACHINE_FUNCTION (*cfun)->has_flexible_gp_insn_p,
 			   mips_insn_has_flexible_gp_ref_p);
 }
 
@@ -8878,7 +8881,7 @@  mips_global_pointer (void)
 
    We handle this as follows:
 
-   (1) During reload, we set cfun->machine->global_pointer to
+   (1) During reload, we set MACHINE_FUNCTION (*cfun)->global_pointer to
        INVALID_REGNUM if we _know_ that the current function
        doesn't need a global pointer.  This is only valid if
        long branches don't need the GOT.
@@ -8886,7 +8889,7 @@  mips_global_pointer (void)
        Otherwise, we assume that we might need a global pointer
        and pick an appropriate register.
 
-   (2) If cfun->machine->global_pointer != INVALID_REGNUM,
+   (2) If MACHINE_FUNCTION (*cfun)->global_pointer != INVALID_REGNUM,
        we ensure that the global pointer is available at every
        block boundary bar entry and exit.  We do this in one of two ways:
 
@@ -8910,13 +8913,14 @@  mips_global_pointer (void)
    (3) During prologue and epilogue generation, we emit "ghost"
        placeholder instructions to manipulate the global pointer.
 
-   (4) During prologue generation, we set cfun->machine->must_initialize_gp_p
-       and cfun->machine->must_restore_gp_when_clobbered_p if we already know
-       that the function needs a global pointer.  (There is no need to set
+   (4) During prologue generation, we set
+       MACHINE_FUNCTION (*cfun)->must_initialize_gp_p and
+       MACHINE_FUNCTION (*cfun)->must_restore_gp_when_clobbered_p if we already
+       know that the function needs a global pointer.  (There is no need to set
        them earlier than this, and doing it as late as possible leads to
        fewer false positives.)
 
-   (5) If cfun->machine->must_initialize_gp_p is true during a
+   (5) If MACHINE_FUNCTION (*cfun)->must_initialize_gp_p is true during a
        split_insns pass, we split the ghost instructions into real
        instructions.  These split instructions can then be optimized in
        the usual way.  Otherwise, we keep the ghost instructions intact,
@@ -8928,15 +8932,16 @@  mips_global_pointer (void)
        stores $28 to the stack, but it handles the split form of
        the ghost instruction as an ordinary store.
 
-   (6) [OldABI only.]  If cfun->machine->must_restore_gp_when_clobbered_p
+   (6) [OldABI only.]  If
+       MACHINE_FUNCTION (*cfun)->must_restore_gp_when_clobbered_p
        is true during the first post-epilogue split_insns pass, we split
        calls and restore_gp patterns into instructions that explicitly
        load pic_offset_table_rtx from the cprestore slot.  Otherwise,
        we split these patterns into instructions that _don't_ load from
        the cprestore slot.
 
-       If cfun->machine->must_restore_gp_when_clobbered_p is true at the
-       time of the split, then any instructions that exist at that time
+       If MACHINE_FUNCTION (*cfun)->must_restore_gp_when_clobbered_p is true
+       at the time of the split, then any instructions that exist at that time
        can make free use of pic_offset_table_rtx.  However, if we want
        to introduce new uses of the global pointer after the split,
        we must explicitly load the value from the cprestore slot, since
@@ -8947,9 +8952,10 @@  mips_global_pointer (void)
        loads from the cprestore slot in the usual case where no
        long branches are needed.
 
-   (7) If cfun->machine->must_initialize_gp_p is still false at the end
-       of md_reorg, we decide whether the global pointer is needed for
-       long branches.  If so, we set cfun->machine->must_initialize_gp_p
+   (7) If MACHINE_FUNCTION (*cfun)->must_initialize_gp_p is still
+       false at the end of md_reorg, we decide whether the global
+       pointer is needed for long branches.  If so, we set
+       MACHINE_FUNCTION (*cfun)->must_initialize_gp_p
        to true and split the ghost instructions into real instructions
        at that stage.
 
@@ -8974,7 +8980,7 @@  mips_global_pointer (void)
 bool
 mips_must_initialize_gp_p (void)
 {
-  return cfun->machine->must_initialize_gp_p;
+  return MACHINE_FUNCTION (*cfun)->must_initialize_gp_p;
 }
 
 /* Return true if REGNO is a register that is ordinarily call-clobbered
@@ -8989,7 +8995,7 @@  mips_interrupt_extra_call_saved_reg_p (u
   if (TARGET_DSP && DSP_ACC_REG_P (regno))
     return true;
 
-  if (GP_REG_P (regno) && !cfun->machine->use_shadow_register_set_p)
+  if (GP_REG_P (regno) && !MACHINE_FUNCTION (*cfun)->use_shadow_register_set_p)
     {
       /* $0 is hard-wired.  */
       if (regno == GP_REG_FIRST)
@@ -9020,7 +9026,7 @@  static bool
 mips_cfun_call_saved_reg_p (unsigned int regno)
 {
   /* Interrupt handlers need to save extra registers.  */
-  if (cfun->machine->interrupt_handler_p
+  if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p
       && mips_interrupt_extra_call_saved_reg_p (regno))
     return true;
 
@@ -9058,7 +9064,7 @@  mips_cfun_might_clobber_call_saved_reg_p
 
   /* If we're using a call-saved global pointer, the function's
      prologue will need to set it up.  */
-  if (cfun->machine->global_pointer == regno)
+  if (MACHINE_FUNCTION (*cfun)->global_pointer == regno)
     return true;
 
   /* The function's prologue will need to set the frame pointer if
@@ -9074,7 +9080,7 @@  mips_cfun_might_clobber_call_saved_reg_p
 
   /* If REGNO is ordinarily call-clobbered, we must assume that any
      called function could modify it.  */
-  if (cfun->machine->interrupt_handler_p
+  if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p
       && !current_function_is_leaf
       && mips_interrupt_extra_call_saved_reg_p (regno))
     return true;
@@ -9197,22 +9203,22 @@  mips_compute_frame_info (void)
 	error ("interrupt handlers cannot be MIPS16 functions");
       else
 	{
-	  cfun->machine->interrupt_handler_p = true;
-	  cfun->machine->use_shadow_register_set_p =
+	  MACHINE_FUNCTION (*cfun)->interrupt_handler_p = true;
+	  MACHINE_FUNCTION (*cfun)->use_shadow_register_set_p =
 	    mips_use_shadow_register_set_p (TREE_TYPE (current_function_decl));
-	  cfun->machine->keep_interrupts_masked_p =
+	  MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p =
 	    mips_keep_interrupts_masked_p (TREE_TYPE (current_function_decl));
-	  cfun->machine->use_debug_exception_return_p =
+	  MACHINE_FUNCTION (*cfun)->use_debug_exception_return_p =
 	    mips_use_debug_exception_return_p (TREE_TYPE
 					       (current_function_decl));
 	}
     }
 
-  frame = &cfun->machine->frame;
+  frame = &MACHINE_FUNCTION (*cfun)->frame;
   memset (frame, 0, sizeof (*frame));
   size = get_frame_size ();
 
-  cfun->machine->global_pointer = mips_global_pointer ();
+  MACHINE_FUNCTION (*cfun)->global_pointer = mips_global_pointer ();
 
   /* The first two blocks contain the outgoing argument area and the $gp save
      slot.  This area isn't needed in leaf functions, but if the
@@ -9294,7 +9300,7 @@  mips_compute_frame_info (void)
     }
 
   /* Add in space for the interrupt context information.  */
-  if (cfun->machine->interrupt_handler_p)
+  if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p)
     {
       /* Check HI/LO.  */
       if (mips_save_reg_p (LO_REGNUM) || mips_save_reg_p (HI_REGNUM))
@@ -9315,7 +9321,7 @@  mips_compute_frame_info (void)
       frame->num_cop0_regs++;
 
       /* If we don't keep interrupts masked, we need to save EPC.  */
-      if (!cfun->machine->keep_interrupts_masked_p)
+      if (!MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p)
 	frame->num_cop0_regs++;
     }
 
@@ -9335,7 +9341,7 @@  mips_compute_frame_info (void)
     }
 
   /* Move above the callee-allocated varargs save area.  */
-  offset += MIPS_STACK_ALIGN (cfun->machine->varargs_size);
+  offset += MIPS_STACK_ALIGN (MACHINE_FUNCTION (*cfun)->varargs_size);
   frame->arg_pointer_offset = offset;
 
   /* Move above the callee-allocated area for pretend stack arguments.  */
@@ -9365,7 +9371,8 @@  mips_compute_frame_info (void)
 enum mips_loadgp_style
 mips_current_loadgp_style (void)
 {
-  if (!TARGET_USE_GOT || cfun->machine->global_pointer == INVALID_REGNUM)
+  if (!TARGET_USE_GOT
+      || MACHINE_FUNCTION (*cfun)->global_pointer == INVALID_REGNUM)
     return LOADGP_NONE;
 
   if (TARGET_RTP_PIC)
@@ -9394,7 +9401,7 @@  mips_frame_pointer_required (void)
   if (TARGET_MIPS16)
     {
       mips_compute_frame_info ();
-      if (!SMALL_OPERAND (cfun->machine->frame.total_size))
+      if (!SMALL_OPERAND (MACHINE_FUNCTION (*cfun)->frame.total_size))
 	return true;
     }
 
@@ -9426,15 +9433,15 @@  mips_initial_elimination_offset (int fro
     {
     case FRAME_POINTER_REGNUM:
       if (FRAME_GROWS_DOWNWARD)
-	offset = (cfun->machine->frame.args_size
-		  + cfun->machine->frame.cprestore_size
-		  + cfun->machine->frame.var_size);
+	offset = (MACHINE_FUNCTION (*cfun)->frame.args_size
+		  + MACHINE_FUNCTION (*cfun)->frame.cprestore_size
+		  + MACHINE_FUNCTION (*cfun)->frame.var_size);
       else
 	offset = 0;
       break;
 
     case ARG_POINTER_REGNUM:
-      offset = cfun->machine->frame.arg_pointer_offset;
+      offset = MACHINE_FUNCTION (*cfun)->frame.arg_pointer_offset;
       break;
 
     default:
@@ -9442,7 +9449,7 @@  mips_initial_elimination_offset (int fro
     }
 
   if (to == HARD_FRAME_POINTER_REGNUM)
-    offset -= cfun->machine->frame.hard_frame_pointer_offset;
+    offset -= MACHINE_FUNCTION (*cfun)->frame.hard_frame_pointer_offset;
 
   return offset;
 }
@@ -9490,9 +9497,10 @@  mips_set_return_address (rtx address, rt
 {
   rtx slot_address;
 
-  gcc_assert (BITSET_P (cfun->machine->frame.mask, RETURN_ADDR_REGNUM));
+  gcc_assert (BITSET_P (MACHINE_FUNCTION (*cfun)->frame.mask,
+			RETURN_ADDR_REGNUM));
   slot_address = mips_add_offset (scratch, stack_pointer_rtx,
-				  cfun->machine->frame.gp_sp_offset);
+				  MACHINE_FUNCTION (*cfun)->frame.gp_sp_offset);
   mips_emit_move (gen_frame_mem (GET_MODE (address), slot_address), address);
 }
 
@@ -9501,8 +9509,8 @@  mips_set_return_address (rtx address, rt
 bool
 mips_cfun_has_cprestore_slot_p (void)
 {
-  return (cfun->machine->global_pointer != INVALID_REGNUM
-	  && cfun->machine->frame.cprestore_size > 0);
+  return (MACHINE_FUNCTION (*cfun)->global_pointer != INVALID_REGNUM
+	  && MACHINE_FUNCTION (*cfun)->frame.cprestore_size > 0);
 }
 
 /* Fill *BASE and *OFFSET such that *BASE + *OFFSET refers to the
@@ -9516,7 +9524,7 @@  mips_get_cprestore_base_and_offset (rtx 
 {
   const struct mips_frame_info *frame;
 
-  frame = &cfun->machine->frame;
+  frame = &MACHINE_FUNCTION (*cfun)->frame;
   /* .cprestore always uses the stack pointer instead of the frame pointer.
      We have a free choice for direct stores for non-MIPS16 functions,
      and for MIPS16 functions whose cprestore slot is in range of the
@@ -9598,7 +9606,7 @@  mips_restore_gp_from_cprestore_slot (rtx
 {
   gcc_assert (TARGET_ABICALLS && TARGET_OLDABI && epilogue_completed);
 
-  if (!cfun->machine->must_restore_gp_when_clobbered_p)
+  if (!MACHINE_FUNCTION (*cfun)->must_restore_gp_when_clobbered_p)
     {
       emit_note (NOTE_INSN_DELETED);
       return;
@@ -9643,8 +9651,8 @@  mips_for_each_saved_acc (HOST_WIDE_INT s
   HOST_WIDE_INT offset;
   int regno;
 
-  offset = cfun->machine->frame.acc_sp_offset - sp_offset;
-  if (BITSET_P (cfun->machine->frame.acc_mask, 0))
+  offset = MACHINE_FUNCTION (*cfun)->frame.acc_sp_offset - sp_offset;
+  if (BITSET_P (MACHINE_FUNCTION (*cfun)->frame.acc_mask, 0))
     {
       mips_save_restore_reg (word_mode, LO_REGNUM, offset, fn);
       offset -= UNITS_PER_WORD;
@@ -9653,7 +9661,7 @@  mips_for_each_saved_acc (HOST_WIDE_INT s
     }
 
   for (regno = DSP_ACC_REG_FIRST; regno <= DSP_ACC_REG_LAST; regno++)
-    if (BITSET_P (cfun->machine->frame.acc_mask,
+    if (BITSET_P (MACHINE_FUNCTION (*cfun)->frame.acc_mask,
 		  ((regno - DSP_ACC_REG_FIRST) / 2) + 1))
       {
 	mips_save_restore_reg (word_mode, regno, offset, fn);
@@ -9677,25 +9685,25 @@  mips_for_each_saved_gpr_and_fpr (HOST_WI
      the return register be stored at func+4, and also it allows us not to
      need a nop in the epilogue if at least one register is reloaded in
      addition to return address.  */
-  offset = cfun->machine->frame.gp_sp_offset - sp_offset;
+  offset = MACHINE_FUNCTION (*cfun)->frame.gp_sp_offset - sp_offset;
   for (regno = GP_REG_LAST; regno >= GP_REG_FIRST; regno--)
-    if (BITSET_P (cfun->machine->frame.mask, regno - GP_REG_FIRST))
+    if (BITSET_P (MACHINE_FUNCTION (*cfun)->frame.mask, regno - GP_REG_FIRST))
       {
 	/* Record the ra offset for use by mips_function_profiler.  */
 	if (regno == RETURN_ADDR_REGNUM)
-	  cfun->machine->frame.ra_fp_offset = offset + sp_offset;
+	  MACHINE_FUNCTION (*cfun)->frame.ra_fp_offset = offset + sp_offset;
 	mips_save_restore_reg (word_mode, regno, offset, fn);
 	offset -= UNITS_PER_WORD;
       }
 
   /* This loop must iterate over the same space as its companion in
      mips_compute_frame_info.  */
-  offset = cfun->machine->frame.fp_sp_offset - sp_offset;
+  offset = MACHINE_FUNCTION (*cfun)->frame.fp_sp_offset - sp_offset;
   fpr_mode = (TARGET_SINGLE_FLOAT ? SFmode : DFmode);
   for (regno = FP_REG_LAST - MAX_FPRS_PER_FMT + 1;
        regno >= FP_REG_FIRST;
        regno -= MAX_FPRS_PER_FMT)
-    if (BITSET_P (cfun->machine->frame.fmask, regno - FP_REG_FIRST))
+    if (BITSET_P (MACHINE_FUNCTION (*cfun)->frame.fmask, regno - FP_REG_FIRST))
       {
 	mips_save_restore_reg (fpr_mode, regno, offset, fn);
 	offset -= GET_MODE_SIZE (fpr_mode);
@@ -9738,7 +9746,8 @@  mips_emit_save_slot_move (rtx dest, rtx 
       mem = src;
     }
 
-  if (regno == cfun->machine->global_pointer && !mips_must_initialize_gp_p ())
+  if (regno == MACHINE_FUNCTION (*cfun)->global_pointer
+      && !mips_must_initialize_gp_p ())
     {
       /* We don't yet know whether we'll need this instruction or not.
 	 Postpone the decision by emitting a ghost move.  This move
@@ -9794,7 +9803,7 @@  mips_output_cplocal (void)
 {
   if (!TARGET_EXPLICIT_RELOCS
       && mips_must_initialize_gp_p ()
-      && cfun->machine->global_pointer != GLOBAL_POINTER_REGNUM)
+      && MACHINE_FUNCTION (*cfun)->global_pointer != GLOBAL_POINTER_REGNUM)
     output_asm_insn (".cplocal %+", 0);
 }
 
@@ -9828,7 +9837,7 @@  mips_output_function_prologue (FILE *fil
     {
       const struct mips_frame_info *frame;
 
-      frame = &cfun->machine->frame;
+      frame = &MACHINE_FUNCTION (*cfun)->frame;
 
       /* .frame FRAMEREG, FRAMESIZE, RETREG.  */
       fprintf (file,
@@ -9880,13 +9889,13 @@  mips_output_function_prologue (FILE *fil
 	     .set nomacro block.  */
 	  mips_push_asm_switch (&mips_noreorder);
 	  output_asm_insn (".cpload\t%^", 0);
-	  if (!cfun->machine->all_noreorder_p)
+	  if (!MACHINE_FUNCTION (*cfun)->all_noreorder_p)
 	    mips_pop_asm_switch (&mips_noreorder);
 	  else
 	    mips_push_asm_switch (&mips_nomacro);
 	}
     }
-  else if (cfun->machine->all_noreorder_p)
+  else if (MACHINE_FUNCTION (*cfun)->all_noreorder_p)
     {
       mips_push_asm_switch (&mips_noreorder);
       mips_push_asm_switch (&mips_nomacro);
@@ -9910,7 +9919,7 @@  mips_output_function_epilogue (FILE *fil
   SET_REGNO (pic_offset_table_rtx, GLOBAL_POINTER_REGNUM);
   mips_output_cplocal ();
 
-  if (cfun->machine->all_noreorder_p)
+  if (MACHINE_FUNCTION (*cfun)->all_noreorder_p)
     {
       mips_pop_asm_switch (&mips_nomacro);
       mips_pop_asm_switch (&mips_noreorder);
@@ -10026,7 +10035,7 @@  mips_expand_prologue (void)
   unsigned int nargs;
   rtx insn;
 
-  if (cfun->machine->global_pointer != INVALID_REGNUM)
+  if (MACHINE_FUNCTION (*cfun)->global_pointer != INVALID_REGNUM)
     {
       /* Check whether an insn uses pic_offset_table_rtx, either explicitly
 	 or implicitly.  If so, we can commit to using a global pointer
@@ -10034,14 +10043,15 @@  mips_expand_prologue (void)
       if (mips_cfun_has_inflexible_gp_ref_p ()
 	  || mips_cfun_has_flexible_gp_ref_p ())
 	{
-	  cfun->machine->must_initialize_gp_p = true;
-	  cfun->machine->must_restore_gp_when_clobbered_p = true;
+	  MACHINE_FUNCTION (*cfun)->must_initialize_gp_p = true;
+	  MACHINE_FUNCTION (*cfun)->must_restore_gp_when_clobbered_p = true;
 	}
 
-      SET_REGNO (pic_offset_table_rtx, cfun->machine->global_pointer);
+      SET_REGNO (pic_offset_table_rtx,
+		 MACHINE_FUNCTION (*cfun)->global_pointer);
     }
 
-  frame = &cfun->machine->frame;
+  frame = &MACHINE_FUNCTION (*cfun)->frame;
   size = frame->total_size;
 
   /* Save the registers.  Allocate up to MIPS_MAX_FIRST_STACK_STEP
@@ -10079,18 +10089,18 @@  mips_expand_prologue (void)
  	}
       else
  	{
-	  if (cfun->machine->interrupt_handler_p)
+	  if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p)
 	    {
 	      HOST_WIDE_INT offset;
 	      rtx mem;
 
 	      /* If this interrupt is using a shadow register set, we need to
 		 get the stack pointer from the previous register set.  */
-	      if (cfun->machine->use_shadow_register_set_p)
+	      if (MACHINE_FUNCTION (*cfun)->use_shadow_register_set_p)
 		emit_insn (gen_mips_rdpgpr (stack_pointer_rtx,
 					    stack_pointer_rtx));
 
-	      if (!cfun->machine->keep_interrupts_masked_p)
+	      if (!MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p)
 		{
 		  /* Move from COP0 Cause to K0.  */
 		  emit_insn (gen_cop0_move (gen_rtx_REG (SImode, K0_REG_NUM),
@@ -10110,7 +10120,7 @@  mips_expand_prologue (void)
 
 	      /* Start at the uppermost location for saving.  */
 	      offset = frame->cop0_sp_offset - size;
-	      if (!cfun->machine->keep_interrupts_masked_p)
+	      if (!MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p)
 		{
 		  /* Push EPC into its stack slot.  */
 		  mem = gen_frame_mem (word_mode,
@@ -10126,7 +10136,7 @@  mips_expand_prologue (void)
 						     COP0_STATUS_REG_NUM)));
 
 	      /* Right justify the RIPL in k0.  */
-	      if (!cfun->machine->keep_interrupts_masked_p)
+	      if (!MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p)
 		emit_insn (gen_lshrsi3 (gen_rtx_REG (SImode, K0_REG_NUM),
 					gen_rtx_REG (SImode, K0_REG_NUM),
 					GEN_INT (CAUSE_IPL)));
@@ -10138,13 +10148,13 @@  mips_expand_prologue (void)
 	      offset -= UNITS_PER_WORD;
 
 	      /* Insert the RIPL into our copy of SR (k1) as the new IPL.  */
-	      if (!cfun->machine->keep_interrupts_masked_p)
+	      if (!MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p)
 		emit_insn (gen_insvsi (gen_rtx_REG (SImode, K1_REG_NUM),
 				       GEN_INT (6),
 				       GEN_INT (SR_IPL),
 				       gen_rtx_REG (SImode, K0_REG_NUM)));
 
-	      if (!cfun->machine->keep_interrupts_masked_p)
+	      if (!MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p)
 		/* Enable interrupts by clearing the KSU ERL and EXL bits.
 		   IE is already the correct value, so we don't have to do
 		   anything explicit.  */
@@ -10260,7 +10270,7 @@  mips_expand_prologue (void)
     }
 
   /* We need to search back to the last use of K0 or K1.  */
-  if (cfun->machine->interrupt_handler_p)
+  if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p)
     {
       for (insn = get_last_insn (); insn != NULL_RTX; insn = PREV_INSN (insn))
 	if (INSN_P (insn)
@@ -10336,7 +10346,7 @@  mips_expand_epilogue (bool sibcall_p)
      should deallocate afterwards.
 
      Start off by assuming that no registers need to be restored.  */
-  frame = &cfun->machine->frame;
+  frame = &MACHINE_FUNCTION (*cfun)->frame;
   step1 = frame->total_size;
   step2 = 0;
 
@@ -10418,13 +10428,13 @@  mips_expand_epilogue (bool sibcall_p)
       mips_for_each_saved_gpr_and_fpr (frame->total_size - step2,
 				       mips_restore_reg);
 
-      if (cfun->machine->interrupt_handler_p)
+      if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p)
 	{
 	  HOST_WIDE_INT offset;
 	  rtx mem;
 
 	  offset = frame->cop0_sp_offset - (frame->total_size - step2);
-	  if (!cfun->machine->keep_interrupts_masked_p)
+	  if (!MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p)
 	    {
 	      /* Restore the original EPC.  */
 	      mem = gen_frame_mem (word_mode,
@@ -10444,7 +10454,7 @@  mips_expand_epilogue (bool sibcall_p)
 	  offset -= UNITS_PER_WORD;
 
 	  /* If we don't use shoadow register set, we need to update SP.  */
-	  if (!cfun->machine->use_shadow_register_set_p && step2 > 0)
+	  if (!MACHINE_FUNCTION (*cfun)->use_shadow_register_set_p && step2 > 0)
 	    emit_insn (gen_add3_insn (stack_pointer_rtx,
 				      stack_pointer_rtx,
 				      GEN_INT (step2)));
@@ -10484,10 +10494,10 @@  mips_expand_epilogue (bool sibcall_p)
   if (!sibcall_p)
     {
       mips_expand_before_return ();
-      if (cfun->machine->interrupt_handler_p)
+      if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p)
 	{
 	  /* Interrupt handlers generate eret or deret.  */
-	  if (cfun->machine->use_debug_exception_return_p)
+	  if (MACHINE_FUNCTION (*cfun)->use_debug_exception_return_p)
 	    emit_jump_insn (gen_mips_deret ());
 	  else
 	    emit_jump_insn (gen_mips_eret ());
@@ -10510,8 +10520,8 @@  mips_expand_epilogue (bool sibcall_p)
     }
 
   /* Search from the beginning to the first use of K0 or K1.  */
-  if (cfun->machine->interrupt_handler_p
-      && !cfun->machine->keep_interrupts_masked_p)
+  if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p
+      && !MACHINE_FUNCTION (*cfun)->keep_interrupts_masked_p)
     {
       for (insn = get_insns (); insn != NULL_RTX; insn = NEXT_INSN (insn))
 	if (INSN_P (insn)
@@ -10532,7 +10542,7 @@  bool
 mips_can_use_return_insn (void)
 {
   /* Interrupt handlers need to go through the epilogue.  */
-  if (cfun->machine->interrupt_handler_p)
+  if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p)
     return false;
 
   if (!reload_completed)
@@ -10547,7 +10557,7 @@  mips_can_use_return_insn (void)
   if (mips16_cfun_returns_in_fpr_p ())
     return false;
 
-  return cfun->machine->frame.total_size == 0;
+  return MACHINE_FUNCTION (*cfun)->frame.total_size == 0;
 }
 
 /* Return true if register REGNO can store a value of mode MODE.
@@ -11222,12 +11232,12 @@  mips_process_load_label (rtx target)
 static unsigned int
 mips_load_label_length (void)
 {
-  if (cfun->machine->load_label_length == 0)
+  if (MACHINE_FUNCTION (*cfun)->load_label_length == 0)
     {
       mips_process_load_label (pc_rtx);
-      cfun->machine->load_label_length = mips_multi_num_insns;
+      MACHINE_FUNCTION (*cfun)->load_label_length = mips_multi_num_insns;
     }
-  return cfun->machine->load_label_length;
+  return MACHINE_FUNCTION (*cfun)->load_label_length;
 }
 
 /* Emit an asm sequence to start a noat block and load the address
@@ -11279,7 +11289,8 @@  mips_adjust_insn_length (rtx insn, int l
     length += 4;
 
   /* See how many nops might be needed to avoid hardware hazards.  */
-  if (!cfun->machine->ignore_hazard_length_p && INSN_CODE (insn) >= 0)
+  if (!MACHINE_FUNCTION (*cfun)->ignore_hazard_length_p
+      && INSN_CODE (insn) >= 0)
     switch (get_attr_hazard (insn))
       {
       case HAZARD_NONE:
@@ -13805,8 +13816,8 @@  r10k_safe_address_p (rtx x, rtx insn)
      is safe from speculation at any point in the function.  */
   mips_split_plus (x, &base, &offset_val);
   if (base == virtual_incoming_args_rtx
-      && offset_val >= -cfun->machine->frame.total_size
-      && offset_val < cfun->machine->frame.args_size)
+      && offset_val >= -MACHINE_FUNCTION (*cfun)->frame.total_size
+      && offset_val < MACHINE_FUNCTION (*cfun)->frame.args_size)
     return true;
 
   /* Check for uncached addresses.  */
@@ -14725,7 +14736,7 @@  mips_avoid_hazard (rtx after, rtx insn, 
      an asm statement.  We don't know whether there will be hazards
      between the asm statement and the gcc-generated code.  */
   if (GET_CODE (pattern) == ASM_INPUT || asm_noperands (pattern) >= 0)
-    cfun->machine->all_noreorder_p = false;
+    MACHINE_FUNCTION (*cfun)->all_noreorder_p = false;
 
   /* Ignore zero-length instructions (barriers and the like).  */
   ninsns = get_attr_length (insn) / 4;
@@ -14786,36 +14797,36 @@  mips_reorg_process_insns (void)
   split_all_insns_noflow ();
 
   /* Recalculate instruction lengths without taking nops into account.  */
-  cfun->machine->ignore_hazard_length_p = true;
+  MACHINE_FUNCTION (*cfun)->ignore_hazard_length_p = true;
   shorten_branches (get_insns ());
 
-  cfun->machine->all_noreorder_p = true;
+  MACHINE_FUNCTION (*cfun)->all_noreorder_p = true;
 
   /* We don't track MIPS16 PC-relative offsets closely enough to make
      a good job of "set .noreorder" code in MIPS16 mode.  */
   if (TARGET_MIPS16)
-    cfun->machine->all_noreorder_p = false;
+    MACHINE_FUNCTION (*cfun)->all_noreorder_p = false;
 
   /* Code that doesn't use explicit relocs can't be ".set nomacro".  */
   if (!TARGET_EXPLICIT_RELOCS)
-    cfun->machine->all_noreorder_p = false;
+    MACHINE_FUNCTION (*cfun)->all_noreorder_p = false;
 
   /* Profiled functions can't be all noreorder because the profiler
      support uses assembler macros.  */
   if (crtl->profile)
-    cfun->machine->all_noreorder_p = false;
+    MACHINE_FUNCTION (*cfun)->all_noreorder_p = false;
 
   /* Code compiled with -mfix-vr4120 can't be all noreorder because
      we rely on the assembler to work around some errata.  */
   if (TARGET_FIX_VR4120)
-    cfun->machine->all_noreorder_p = false;
+    MACHINE_FUNCTION (*cfun)->all_noreorder_p = false;
 
   /* The same is true for -mfix-vr4130 if we might generate MFLO or
      MFHI instructions.  Note that we avoid using MFLO and MFHI if
      the VR4130 MACC and DMACC instructions are available instead;
      see the *mfhilo_{si,di}_macc patterns.  */
   if (TARGET_FIX_VR4130 && !ISA_HAS_MACCHI)
-    cfun->machine->all_noreorder_p = false;
+    MACHINE_FUNCTION (*cfun)->all_noreorder_p = false;
 
   htab = htab_create (37, mips_lo_sum_offset_hash,
 		      mips_lo_sum_offset_eq, free);
@@ -14896,7 +14907,7 @@  mips_expand_ghost_gp_insns (void)
   /* Quick exit if we already know that we will or won't need a
      global pointer.  */
   if (!TARGET_USE_GOT
-      || cfun->machine->global_pointer == INVALID_REGNUM
+      || MACHINE_FUNCTION (*cfun)->global_pointer == INVALID_REGNUM
       || mips_must_initialize_gp_p ())
     return false;
 
@@ -14917,7 +14928,7 @@  mips_expand_ghost_gp_insns (void)
     return false;
 
   /* We've now established that we need $gp.  */
-  cfun->machine->must_initialize_gp_p = true;
+  MACHINE_FUNCTION (*cfun)->must_initialize_gp_p = true;
   split_all_insns_noflow ();
 
   return true;
@@ -15002,10 +15013,11 @@  mips_output_mi_thunk (FILE *file, tree t
     {
       /* Pick a global pointer.  Use a call-clobbered register if
 	 TARGET_CALL_SAVED_GP.  */
-      cfun->machine->global_pointer
+      MACHINE_FUNCTION (*cfun)->global_pointer
 	= TARGET_CALL_SAVED_GP ? 15 : GLOBAL_POINTER_REGNUM;
-      cfun->machine->must_initialize_gp_p = true;
-      SET_REGNO (pic_offset_table_rtx, cfun->machine->global_pointer);
+      MACHINE_FUNCTION (*cfun)->must_initialize_gp_p = true;
+      SET_REGNO (pic_offset_table_rtx,
+		 MACHINE_FUNCTION (*cfun)->global_pointer);
 
       /* Set up the global pointer for n32 or n64 abicalls.  */
       mips_emit_loadgp ();
@@ -15955,7 +15967,7 @@  mips_eh_uses (unsigned int regno)
 	}
       else
 	{
-	  if (cfun->machine->global_pointer == regno)
+	  if (MACHINE_FUNCTION (*cfun)->global_pointer == regno)
 	    return true;
 	}
     }
@@ -15981,7 +15993,7 @@  mips_epilogue_uses (unsigned int regno)
 
   /* An interrupt handler must preserve some registers that are
      ordinarily call-clobbered.  */
-  if (cfun->machine->interrupt_handler_p
+  if (MACHINE_FUNCTION (*cfun)->interrupt_handler_p
       && mips_interrupt_extra_call_saved_reg_p (regno))
     return true;
 
@@ -16250,13 +16262,13 @@  void mips_function_profiler (FILE *file)
     {
       /* If TARGET_MCOUNT_RA_ADDRESS load $12 with the address of the
 	 ra save location.  */
-      if (cfun->machine->frame.ra_fp_offset == 0)
+      if (MACHINE_FUNCTION (*cfun)->frame.ra_fp_offset == 0)
 	/* ra not saved, pass zero.  */
 	fprintf (file, "\tmove\t%s,%s\n", reg_names[12], reg_names[0]);
       else
 	fprintf (file, "\t%s\t%s," HOST_WIDE_INT_PRINT_DEC "(%s)\n",
 		 Pmode == DImode ? "dla" : "la", reg_names[12],
-		 cfun->machine->frame.ra_fp_offset,
+		 MACHINE_FUNCTION (*cfun)->frame.ra_fp_offset,
 		 reg_names[STACK_POINTER_REGNUM]);
     }
   if (!TARGET_NEWABI)
Index: gcc/config/mips/mips.h
===================================================================
--- gcc/config/mips/mips.h	(revision 161310)
+++ gcc/config/mips/mips.h	(working copy)
@@ -1782,9 +1782,10 @@  enum mips_code_readable_setting {
 
 #define MIPS16_PIC_TEMP_REGNUM (GP_REG_FIRST + 2)
 #define MIPS_PROLOGUE_TEMP_REGNUM \
-  (cfun->machine->interrupt_handler_p ? K0_REG_NUM : GP_REG_FIRST + 3)
+  (MACHINE_FUNCTION (*cfun)->interrupt_handler_p\
+   ? K0_REG_NUM : GP_REG_FIRST + 3)
 #define MIPS_EPILOGUE_TEMP_REGNUM		\
-  (cfun->machine->interrupt_handler_p		\
+  (MACHINE_FUNCTION (*cfun)->interrupt_handler_p\
    ? K0_REG_NUM					\
    : GP_REG_FIRST + (TARGET_MIPS16 ? 6 : 8))
 
Index: gcc/config/mmix/mmix.md
===================================================================
--- gcc/config/mmix/mmix.md	(revision 161310)
+++ gcc/config/mmix/mmix.md	(working copy)
@@ -1130,7 +1130,7 @@  (define_expand "nonlocal_goto_receiver"
 				     MMIX_INCOMING_RETURN_ADDRESS_REGNUM);
 
   /* Mark this function as containing a landing-pad.  */
-  cfun->machine->has_landing_pad = 1;
+  MACHINE_FUNCTION (*cfun)->has_landing_pad = 1;
 }")
 
 ;; GCC can insist on using saved registers to keep the slot address in
Index: gcc/config/mmix/mmix.c
===================================================================
--- gcc/config/mmix/mmix.c	(revision 161310)
+++ gcc/config/mmix/mmix.c	(working copy)
@@ -50,7 +50,8 @@  along with GCC; see the file COPYING3.  
 /* We'd need a current_function_has_landing_pad.  It's marked as such when
    a nonlocal_goto_receiver is expanded.  Not just a C++ thing, but
    mostly.  */
-#define MMIX_CFUN_HAS_LANDING_PAD (cfun->machine->has_landing_pad != 0)
+#define MMIX_CFUN_HAS_LANDING_PAD \
+  (MACHINE_FUNCTION (*cfun)->has_landing_pad != 0)
 
 /* We have no means to tell DWARF 2 about the register stack, so we need
    to store the return address on the stack if an exception can get into
@@ -87,10 +88,10 @@  along with GCC; see the file COPYING3.  
   || (int) (N) < MMIX_RETURN_VALUE_REGNUM			\
   || (int) (N) > MMIX_LAST_STACK_REGISTER_REGNUM		\
   || cfun == NULL 						\
-  || cfun->machine == NULL 					\
-  || cfun->machine->in_prologue					\
+  || MACHINE_FUNCTION (*cfun) == NULL 				\
+  || MACHINE_FUNCTION (*cfun)->in_prologue			\
   ? (N) : ((N) - MMIX_RETURN_VALUE_REGNUM			\
-	   + cfun->machine->highest_saved_stack_register + 1))
+	   + MACHINE_FUNCTION (*cfun)->highest_saved_stack_register + 1))
 
 /* The %d in "POP %d,0".  */
 #define MMIX_POP_ARGUMENT()						\
@@ -793,7 +794,7 @@  static void
 mmix_target_asm_function_prologue (FILE *stream ATTRIBUTE_UNUSED,
 				   HOST_WIDE_INT framesize ATTRIBUTE_UNUSED)
 {
-  cfun->machine->in_prologue = 1;
+  MACHINE_FUNCTION (*cfun)->in_prologue = 1;
 }
 
 /* Make a note that we've seen the end of the prologue.  */
@@ -801,7 +802,7 @@  mmix_target_asm_function_prologue (FILE 
 static void
 mmix_target_asm_function_end_prologue (FILE *stream ATTRIBUTE_UNUSED)
 {
-  cfun->machine->in_prologue = 0;
+  MACHINE_FUNCTION (*cfun)->in_prologue = 0;
 }
 
 /* Implement TARGET_MACHINE_DEPENDENT_REORG.  No actual rearrangements
@@ -843,7 +844,7 @@  mmix_reorg (void)
 	regno = MMIX_RETURN_VALUE_REGNUM - 1;
     }
 
-  cfun->machine->highest_saved_stack_register = regno;
+  MACHINE_FUNCTION (*cfun)->highest_saved_stack_register = regno;
 }
 
 /* TARGET_ASM_FUNCTION_EPILOGUE.  */
@@ -1606,7 +1607,7 @@  mmix_print_operand (FILE *stream, rtx x,
 	 registers to pass, but we don't use it currently.  Anyway, we
 	 need to output the number of saved registers here.  */
       fprintf (stream, "%d",
-	       cfun->machine->highest_saved_stack_register + 1);
+	       MACHINE_FUNCTION (*cfun)->highest_saved_stack_register + 1);
       return;
 
     case 'r':
Index: gcc/config/bfin/bfin.c
===================================================================
--- gcc/config/bfin/bfin.c	(revision 161310)
+++ gcc/config/bfin/bfin.c	(working copy)
@@ -618,8 +618,8 @@  expand_prologue_reg_save (rtx spreg, int
       RTX_FRAME_RELATED_P (insn) = 1;
       for (dregno = REG_LT0; dregno <= REG_LB1; dregno++)
 	if (! current_function_is_leaf
-	    || cfun->machine->has_hardware_loops
-	    || cfun->machine->has_loopreg_clobber
+	    || MACHINE_FUNCTION (*cfun)->has_hardware_loops
+	    || MACHINE_FUNCTION (*cfun)->has_loopreg_clobber
 	    || (ENABLE_WA_05000257
 		&& (dregno == REG_LC0 || dregno == REG_LC1)))
 	  {
@@ -798,8 +798,8 @@  expand_epilogue_reg_restore (rtx spreg, 
     {
       for (regno = REG_LB1; regno >= REG_LT0; regno--)
 	if (! current_function_is_leaf
-	    || cfun->machine->has_hardware_loops
-	    || cfun->machine->has_loopreg_clobber
+	    || MACHINE_FUNCTION (*cfun)->has_hardware_loops
+	    || MACHINE_FUNCTION (*cfun)->has_loopreg_clobber
 	    || (ENABLE_WA_05000257 && (regno == REG_LC0 || regno == REG_LC1)))
 	  emit_move_insn (gen_rtx_REG (SImode, regno), postinc);
 
@@ -906,8 +906,8 @@  n_regs_saved_by_prologue (void)
       /* Increment once for ASTAT.  */
       n++;
       if (! current_function_is_leaf
-	  || cfun->machine->has_hardware_loops
-	  || cfun->machine->has_loopreg_clobber)
+	  || MACHINE_FUNCTION (*cfun)->has_hardware_loops
+	  || MACHINE_FUNCTION (*cfun)->has_loopreg_clobber)
 	{
 	  n += 6;
 	}
@@ -3550,7 +3550,7 @@  bfin_expand_movmem (rtx dst, rtx src, rt
 	      countreg = copy_to_mode_reg (Pmode, GEN_INT (new_count));
 
 	      emit_insn (gen_rep_movsi (destreg, srcreg, countreg, destreg, srcreg));
-	      cfun->machine->has_loopreg_clobber = true;
+	      MACHINE_FUNCTION (*cfun)->has_loopreg_clobber = true;
 	    }
 	  if (count & 2)
 	    {
@@ -3571,7 +3571,7 @@  bfin_expand_movmem (rtx dst, rtx src, rt
 	      countreg = copy_to_mode_reg (Pmode, GEN_INT (new_count));
 
 	      emit_insn (gen_rep_movhi (destreg, srcreg, countreg, destreg, srcreg));
-	      cfun->machine->has_loopreg_clobber = true;
+	      MACHINE_FUNCTION (*cfun)->has_loopreg_clobber = true;
 	    }
 	}
       if (count & 1)
@@ -3680,7 +3680,7 @@  find_prev_insn_start (rtx insn)
 void
 bfin_hardware_loop (void)
 {
-  cfun->machine->has_hardware_loops++;
+  MACHINE_FUNCTION (*cfun)->has_hardware_loops++;
 }
 
 /* Maximum loop nesting depth.  */
@@ -5510,7 +5510,7 @@  bfin_reorg (void)
   df_analyze ();
 
   /* Doloop optimization */
-  if (cfun->machine->has_hardware_loops)
+  if (MACHINE_FUNCTION (*cfun)->has_hardware_loops)
     bfin_reorg_loops (dump_file);
 
   workaround_speculation ();