From 1c7242da851cc65a2cc93fbc6defa964084a2826 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sat, 18 Sep 2010 05:53:15 +0000 Subject: [PATCH] MIPS: fix yield handling The parameter for yield should be handled as a signed integer for the comparisons to have any effect. This also avoids a gcc warning with -Wtype-limits. Signed-off-by: Blue Swirl --- target-mips/op_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 50c65bdc3b..41abd575f9 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -1598,8 +1598,10 @@ void helper_fork(target_ulong arg1, target_ulong arg2) // TODO: store to TC register } -target_ulong helper_yield(target_ulong arg1) +target_ulong helper_yield(target_ulong arg) { + target_long arg1 = arg; + if (arg1 < 0) { /* No scheduling policy implemented. */ if (arg1 != -2) {