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: 622303 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 3r6jvf3dxJz9t4k for ; Sun, 15 May 2016 09:42:54 +1000 (AEST) Received: from localhost ([::1]:39183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1jCu-00082z-AO for incoming@patchwork.ozlabs.org; Sat, 14 May 2016 19:42:52 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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; +}