From patchwork Sat May 14 23:40:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 9095681 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6F444BF29F for ; Sat, 14 May 2016 23:42:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F59E20279 for ; Sat, 14 May 2016 23:42:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7D5A20272 for ; Sat, 14 May 2016 23:42:41 +0000 (UTC) Received: from localhost ([::1]:39180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1jCj-0007QL-08 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 14 May 2016 19:42:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1jBo-0005Zb-2u for qemu-devel@nongnu.org; Sat, 14 May 2016 19:41:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1jBg-0008PO-Ua for qemu-devel@nongnu.org; Sat, 14 May 2016 19:41:42 -0400 Received: from out4433.biz.mail.alibaba.com ([47.88.44.33]:48547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1jBg-0008OW-Ir for qemu-devel@nongnu.org; Sat, 14 May 2016 19:41:36 -0400 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.0744694|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03307; MF=chengang@emindsoft.com.cn; NM=1; PH=DU; RN=9; RT=9; SR=0; TI=SMTPD_----4ooABWA_1463269267; Received: from localhost.localdomain(mailfrom:chengang@emindsoft.com.cn ip:223.72.89.121) by smtp.aliyun-inc.com(10.147.40.2); Sun, 15 May 2016 07:41:16 +0800 From: chengang@emindsoft.com.cn To: rth@twiddle.net, peter.maydell@linaro.org, cmetcalf@ezchip.com, laurent@vivier.eu Date: Sun, 15 May 2016 07:40:41 +0800 Message-Id: <1463269244-3391-3-git-send-email-chengang@emindsoft.com.cn> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1463269244-3391-1-git-send-email-chengang@emindsoft.com.cn> References: <1463269244-3391-1-git-send-email-chengang@emindsoft.com.cn> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 47.88.44.33 Subject: [Qemu-devel] [PATCH v6 2/5] target-tilegx/helper-fshared.h: Add floating point shared function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chenwei@emindsoft.com.cn, riku.voipio@iki.fi, Chen Gang , qemu-devel@nongnu.org, Chen Gang Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; +}