[RISCV] Add shrinkwrap test cases showing gaps in current impl
[llvm-project.git] / compiler-rt / lib / builtins / subtf3.c
blobe1b1022034bf79e9bae1e4e29c3503a2f1941811
1 //===-- lib/subtf3.c - Quad-precision subtraction -----------------*- C -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements quad-precision soft-float subtraction.
11 //===----------------------------------------------------------------------===//
13 #define QUAD_PRECISION
14 #include "fp_lib.h"
16 #if defined(CRT_HAS_TF_MODE)
17 COMPILER_RT_ABI fp_t __addtf3(fp_t a, fp_t b);
19 // Subtraction; flip the sign bit of b and add.
20 COMPILER_RT_ABI fp_t __subtf3(fp_t a, fp_t b) {
21 return __addtf3(a, fromRep(toRep(b) ^ signBit));
24 #endif