From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBrIO-00035j-NR for qemu-devel@nongnu.org; Wed, 23 Dec 2015 16:50:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBrIL-0004fm-HE for qemu-devel@nongnu.org; Wed, 23 Dec 2015 16:50:08 -0500 Received: from mail113-249.mail.alibaba.com ([205.204.113.249]:34637 helo=us-alimail-mta2.hst.scl.en.alidc.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBrIK-0004ch-QW for qemu-devel@nongnu.org; Wed, 23 Dec 2015 16:50:05 -0500 From: chengang@emindsoft.com.cn Date: Thu, 24 Dec 2015 05:48:32 +0800 Message-Id: <1450907315-10135-2-git-send-email-chengang@emindsoft.com.cn> In-Reply-To: <1450907315-10135-1-git-send-email-chengang@emindsoft.com.cn> References: <1450907315-10135-1-git-send-email-chengang@emindsoft.com.cn> Subject: [Qemu-devel] [PATCH v4 1/4] target-tilegx: Add floating point shared functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: rth@twiddle.net, peter.maydell@linaro.org, cmetcalf@ezchip.com Cc: Chen Gang , qemu-devel@nongnu.org, Chen Gang From: Chen Gang They are used by fsingle and fdouble helpers. Signed-off-by: Chen Gang --- target-tilegx/helper-fshared.c | 22 +++++++++++++++++ target-tilegx/helper-fshared.h | 55 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 target-tilegx/helper-fshared.c create mode 100644 target-tilegx/helper-fshared.h diff --git a/target-tilegx/helper-fshared.c b/target-tilegx/helper-fshared.c new file mode 100644 index 0000000..bad1c9a --- /dev/null +++ b/target-tilegx/helper-fshared.c @@ -0,0 +1,22 @@ +/* + * 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 . + */ + +#include "fpu/softfloat.h" + +float_status fp_status; diff --git a/target-tilegx/helper-fshared.h b/target-tilegx/helper-fshared.h new file mode 100644 index 0000000..5f4926e --- /dev/null +++ b/target-tilegx/helper-fshared.h @@ -0,0 +1,55 @@ +/* + * 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 . + */ + +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; +} + +extern float_status fp_status; -- 1.9.3