diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e622c34817b3eaae63af4bf6c6cb0e06f198e7ab..87ce2f1fcac2176b7139163416f01be768f190a5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-01  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+	* config/sh/sh.c (fpscr_set_from_mem): Call get_free_reg
+	only after no_new_pseudos.
+
 2007-05-31  Eric Christopher  <echristo@apple.com>
 
 	* expr.c (convert_move): Assert that we don't have a BLKmode
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index b3c46ab4688213559bcfb4dc8ed9a03e43f210f6..10d7a86fdd0c5d0ede9907376c14163cc88ff18f 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -8542,8 +8542,9 @@ fpscr_set_from_mem (int mode, HARD_REG_SET regs_live)
 {
   enum attr_fp_mode fp_mode = mode;
   enum attr_fp_mode norm_mode = ACTUAL_NORMAL_MODE (FP_MODE);
-  rtx addr_reg = get_free_reg (regs_live);
+  rtx addr_reg;
 
+  addr_reg = no_new_pseudos ? get_free_reg (regs_live) : NULL_RTX;
   emit_fpu_switch (addr_reg, fp_mode == norm_mode);
 }