Patchwork [10/15] MIPS: fix yield handling

login
register
mail settings
Submitter Blue Swirl
Date Sept. 10, 2010, 9 p.m.
Message ID <AANLkTi=UAHEiRTmhk0-QLy3Mkz=SiDzVRnv-OzhM1fxc@mail.gmail.com>
Download mbox | patch
Permalink /patch/64470/
State New
Headers show

Comments

Blue Swirl - Sept. 10, 2010, 9 p.m.
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 <blauwirbel@gmail.com>
---
 target-mips/op_helper.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 50c65bd..41abd57 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) {