From patchwork Fri Sep 10 21:00:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 64470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BAAF3B6F07 for ; Sat, 11 Sep 2010 07:23:04 +1000 (EST) Received: from localhost ([127.0.0.1]:51480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuB3l-00034h-Te for incoming@patchwork.ozlabs.org; Fri, 10 Sep 2010 17:23:01 -0400 Received: from [140.186.70.92] (port=52127 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuAht-0001wQ-VV for qemu-devel@nongnu.org; Fri, 10 Sep 2010 17:00:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OuAhs-0001jK-Lf for qemu-devel@nongnu.org; Fri, 10 Sep 2010 17:00:25 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:36853) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuAhs-0001ej-IB for qemu-devel@nongnu.org; Fri, 10 Sep 2010 17:00:24 -0400 Received: by mail-qw0-f45.google.com with SMTP id 4so10818qwi.4 for ; Fri, 10 Sep 2010 14:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=cxX+VQha4swEEmJ+0VoOwkoJfVHxd33ujqpUegL27gY=; b=rwPZ9yrPjdxdUXLzbVwBKsftcpSSYimUZ152kfTY1S4sxN6REKChazzmQ2a2JvavuB xD3mg5uFVvpP5WCxItw/nbCiwMSb6r2OU31icavTwFWYptPep/X6WujEj5TQmofOy4G4 6VsgZmcCw3Y2ps6UgIJjkW+h5B68lTbuBp3b4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=jq/Nv9WOhAzBTJDvn3xv3JkY3dRTN5GkRjxkAyHGEVpQVmSWln3yneRsMpWsz35QmE 3xCmcjwcb0w+eEIn4YwCvpjPvtLJdDmdwerf2WeSiSr12TIz/41gkamp7JIaEjUA35z8 o/QYvtq22R/9AkNHTMfm1ErQuLR2x49bSce1E= Received: by 10.224.89.81 with SMTP id d17mr779320qam.156.1284152423312; Fri, 10 Sep 2010 14:00:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.240.135 with HTTP; Fri, 10 Sep 2010 14:00:03 -0700 (PDT) From: Blue Swirl Date: Fri, 10 Sep 2010 21:00:03 +0000 Message-ID: To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 10/15] MIPS: fix yield handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 files changed, 3 insertions(+), 1 deletions(-) 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) {