From patchwork Sat Jan 2 22:25:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 562109 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 1F0EC14090A for ; Sun, 3 Jan 2016 09:26:05 +1100 (AEDT) Received: from localhost ([::1]:39928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFUcd-0005CP-1W for incoming@patchwork.ozlabs.org; Sat, 02 Jan 2016 17:26:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFUcI-0004dM-RF for qemu-devel@nongnu.org; Sat, 02 Jan 2016 17:25:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFUcF-0006u0-Gr for qemu-devel@nongnu.org; Sat, 02 Jan 2016 17:25:42 -0500 Received: from out1134-202.mail.aliyun.com ([42.120.134.202]:38410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFUcF-0006tV-5M for qemu-devel@nongnu.org; Sat, 02 Jan 2016 17:25:39 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07445369|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e01l07405; MF=chengang@emindsoft.com.cn; NM=1; PH=DS; RN=6; RT=5; SR=0; TI=SMTPD_----4PYISBV_1451773530; Received: from localhost.localdomain.localdomain(mailfrom:chengang@emindsoft.com.cn ip:223.72.67.13) by smtp.aliyun-inc.com(10.147.39.32); Sun, 03 Jan 2016 06:25:30 +0800 From: chengang@emindsoft.com.cn To: peter.maydell@linaro.org, rth@twiddle.net, cmetcalf@ezchip.com Date: Sun, 3 Jan 2016 06:25:16 +0800 Message-Id: <1451773519-10134-3-git-send-email-chengang@emindsoft.com.cn> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1451773519-10134-1-git-send-email-chengang@emindsoft.com.cn> References: <1451773519-10134-1-git-send-email-chengang@emindsoft.com.cn> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 42.120.134.202 Cc: qemu-devel@nongnu.org, Chen Gang Subject: [Qemu-devel] [PATCH v5 2/5] target-tilegx/helper-fshared.h: Add floating point shared function 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 From: Chen Gang It is used by fsingle and fdouble helpers. Signed-off-by: Chen Gang --- target-tilegx/helper-fshared.h | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 target-tilegx/helper-fshared.h diff --git a/target-tilegx/helper-fshared.h b/target-tilegx/helper-fshared.h new file mode 100644 index 0000000..bcd673e --- /dev/null +++ b/target-tilegx/helper-fshared.h @@ -0,0 +1,56 @@ +/* + * TILE-Gx virtual Floating point shared functions + * + * 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 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 + * 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 . + */ + +#define DEC_INIT_FPSTATUS \ + float_status fp_status = {.float_rounding_mode = float_round_nearest_even}; + +static inline uint64_t create_fsfd_flag_un(void) +{ + return 1 << 25; +} + +static inline uint64_t create_fsfd_flag_lt(void) +{ + return 1 << 26; +} + +static inline uint64_t create_fsfd_flag_le(void) +{ + return 1 << 27; +} + +static inline uint64_t create_fsfd_flag_gt(void) +{ + return 1 << 28; +} + +static inline uint64_t create_fsfd_flag_ge(void) +{ + return 1 << 29; +} + +static inline uint64_t create_fsfd_flag_eq(void) +{ + return 1 << 30; +} + +static inline uint64_t create_fsfd_flag_ne(void) +{ + return 1ULL << 31; +}