aboutsummaryrefslogtreecommitdiff
path: root/target-cris/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-cris/translate.c')
-rw-r--r--target-cris/translate.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/target-cris/translate.c b/target-cris/translate.c
index 898aba6490..45c7682706 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -227,6 +227,19 @@ static inline void t_gen_mov_preg_TN(DisasContext *dc, int r, TCGv tn)
}
}
+/* Sign extend at translation time. */
+static int sign_extend(unsigned int val, unsigned int width)
+{
+ int sval;
+
+ /* LSL. */
+ val <<= 31 - width;
+ sval = val;
+ /* ASR. */
+ sval >>= 31 - width;
+ return sval;
+}
+
static int cris_fetch(DisasContext *dc, uint32_t addr,
unsigned int size, unsigned int sign)
{
@@ -594,19 +607,6 @@ static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
}
}
-/* Sign extend at translation time. */
-static int sign_extend(unsigned int val, unsigned int width)
-{
- int sval;
-
- /* LSL. */
- val <<= 31 - width;
- sval = val;
- /* ASR. */
- sval >>= 31 - width;
- return sval;
-}
-
static inline void cris_clear_x_flag(DisasContext *dc)
{
if (dc->flagx_known && dc->flags_x)