1. 17 8月, 2020 1 次提交
  2. 18 4月, 2019 1 次提交
    • S
      math: add fp_arch.h with fp_barrier and fp_force_eval · b50d315f
      Szabolcs Nagy 提交于
      C99 has ways to support fenv access, but compilers don't implement it
      and assume nearest rounding mode and no fp status flag access. (gcc has
      -frounding-math and then it does not assume nearest rounding mode, but
      it still assumes the compiled code itself does not change the mode.
      Even if the C99 mechanism was implemented it is not ideal: it requires
      all code in the library to be compiled with FENV_ACCESS "on" to make it
      usable in non-nearest rounding mode, but that limits optimizations more
      than necessary.)
      
      The math functions should give reasonable results in all rounding modes
      (but the quality may be degraded in non-nearest rounding modes) and the
      fp status flag settings should follow the spec, so fenv side-effects are
      important and code transformations that break them should be prevented.
      
      Unfortunately compilers don't give any help with this, the best we can
      do is to add fp barriers to the code using volatile local variables
      (they create a stack frame and undesirable memory accesses to it) or
      inline asm (gcc specific, requires target specific fp reg constraints,
      often creates unnecessary reg moves and multiple barriers are needed to
      express that an operation has side-effects) or extern call (only useful
      in tail-call position to avoid stack-frame creation and does not work
      with lto).
      
      We assume that in a math function if an operation depends on the input
      and the output depends on it, then the operation will be evaluated at
      runtime when the function is called, producing all the expected fenv
      side-effects (this is not true in case of lto and in case the operation
      is evaluated with excess precision that is not rounded away). So fp
      barriers are needed (1) to prevent the move of an operation within a
      function (in case it may be moved from an unevaluated code path into an
      evaluated one or if it may be moved across a fenv access), (2) force the
      evaluation of an operation for its side-effect when it has no input
      dependency (may be constant folded) or (3) when its output is unused. I
      belive that fp_barrier and fp_force_eval can take care of these and they
      should not be needed in hot code paths.
      b50d315f
  3. 20 10月, 2016 1 次提交
    • S
      add bits/hwcap.h and include it in sys/auxv.h · fe39aaae
      Szabolcs Nagy 提交于
      aarch64, arm, mips, mips64, mipsn32, powerpc, powerpc64 and sh have
      cpu feature bits defined in linux for AT_HWCAP auxv entry, so expose
      those in sys/auxv.h
      
      it seems the mips hwcaps were never exposed to userspace neither
      by linux nor by glibc, but that's most likely an oversight.
      fe39aaae
  4. 28 1月, 2016 1 次提交
    • R
      deduplicate the bulk of the arch bits headers · 4dfac115
      Rich Felker 提交于
      all bits headers that were identical for a number of 'clean' archs are
      moved to the new arch/generic tree. in addition, a few headers that
      differed only cosmetically from the new generic version are removed.
      
      additional deduplication may be possible in mman.h and in several
      headers (limits.h, posix.h, stdint.h) that mostly depend on whether
      the arch is 32- or 64-bit, but they are left alone for now because
      greater gains are likely possible with more invasive changes to header
      logic, which is beyond the scope of this commit.
      4dfac115
  5. 12 3月, 2015 1 次提交
    • S
      add aarch64 port · 01ef3dd9
      Szabolcs Nagy 提交于
      This adds complete aarch64 target support including bigendian subarch.
      
      Some of the long double math functions are known to be broken otherwise
      interfaces should be fully functional, but at this point consider this
      port experimental.
      
      Initial work on this port was done by Sireesh Tripurari and Kevin Bortis.
      01ef3dd9
  6. 19 11月, 2012 1 次提交
  7. 03 5月, 2012 1 次提交
  8. 12 2月, 2011 1 次提交