diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 5ac9160a853e8167e396db695883858cde1f04f1..14e529943d4a5b96de649d2c4198fe0c2b679be8 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-21  Nick Clifton  <nickc@redhat.com>
+
+	* frv.cpu (mbtoh): Replace input parameter to u-media-dual-expand
+	and u-media-dual-btoh with output parameter.
+	(cmbtoh): Add profiling hack.
+
 2003-08-19  Michael Snyder  <msnyder@redhat.com>
 
 	* frv.cpu: Fix typo, Frintkeven -> FRintkeven
diff --git a/cpu/frv.cpu b/cpu/frv.cpu
index 312badda21ac8fc9ba97d992406a0d6864f37616..86eb06716fcdceb82bca6b4262117aa9c162331b 100644
--- a/cpu/frv.cpu
+++ b/cpu/frv.cpu
@@ -7962,9 +7962,9 @@
 	       (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
 	       (mbtoh-semantics 1))
      ((fr400 (unit u-media-dual-expand
-		   (in FRinti FRintieven)))
+		   (out FRintk FRintkeven)))
       (fr500 (unit u-media-dual-btoh
-		   (in FRinti FRintieven))))
+		   (out FRintk FRintkeven))))
 )
 
 (dni cmbtoh
@@ -7972,7 +7972,11 @@
      ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2) CONDITIONAL)
      "cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond"
      (+ pack FRintkeven OP_77 (FRi-null) CCi cond OPE4_0 FRintj)
-     (mbtoh-semantics (eq CCi (or cond 2)))
+     (sequence ()
+	       ; hack to get these referenced for profiling
+	       (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
+	       (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+	       (mbtoh-semantics (eq CCi (or cond 2))))
      ((fr400 (unit u-media-dual-expand
 		   (out FRintk FRintkeven)))
       (fr500 (unit u-media-dual-btoh