From patchwork Sat Sep 4 14:17:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 63784 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 C04C4B7148 for ; Sun, 5 Sep 2010 00:25:52 +1000 (EST) Received: from localhost ([127.0.0.1]:57933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ortgj-00052P-Sn for incoming@patchwork.ozlabs.org; Sat, 04 Sep 2010 10:25:49 -0400 Received: from [140.186.70.92] (port=60376 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrtZB-00014M-L6 for qemu-devel@nongnu.org; Sat, 04 Sep 2010 10:18:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrtZA-00082a-JP for qemu-devel@nongnu.org; Sat, 04 Sep 2010 10:18:01 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:37512) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrtZA-0007xn-Go for qemu-devel@nongnu.org; Sat, 04 Sep 2010 10:18:00 -0400 Received: by mail-qw0-f45.google.com with SMTP id 5so2800166qwh.4 for ; Sat, 04 Sep 2010 07:18:00 -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=CtvRIojUnV9cWZDFe4Meuyq40geoOho2ewn+SfD3rxc=; b=I8LpTO99Pj4ffJJ8WpiB6jtoHwv3eA637la4cnRNiuh09n9w0iZcojStWrxaYrXKSz vDBNtcMIpknxle7e/w1naPYVIUY78ABORfIuS1YagsJ9RwIpQSoyn4ogHrftWjDv9l0Q w8g1ot965ElW03Vd0as7zKwy4gmBgTRhu+wb8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=fvDaWMTB+DwUdO2T2PtYzqeyq/cTEex2hoG12ITQJz9/Wo0PvVKkjOiM5Z/2MokGj/ z+gdCpLbnmNtBZAeN2EYlAgHyigo2y59lJB232vWZdrIBRDjQkfECc4eSWJl0gToC5TD rj371M9pFonHb4EfE6yrCA9a2UmA6GUsep6C0= Received: by 10.229.2.23 with SMTP id 23mr1345896qch.278.1283609880222; Sat, 04 Sep 2010 07:18:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.240.135 with HTTP; Sat, 4 Sep 2010 07:17:40 -0700 (PDT) From: Blue Swirl Date: Sat, 4 Sep 2010 14:17:40 +0000 Message-ID: To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 3/5] 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 signed integer for the comparisons to have any effect. This also fixes 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) {