From patchwork Sat Mar 21 10:25:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 452923 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AA92114010F for ; Sat, 21 Mar 2015 21:25:40 +1100 (AEDT) Received: from localhost ([::1]:47308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZGb4-0004hS-M5 for incoming@patchwork.ozlabs.org; Sat, 21 Mar 2015 06:25:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZGao-0004Of-8j for qemu-devel@nongnu.org; Sat, 21 Mar 2015 06:25:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZGaj-0002M7-6u for qemu-devel@nongnu.org; Sat, 21 Mar 2015 06:25:22 -0400 Received: from blu004-omc1s22.hotmail.com ([65.55.116.33]:63734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZGaj-0002M2-1x for qemu-devel@nongnu.org; Sat, 21 Mar 2015 06:25:17 -0400 Received: from BLU437-SMTP99 ([65.55.116.9]) by BLU004-OMC1S22.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Sat, 21 Mar 2015 03:25:16 -0700 X-TMN: [qrmfZwFV4sXOowtNwl1VtcUn1mSOFJHw] X-Originating-Email: [xili_gchen_5257@hotmail.com] Message-ID: Date: Sat, 21 Mar 2015 18:25:08 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "rth@twiddle.net" , Peter Maydell , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Chris Metcalf , Riku Voipio , "walt@tilera.com" References: <550D455B.8000004@hotmail.com> In-Reply-To: <550D455B.8000004@hotmail.com> X-OriginalArrivalTime: 21 Mar 2015 10:25:14.0827 (UTC) FILETIME=[51F011B0:01D063C1] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 65.55.116.33 Cc: qemu-devel Subject: [Qemu-devel] [PATCH 08/12 v8] target-tilegx: Add helper features for linux-user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org For supporting linux-user system call, tilegx need support exception helper features for it. Signed-off-by: Chen Gang --- target-tilegx/helper.c | 31 +++++++++++++++++++++++++++++++ target-tilegx/helper.h | 1 + 2 files changed, 32 insertions(+) create mode 100644 target-tilegx/helper.c create mode 100644 target-tilegx/helper.h diff --git a/target-tilegx/helper.c b/target-tilegx/helper.c new file mode 100644 index 0000000..ffac2b9 --- /dev/null +++ b/target-tilegx/helper.c @@ -0,0 +1,31 @@ +/* + * QEMU TILE-Gx helpers + * + * Copyright (c) 2015 Chen Gang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see + * + */ + +#include "cpu.h" +#include "qemu-common.h" +#include "exec/helper-proto.h" + +void helper_exception(CPUTLGState *env, uint32_t excp) +{ + CPUState *cs = CPU(tilegx_env_get_cpu(env)); + + cs->exception_index = excp; + cpu_loop_exit(cs); +} diff --git a/target-tilegx/helper.h b/target-tilegx/helper.h new file mode 100644 index 0000000..36d1cd9 --- /dev/null +++ b/target-tilegx/helper.h @@ -0,0 +1 @@ +DEF_HELPER_2(exception, noreturn, env, i32)