Browse Source

first commit

linux
penguin 1 year ago
commit
e929626cbb
100 changed files with 48595 additions and 0 deletions
  1. +0
    -0
      README.md
  2. BIN
      bin/riscv64-unknown-elf-addr2line
  3. BIN
      bin/riscv64-unknown-elf-ar
  4. BIN
      bin/riscv64-unknown-elf-as
  5. BIN
      bin/riscv64-unknown-elf-c++
  6. BIN
      bin/riscv64-unknown-elf-c++filt
  7. BIN
      bin/riscv64-unknown-elf-cpp
  8. BIN
      bin/riscv64-unknown-elf-elfedit
  9. BIN
      bin/riscv64-unknown-elf-g++
  10. BIN
      bin/riscv64-unknown-elf-gcc
  11. BIN
      bin/riscv64-unknown-elf-gcc-8.3.0
  12. BIN
      bin/riscv64-unknown-elf-gcc-ar
  13. BIN
      bin/riscv64-unknown-elf-gcc-nm
  14. BIN
      bin/riscv64-unknown-elf-gcc-ranlib
  15. BIN
      bin/riscv64-unknown-elf-gcov
  16. BIN
      bin/riscv64-unknown-elf-gcov-dump
  17. BIN
      bin/riscv64-unknown-elf-gcov-tool
  18. BIN
      bin/riscv64-unknown-elf-gdb
  19. +116
    -0
      bin/riscv64-unknown-elf-gdb-add-index
  20. BIN
      bin/riscv64-unknown-elf-gprof
  21. BIN
      bin/riscv64-unknown-elf-ld
  22. BIN
      bin/riscv64-unknown-elf-ld.bfd
  23. BIN
      bin/riscv64-unknown-elf-nm
  24. BIN
      bin/riscv64-unknown-elf-objcopy
  25. BIN
      bin/riscv64-unknown-elf-objdump
  26. BIN
      bin/riscv64-unknown-elf-ranlib
  27. BIN
      bin/riscv64-unknown-elf-readelf
  28. BIN
      bin/riscv64-unknown-elf-size
  29. BIN
      bin/riscv64-unknown-elf-strings
  30. BIN
      bin/riscv64-unknown-elf-strip
  31. +1048
    -0
      include/expat.h
  32. +102
    -0
      include/expat_config.h
  33. +129
    -0
      include/expat_external.h
  34. +346
    -0
      include/gdb/jit-reader.h
  35. BIN
      lib/gcc/riscv64-unknown-elf/8.3.0/crtbegin.o
  36. BIN
      lib/gcc/riscv64-unknown-elf/8.3.0/crtend.o
  37. BIN
      lib/gcc/riscv64-unknown-elf/8.3.0/crti.o
  38. BIN
      lib/gcc/riscv64-unknown-elf/8.3.0/crtn.o
  39. +14
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include-fixed/README
  40. +197
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include-fixed/limits.h
  41. +8
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include-fixed/syslimits.h
  42. +506
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/float.h
  43. +41
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/gcov.h
  44. +45
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/iso646.h
  45. +39
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stdalign.h
  46. +127
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stdarg.h
  47. +243
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stdatomic.h
  48. +54
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stdbool.h
  49. +451
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stddef.h
  50. +204
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stdfix.h
  51. +364
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stdint-gcc.h
  52. +14
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stdint.h
  53. +35
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/stdnoreturn.h
  54. +127
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/tgmath.h
  55. +297
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/unwind.h
  56. +7
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/include/varargs.h
  57. +1
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/install-tools/fixinc_list
  58. +8
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/install-tools/gsyslimits.h
  59. +14
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/install-tools/include/README
  60. +197
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/install-tools/include/limits.h
  61. +0
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/install-tools/macro_list
  62. +3
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/install-tools/mkheaders.conf
  63. BIN
      lib/gcc/riscv64-unknown-elf/8.3.0/libgcc.a
  64. BIN
      lib/gcc/riscv64-unknown-elf/8.3.0/libgcov.a
  65. +31791
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/gtype.state
  66. +79
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/ada/gcc-interface/ada-tree.def
  67. +90
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/addresses.h
  68. +47
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/alias.h
  69. +6
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/all-tree.def
  70. +567
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/alloc-pool.h
  71. +393
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/ansidecl.h
  72. +182
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/asan.h
  73. +214
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/attribs.h
  74. +2458
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/auto-host.h
  75. +31
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/auto-profile.h
  76. +90
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/b-header-vars
  77. +35
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/backend.h
  78. +647
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/basic-block.h
  79. +40
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/bb-reorder.h
  80. +820
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/bitmap.h
  81. +674
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/brig-builtins.def
  82. +410
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/builtin-attrs.def
  83. +829
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/builtin-types.def
  84. +1094
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/builtins.def
  85. +108
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/builtins.h
  86. +4
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/bversion.h
  87. +62
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/c-family/c-common.def
  88. +1347
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/c-family/c-common.h
  89. +114
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/c-family/c-objc.h
  90. +242
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/c-family/c-pragma.h
  91. +139
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/c-family/c-pretty-print.h
  92. +785
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/c-tree.h
  93. +46
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/calls.h
  94. +25
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/ccmp.h
  95. +191
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/cfg-flags.def
  96. +124
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/cfg.h
  97. +84
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/cfganal.h
  98. +28
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/cfgbuild.h
  99. +34
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/cfgcleanup.h
  100. +28
    -0
      lib/gcc/riscv64-unknown-elf/8.3.0/plugin/include/cfgexpand.h

+ 0
- 0
README.md View File


BIN
bin/riscv64-unknown-elf-addr2line View File


BIN
bin/riscv64-unknown-elf-ar View File


BIN
bin/riscv64-unknown-elf-as View File


BIN
bin/riscv64-unknown-elf-c++ View File


BIN
bin/riscv64-unknown-elf-c++filt View File


BIN
bin/riscv64-unknown-elf-cpp View File


BIN
bin/riscv64-unknown-elf-elfedit View File


BIN
bin/riscv64-unknown-elf-g++ View File


BIN
bin/riscv64-unknown-elf-gcc View File


BIN
bin/riscv64-unknown-elf-gcc-8.3.0 View File


BIN
bin/riscv64-unknown-elf-gcc-ar View File


BIN
bin/riscv64-unknown-elf-gcc-nm View File


BIN
bin/riscv64-unknown-elf-gcc-ranlib View File


BIN
bin/riscv64-unknown-elf-gcov View File


BIN
bin/riscv64-unknown-elf-gcov-dump View File


BIN
bin/riscv64-unknown-elf-gcov-tool View File


BIN
bin/riscv64-unknown-elf-gdb View File


+ 116
- 0
bin/riscv64-unknown-elf-gdb-add-index View File

@@ -0,0 +1,116 @@
#! /bin/sh

# Add a .gdb_index section to a file.

# Copyright (C) 2010-2019 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# This program assumes gdb and objcopy are in $PATH.
# If not, or you want others, pass the following in the environment
GDB=${GDB:=gdb}
OBJCOPY=${OBJCOPY:=objcopy}

myname="${0##*/}"

dwarf5=""
if [ "$1" = "-dwarf-5" ]; then
dwarf5="$1"
shift
fi

if test $# != 1; then
echo "usage: $myname [-dwarf-5] FILE" 1>&2
exit 1
fi

file="$1"

if test ! -r "$file"; then
echo "$myname: unable to access: $file" 1>&2
exit 1
fi

dir="${file%/*}"
test "$dir" = "$file" && dir="."
index4="${file}.gdb-index"
index5="${file}.debug_names"
debugstr="${file}.debug_str"
debugstrmerge="${file}.debug_str.merge"
debugstrerr="${file}.debug_str.err"

rm -f $index4 $index5 $debugstr $debugstrmerge $debugstrerr
# Ensure intermediate index file is removed when we exit.
trap "rm -f $index4 $index5 $debugstr $debugstrmerge $debugstrerr" 0

$GDB --batch -nx -iex 'set auto-load no' \
-ex "file $file" -ex "save gdb-index $dwarf5 $dir" || {
# Just in case.
status=$?
echo "$myname: gdb error generating index for $file" 1>&2
exit $status
}

# In some situations gdb can exit without creating an index. This is
# not an error.
# E.g., if $file is stripped. This behaviour is akin to stripping an
# already stripped binary, it's a no-op.
status=0

if test -f "$index4" -a -f "$index5"; then
echo "$myname: Both index types were created for $file" 1>&2
status=1
elif test -f "$index4" -o -f "$index5"; then
if test -f "$index4"; then
index="$index4"
section=".gdb_index"
else
index="$index5"
section=".debug_names"
fi
debugstradd=false
debugstrupdate=false
if test -s "$debugstr"; then
if ! $OBJCOPY --dump-section .debug_str="$debugstrmerge" "$file" /dev/null \
2>$debugstrerr; then
cat >&2 $debugstrerr
exit 1
fi
if grep -q "can't dump section '.debug_str' - it does not exist" \
$debugstrerr; then
debugstradd=true
else
debugstrupdate=true
cat >&2 $debugstrerr
fi
cat "$debugstr" >>"$debugstrmerge"
fi

$OBJCOPY --add-section $section="$index" \
--set-section-flags $section=readonly \
$(if $debugstradd; then \
echo --add-section .debug_str="$debugstrmerge"; \
echo --set-section-flags .debug_str=readonly; \
fi; \
if $debugstrupdate; then \
echo --update-section .debug_str="$debugstrmerge"; \
fi) \
"$file" "$file"

status=$?
else
echo "$myname: No index was created for $file" 1>&2
echo "$myname: [Was there no debuginfo? Was there already an index?]" 1>&2
fi

exit $status

BIN
bin/riscv64-unknown-elf-gprof View File


BIN
bin/riscv64-unknown-elf-ld View File


BIN
bin/riscv64-unknown-elf-ld.bfd View File


BIN
bin/riscv64-unknown-elf-nm View File


BIN
bin/riscv64-unknown-elf-objcopy View File


BIN
bin/riscv64-unknown-elf-objdump View File


BIN
bin/riscv64-unknown-elf-ranlib View File


BIN
bin/riscv64-unknown-elf-readelf View File


BIN
bin/riscv64-unknown-elf-size View File


BIN
bin/riscv64-unknown-elf-strings View File


BIN
bin/riscv64-unknown-elf-strip View File


+ 1048
- 0
include/expat.h
File diff suppressed because it is too large
View File


+ 102
- 0
include/expat_config.h View File

@@ -0,0 +1,102 @@
/* expat_config.h. Generated from expat_config.h.in by configure. */
/* expat_config.h.in. Generated from configure.ac by autoheader. */

/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#define BYTEORDER 1234

/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1

/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "expat-bugs@libexpat.org"

/* Define to the full name of this package. */
#define PACKAGE_NAME "expat"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "expat 2.2.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "expat"

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "2.2.0"

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* whether byteorder is bigendian */
/* #undef WORDS_BIGENDIAN */

/* Define to specify how much context to retain around the current parse
point. */
#define XML_CONTEXT_BYTES 1024

/* Define to make parameter entity parsing functionality available. */
#define XML_DTD 1

/* Define to make XML Namespaces functionality available. */
#define XML_NS 1

/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
/* #undef __func__ */

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */

/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */

/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

+ 129
- 0
include/expat_external.h View File

@@ -0,0 +1,129 @@
/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/

#ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1

/* External API definitions */

#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
#endif

/* Expat tries very hard to make the API boundary very specifically
defined. There are two macros defined to control this boundary;
each of these can be defined before including this header to
achieve some different behavior, but doing so it not recommended or
tested frequently.

XMLCALL - The calling convention to use for all calls across the
"library boundary." This will default to cdecl, and
try really hard to tell the compiler that's what we
want.

XMLIMPORT - Whatever magic is needed to note that a function is
to be imported from a dynamically loaded library
(.dll, .so, or .sl, depending on your platform).

The XMLCALL macro was added in Expat 1.95.7. The only one which is
expected to be directly useful in client code is XMLCALL.

Note that on at least some Unix versions, the Expat library must be
compiled with the cdecl calling convention as the default since
system headers may assume the cdecl convention.
*/
#ifndef XMLCALL
#if defined(_MSC_VER)
#define XMLCALL __cdecl
#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
#define XMLCALL __attribute__((cdecl))
#else
/* For any platform which uses this definition and supports more than
one calling convention, we need to extend this definition to
declare the convention used on that platform, if it's possible to
do so.

If this is the case for your platform, please file a bug report
with information on how to identify your platform via the C
pre-processor and how to specify the same calling convention as the
platform's malloc() implementation.
*/
#define XMLCALL
#endif
#endif /* not defined XMLCALL */


#if !defined(XML_STATIC) && !defined(XMLIMPORT)
#ifndef XML_BUILDING_EXPAT
/* using Expat from an application */

#ifdef XML_USE_MSC_EXTENSIONS
#define XMLIMPORT __declspec(dllimport)
#endif

#endif
#endif /* not defined XML_STATIC */

#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
#define XMLIMPORT __attribute__ ((visibility ("default")))
#endif

/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
#define XMLIMPORT
#endif

#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
#define XML_ATTR_MALLOC __attribute__((__malloc__))
#else
#define XML_ATTR_MALLOC
#endif

#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#else
#define XML_ATTR_ALLOC_SIZE(x)
#endif

#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL

#ifdef __cplusplus
extern "C" {
#endif

#ifdef XML_UNICODE_WCHAR_T
#define XML_UNICODE
#endif

#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
#ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;
#else
typedef unsigned short XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */
typedef char XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE */

#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
typedef __int64 XML_Index;
typedef unsigned __int64 XML_Size;
#else
typedef long long XML_Index;
typedef unsigned long long XML_Size;
#endif
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
#endif /* XML_LARGE_SIZE */

#ifdef __cplusplus
}
#endif

#endif /* not Expat_External_INCLUDED */

+ 346
- 0
include/gdb/jit-reader.h View File

@@ -0,0 +1,346 @@
/* JIT declarations for GDB, the GNU Debugger.

Copyright (C) 2011-2019 Free Software Foundation, Inc.

This file is part of GDB.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program 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 General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

#ifndef GDB_JIT_READER_H
#define GDB_JIT_READER_H

#ifdef __cplusplus
extern "C" {
#endif

/* Versioning information. See gdb_reader_funcs. */

#define GDB_READER_INTERFACE_VERSION 1

/* Readers must be released under a GPL compatible license. To
declare that the reader is indeed released under a GPL compatible
license, invoke the macro GDB_DECLARE_GPL_COMPATIBLE in a source
file. */

#ifdef __cplusplus
#define GDB_DECLARE_GPL_COMPATIBLE_READER \
extern "C" { \
extern int plugin_is_GPL_compatible (void); \
extern int plugin_is_GPL_compatible (void) \
{ \
return 0; \
} \
}

#else

#define GDB_DECLARE_GPL_COMPATIBLE_READER \
extern int plugin_is_GPL_compatible (void); \
extern int plugin_is_GPL_compatible (void) \
{ \
return 0; \
}

#endif

/* Represents an address on the target system. */

typedef unsigned long GDB_CORE_ADDR;

/* Return status codes. */

enum gdb_status {
GDB_FAIL = 0,
GDB_SUCCESS = 1
};

struct gdb_object;
struct gdb_symtab;
struct gdb_block;
struct gdb_symbol_callbacks;

/* An array of these are used to represent a map from code addresses to line
numbers in the source file. */

struct gdb_line_mapping
{
int line;
GDB_CORE_ADDR pc;
};

/* Create a new GDB code object. Each code object can have one or
more symbol tables, each representing a compiled source file. */

typedef struct gdb_object *(gdb_object_open) (struct gdb_symbol_callbacks *cb);

/* The callback used to create new symbol table. CB is the
gdb_symbol_callbacks which the structure is part of. FILE_NAME is
an (optionally NULL) file name to associate with this new symbol
table.

Returns a new instance to gdb_symtab that can later be passed to
gdb_block_new, gdb_symtab_add_line_mapping and gdb_symtab_close. */

typedef struct gdb_symtab *(gdb_symtab_open) (struct gdb_symbol_callbacks *cb,
struct gdb_object *obj,
const char *file_name);

/* Creates a new block in a given symbol table. A symbol table is a
forest of blocks, each block representing an code address range and
a corresponding (optionally NULL) NAME. In case the block
corresponds to a function, the NAME passed should be the name of
the function.

If the new block to be created is a child of (i.e. is nested in)
another block, the parent block can be passed in PARENT. SYMTAB is
the symbol table the new block is to belong in. BEGIN, END is the
code address range the block corresponds to.

Returns a new instance of gdb_block, which, as of now, has no use.
Note that the gdb_block returned must not be freed by the
caller. */

typedef struct gdb_block *(gdb_block_open) (struct gdb_symbol_callbacks *cb,
struct gdb_symtab *symtab,
struct gdb_block *parent,
GDB_CORE_ADDR begin,
GDB_CORE_ADDR end,
const char *name);

/* Adds a PC to line number mapping for the symbol table SYMTAB.
NLINES is the number of elements in LINES, each element
corresponding to one (PC, line) pair. */

typedef void (gdb_symtab_add_line_mapping) (struct gdb_symbol_callbacks *cb,
struct gdb_symtab *symtab,
int nlines,
struct gdb_line_mapping *lines);

/* Close the symtab SYMTAB. This signals to GDB that no more blocks
will be opened on this symtab. */

typedef void (gdb_symtab_close) (struct gdb_symbol_callbacks *cb,
struct gdb_symtab *symtab);


/* Closes the gdb_object OBJ and adds the emitted information into
GDB's internal structures. Once this is done, the debug
information will be picked up and used; this will usually be the
last operation in gdb_read_debug_info. */

typedef void (gdb_object_close) (struct gdb_symbol_callbacks *cb,
struct gdb_object *obj);

/* Reads LEN bytes from TARGET_MEM in the target's virtual address
space into GDB_BUF.

Returns GDB_FAIL on failure, and GDB_SUCCESS on success. */

typedef enum gdb_status (gdb_target_read) (GDB_CORE_ADDR target_mem,
void *gdb_buf, int len);

/* The list of callbacks that are passed to read. These callbacks are
to be used to construct the symbol table. The functions have been
described above. */

struct gdb_symbol_callbacks
{
gdb_object_open *object_open;
gdb_symtab_open *symtab_open;
gdb_block_open *block_open;
gdb_symtab_close *symtab_close;
gdb_object_close *object_close;

gdb_symtab_add_line_mapping *line_mapping_add;
gdb_target_read *target_read;

/* For internal use by GDB. */
void *priv_data;
};

/* Forward declaration. */

struct gdb_reg_value;

/* A function of this type is used to free a gdb_reg_value. See the
comment on `free' in struct gdb_reg_value. */

typedef void (gdb_reg_value_free) (struct gdb_reg_value *);

/* Denotes the value of a register. */

struct gdb_reg_value
{
/* The size of the register in bytes. The reader need not set this
field. This will be set for (defined) register values being read
from GDB using reg_get. */
int size;

/* Set to non-zero if the value for the register is known. The
registers for which the reader does not call reg_set are also
assumed to be undefined */
int defined;

/* Since gdb_reg_value is a variable sized structure, it will
usually be allocated on the heap. This function is expected to
contain the corresponding "free" function.

When a pointer to gdb_reg_value is being sent from GDB to the
reader (via gdb_unwind_reg_get), the reader is expected to call
this function (with the same gdb_reg_value as argument) once it
is done with the value.

When the function sends the a gdb_reg_value to GDB (via
gdb_unwind_reg_set), it is expected to set this field to point to
an appropriate cleanup routine (or to NULL if no cleanup is
required). */
gdb_reg_value_free *free;

/* The value of the register. */
unsigned char value[1];
};

/* get_frame_id in gdb_reader_funcs is to return a gdb_frame_id
corresponding to the current frame. The registers corresponding to
the current frame can be read using reg_get. Calling get_frame_id
on a particular frame should return the same gdb_frame_id
throughout its lifetime (i.e. till before it gets unwound). One
way to do this is by having the CODE_ADDRESS point to the
function's first instruction and STACK_ADDRESS point to the value
of the stack pointer when entering the function. */

struct gdb_frame_id
{
GDB_CORE_ADDR code_address;
GDB_CORE_ADDR stack_address;
};

/* Forward declaration. */

struct gdb_unwind_callbacks;

/* Returns the value of a particular register in the current frame.
The current frame is the frame that needs to be unwound into the
outer (earlier) frame.

CB is the struct gdb_unwind_callbacks * the callback belongs to.
REGNUM is the DWARF register number of the register that needs to
be unwound.

Returns the gdb_reg_value corresponding to the register requested.
In case the value of the register has been optimized away or
otherwise unavailable, the defined flag in the returned
gdb_reg_value will be zero. */

typedef struct gdb_reg_value *(gdb_unwind_reg_get)
(struct gdb_unwind_callbacks *cb, int regnum);

/* Sets the previous value of a particular register. REGNUM is the
(DWARF) register number whose value is to be set. VAL is the value
the register is to be set to.

VAL is *not* copied, so the memory allocated to it cannot be
reused. Once GDB no longer needs the value, it is deallocated
using the FREE function (see gdb_reg_value).

A register can also be "set" to an undefined value by setting the
defined in VAL to zero. */

typedef void (gdb_unwind_reg_set) (struct gdb_unwind_callbacks *cb, int regnum,
struct gdb_reg_value *val);

/* This struct is passed to unwind in gdb_reader_funcs, and is to be
used to unwind the current frame (current being the frame whose
registers can be read using reg_get) into the earlier frame. The
functions have been described above. */

struct gdb_unwind_callbacks
{
gdb_unwind_reg_get *reg_get;
gdb_unwind_reg_set *reg_set;
gdb_target_read *target_read;

/* For internal use by GDB. */
void *priv_data;
};

/* Forward declaration. */

struct gdb_reader_funcs;

/* Parse the debug info off a block of memory, pointed to by MEMORY
(already copied to GDB's address space) and MEMORY_SZ bytes long.
The implementation has to use the functions in CB to actually emit
the parsed data into GDB. SELF is the same structure returned by
gdb_init_reader.

Return GDB_FAIL on failure and GDB_SUCCESS on success. */

typedef enum gdb_status (gdb_read_debug_info) (struct gdb_reader_funcs *self,
struct gdb_symbol_callbacks *cb,
void *memory, long memory_sz);

/* Unwind the current frame, CB is the set of unwind callbacks that
are to be used to do this.

Return GDB_FAIL on failure and GDB_SUCCESS on success. */

typedef enum gdb_status (gdb_unwind_frame) (struct gdb_reader_funcs *self,
struct gdb_unwind_callbacks *cb);

/* Return the frame ID corresponding to the current frame, using C to
read the current register values. See the comment on struct
gdb_frame_id. */

typedef struct gdb_frame_id (gdb_get_frame_id) (struct gdb_reader_funcs *self,
struct gdb_unwind_callbacks *c);

/* Called when a reader is being unloaded. This function should also
free SELF, if required. */

typedef void (gdb_destroy_reader) (struct gdb_reader_funcs *self);

/* Called when the reader is loaded. Must either return a properly
populated gdb_reader_funcs or NULL. The memory allocated for the
gdb_reader_funcs is to be managed by the reader itself (i.e. if it
is allocated from the heap, it must also be freed in
gdb_destroy_reader). */

extern struct gdb_reader_funcs *gdb_init_reader (void);

/* Pointer to the functions which implement the reader's
functionality. The individual functions have been documented
above.

None of the fields are optional. */

struct gdb_reader_funcs
{
/* Must be set to GDB_READER_INTERFACE_VERSION. */
int reader_version;

/* For use by the reader. */
void *priv_data;

gdb_read_debug_info *read;
gdb_unwind_frame *unwind;
gdb_get_frame_id *get_frame_id;
gdb_destroy_reader *destroy;
};

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif

BIN
lib/gcc/riscv64-unknown-elf/8.3.0/crtbegin.o View File


BIN
lib/gcc/riscv64-unknown-elf/8.3.0/crtend.o View File


BIN
lib/gcc/riscv64-unknown-elf/8.3.0/crti.o View File


BIN
lib/gcc/riscv64-unknown-elf/8.3.0/crtn.o View File


+ 14
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include-fixed/README View File

@@ -0,0 +1,14 @@
This README file is copied into the directory for GCC-only header files
when fixincludes is run by the makefile for GCC.

Many of the files in this directory were automatically edited from the
standard system header files by the fixincludes process. They are
system-specific, and will not work on any other kind of system. They
are also not part of GCC. The reason we have to do this is because
GCC requires ANSI C headers and many vendors supply ANSI-incompatible
headers.

Because this is an automated process, sometimes headers get "fixed"
that do not, strictly speaking, need a fix. As long as nothing is broken
by the process, it is just an unfortunate collateral inconvenience.
We would like to rectify it, if it is not "too inconvenient".

+ 197
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include-fixed/limits.h View File

@@ -0,0 +1,197 @@
/* Copyright (C) 1992-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

/* This administrivia gets added to the beginning of limits.h
if the system has its own version of limits.h. */

/* We use _GCC_LIMITS_H_ because we want this not to match
any macros that the system's limits.h uses for its own purposes. */
#ifndef _GCC_LIMITS_H_ /* Terminated in limity.h. */
#define _GCC_LIMITS_H_

#ifndef _LIBC_LIMITS_H_
/* Use "..." so that we find syslimits.h only in this same directory. */
#include "syslimits.h"
#endif
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

#ifndef _LIMITS_H___
#define _LIMITS_H___

/* Number of bits in a `char'. */
#undef CHAR_BIT
#define CHAR_BIT __CHAR_BIT__

/* Maximum length of a multibyte character. */
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 1
#endif

/* Minimum and maximum values a `signed char' can hold. */
#undef SCHAR_MIN
#define SCHAR_MIN (-SCHAR_MAX - 1)
#undef SCHAR_MAX
#define SCHAR_MAX __SCHAR_MAX__

/* Maximum value an `unsigned char' can hold. (Minimum is 0). */
#undef UCHAR_MAX
#if __SCHAR_MAX__ == __INT_MAX__
# define UCHAR_MAX (SCHAR_MAX * 2U + 1U)
#else
# define UCHAR_MAX (SCHAR_MAX * 2 + 1)
#endif

/* Minimum and maximum values a `char' can hold. */
#ifdef __CHAR_UNSIGNED__
# undef CHAR_MIN
# if __SCHAR_MAX__ == __INT_MAX__
# define CHAR_MIN 0U
# else
# define CHAR_MIN 0
# endif
# undef CHAR_MAX
# define CHAR_MAX UCHAR_MAX
#else
# undef CHAR_MIN
# define CHAR_MIN SCHAR_MIN
# undef CHAR_MAX
# define CHAR_MAX SCHAR_MAX
#endif

/* Minimum and maximum values a `signed short int' can hold. */
#undef SHRT_MIN
#define SHRT_MIN (-SHRT_MAX - 1)
#undef SHRT_MAX
#define SHRT_MAX __SHRT_MAX__

/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
#undef USHRT_MAX
#if __SHRT_MAX__ == __INT_MAX__
# define USHRT_MAX (SHRT_MAX * 2U + 1U)
#else
# define USHRT_MAX (SHRT_MAX * 2 + 1)
#endif

/* Minimum and maximum values a `signed int' can hold. */
#undef INT_MIN
#define INT_MIN (-INT_MAX - 1)
#undef INT_MAX
#define INT_MAX __INT_MAX__

/* Maximum value an `unsigned int' can hold. (Minimum is 0). */
#undef UINT_MAX
#define UINT_MAX (INT_MAX * 2U + 1U)

/* Minimum and maximum values a `signed long int' can hold.
(Same as `int'). */
#undef LONG_MIN
#define LONG_MIN (-LONG_MAX - 1L)
#undef LONG_MAX
#define LONG_MAX __LONG_MAX__

/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
#undef ULONG_MAX
#define ULONG_MAX (LONG_MAX * 2UL + 1UL)

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* Minimum and maximum values a `signed long long int' can hold. */
# undef LLONG_MIN
# define LLONG_MIN (-LLONG_MAX - 1LL)
# undef LLONG_MAX
# define LLONG_MAX __LONG_LONG_MAX__

/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
# undef ULLONG_MAX
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
#endif

#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
/* Minimum and maximum values a `signed long long int' can hold. */
# undef LONG_LONG_MIN
# define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
# undef LONG_LONG_MAX
# define LONG_LONG_MAX __LONG_LONG_MAX__

/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
# undef ULONG_LONG_MAX
# define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
#endif

#ifdef __STDC_WANT_IEC_60559_BFP_EXT__
/* TS 18661-1 widths of integer types. */
# undef CHAR_WIDTH
# define CHAR_WIDTH __SCHAR_WIDTH__
# undef SCHAR_WIDTH
# define SCHAR_WIDTH __SCHAR_WIDTH__
# undef UCHAR_WIDTH
# define UCHAR_WIDTH __SCHAR_WIDTH__
# undef SHRT_WIDTH
# define SHRT_WIDTH __SHRT_WIDTH__
# undef USHRT_WIDTH
# define USHRT_WIDTH __SHRT_WIDTH__
# undef INT_WIDTH
# define INT_WIDTH __INT_WIDTH__
# undef UINT_WIDTH
# define UINT_WIDTH __INT_WIDTH__
# undef LONG_WIDTH
# define LONG_WIDTH __LONG_WIDTH__
# undef ULONG_WIDTH
# define ULONG_WIDTH __LONG_WIDTH__
# undef LLONG_WIDTH
# define LLONG_WIDTH __LONG_LONG_WIDTH__
# undef ULLONG_WIDTH
# define ULLONG_WIDTH __LONG_LONG_WIDTH__
#endif

#endif /* _LIMITS_H___ */
/* This administrivia gets added to the end of limits.h
if the system has its own version of limits.h. */

#else /* not _GCC_LIMITS_H_ */

#ifdef _GCC_NEXT_LIMITS_H
#include_next <limits.h> /* recurse down to the real one */
#endif

#endif /* not _GCC_LIMITS_H_ */

+ 8
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include-fixed/syslimits.h View File

@@ -0,0 +1,8 @@
/* syslimits.h stands for the system's own limits.h file.
If we can use it ok unmodified, then we install this text.
If fixincludes fixes it, then the fixed version is installed
instead of this text. */

#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */
#include_next <limits.h>
#undef _GCC_NEXT_LIMITS_H

+ 506
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include/float.h View File

@@ -0,0 +1,506 @@
/* Copyright (C) 2002-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

/*
* ISO C Standard: 5.2.4.2.2 Characteristics of floating types <float.h>
*/

#ifndef _FLOAT_H___
#define _FLOAT_H___

/* Radix of exponent representation, b. */
#undef FLT_RADIX
#define FLT_RADIX __FLT_RADIX__

/* Number of base-FLT_RADIX digits in the significand, p. */
#undef FLT_MANT_DIG
#undef DBL_MANT_DIG
#undef LDBL_MANT_DIG
#define FLT_MANT_DIG __FLT_MANT_DIG__
#define DBL_MANT_DIG __DBL_MANT_DIG__
#define LDBL_MANT_DIG __LDBL_MANT_DIG__

/* Number of decimal digits, q, such that any floating-point number with q
decimal digits can be rounded into a floating-point number with p radix b
digits and back again without change to the q decimal digits,

p * log10(b) if b is a power of 10
floor((p - 1) * log10(b)) otherwise
*/
#undef FLT_DIG
#undef DBL_DIG
#undef LDBL_DIG
#define FLT_DIG __FLT_DIG__
#define DBL_DIG __DBL_DIG__
#define LDBL_DIG __LDBL_DIG__

/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */
#undef FLT_MIN_EXP
#undef DBL_MIN_EXP
#undef LDBL_MIN_EXP
#define FLT_MIN_EXP __FLT_MIN_EXP__
#define DBL_MIN_EXP __DBL_MIN_EXP__
#define LDBL_MIN_EXP __LDBL_MIN_EXP__

/* Minimum negative integer such that 10 raised to that power is in the
range of normalized floating-point numbers,

ceil(log10(b) * (emin - 1))
*/
#undef FLT_MIN_10_EXP
#undef DBL_MIN_10_EXP
#undef LDBL_MIN_10_EXP
#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__

/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */
#undef FLT_MAX_EXP
#undef DBL_MAX_EXP
#undef LDBL_MAX_EXP
#define FLT_MAX_EXP __FLT_MAX_EXP__
#define DBL_MAX_EXP __DBL_MAX_EXP__
#define LDBL_MAX_EXP __LDBL_MAX_EXP__

/* Maximum integer such that 10 raised to that power is in the range of
representable finite floating-point numbers,

floor(log10((1 - b**-p) * b**emax))
*/
#undef FLT_MAX_10_EXP
#undef DBL_MAX_10_EXP
#undef LDBL_MAX_10_EXP
#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__

/* Maximum representable finite floating-point number,

(1 - b**-p) * b**emax
*/
#undef FLT_MAX
#undef DBL_MAX
#undef LDBL_MAX
#define FLT_MAX __FLT_MAX__
#define DBL_MAX __DBL_MAX__
#define LDBL_MAX __LDBL_MAX__

/* The difference between 1 and the least value greater than 1 that is
representable in the given floating point type, b**1-p. */
#undef FLT_EPSILON
#undef DBL_EPSILON
#undef LDBL_EPSILON
#define FLT_EPSILON __FLT_EPSILON__
#define DBL_EPSILON __DBL_EPSILON__
#define LDBL_EPSILON __LDBL_EPSILON__

/* Minimum normalized positive floating-point number, b**(emin - 1). */
#undef FLT_MIN
#undef DBL_MIN
#undef LDBL_MIN
#define FLT_MIN __FLT_MIN__
#define DBL_MIN __DBL_MIN__
#define LDBL_MIN __LDBL_MIN__

/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */
/* ??? This is supposed to change with calls to fesetround in <fenv.h>. */
#undef FLT_ROUNDS
#define FLT_ROUNDS 1

#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| (defined (__cplusplus) && __cplusplus >= 201103L)
/* The floating-point expression evaluation method. The precise
definitions of these values are generalised to include support for
the interchange and extended types defined in ISO/IEC TS 18661-3.
Prior to this (for C99/C11) the definitions were:

-1 indeterminate
0 evaluate all operations and constants just to the range and
precision of the type
1 evaluate operations and constants of type float and double
to the range and precision of the double type, evaluate
long double operations and constants to the range and
precision of the long double type
2 evaluate all operations and constants to the range and
precision of the long double type

The TS 18661-3 definitions are:

-1 indeterminate
0 evaluate all operations and constants, whose semantic type has
at most the range and precision of float, to the range and
precision of float; evaluate all other operations and constants
to the range and precision of the semantic type.
1 evaluate all operations and constants, whose semantic type has
at most the range and precision of double, to the range and
precision of double; evaluate all other operations and constants
to the range and precision of the semantic type.
2 evaluate all operations and constants, whose semantic type has
at most the range and precision of long double, to the range and
precision of long double; evaluate all other operations and
constants to the range and precision of the semantic type.
N where _FloatN is a supported interchange floating type
evaluate all operations and constants, whose semantic type has
at most the range and precision of the _FloatN type, to the
range and precision of the _FloatN type; evaluate all other
operations and constants to the range and precision of the
semantic type.
N + 1, where _FloatNx is a supported extended floating type
evaluate operations and constants, whose semantic type has at
most the range and precision of the _FloatNx type, to the range
and precision of the _FloatNx type; evaluate all other
operations and constants to the range and precision of the
semantic type.

The compiler predefines two macros:

__FLT_EVAL_METHOD__
Which, depending on the value given for
-fpermitted-flt-eval-methods, may be limited to only those values
for FLT_EVAL_METHOD defined in C99/C11.

__FLT_EVAL_METHOD_TS_18661_3__
Which always permits the values for FLT_EVAL_METHOD defined in
ISO/IEC TS 18661-3.

Here we want to use __FLT_EVAL_METHOD__, unless
__STDC_WANT_IEC_60559_TYPES_EXT__ is defined, in which case the user
is specifically asking for the ISO/IEC TS 18661-3 types, so we use
__FLT_EVAL_METHOD_TS_18661_3__.

??? This ought to change with the setting of the fp control word;
the value provided by the compiler assumes the widest setting. */
#undef FLT_EVAL_METHOD
#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD_TS_18661_3__
#else
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
#endif

/* Number of decimal digits, n, such that any floating-point number in the
widest supported floating type with pmax radix b digits can be rounded
to a floating-point number with n decimal digits and back again without
change to the value,

pmax * log10(b) if b is a power of 10
ceil(1 + pmax * log10(b)) otherwise
*/
#undef DECIMAL_DIG
#define DECIMAL_DIG __DECIMAL_DIG__

#endif /* C99 */

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
/* Versions of DECIMAL_DIG for each floating-point type. */
#undef FLT_DECIMAL_DIG
#undef DBL_DECIMAL_DIG
#undef LDBL_DECIMAL_DIG
#define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
#define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
#define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__

/* Whether types support subnormal numbers. */
#undef FLT_HAS_SUBNORM
#undef DBL_HAS_SUBNORM
#undef LDBL_HAS_SUBNORM
#define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
#define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
#define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__

/* Minimum positive values, including subnormals. */
#undef FLT_TRUE_MIN
#undef DBL_TRUE_MIN
#undef LDBL_TRUE_MIN
#define FLT_TRUE_MIN __FLT_DENORM_MIN__
#define DBL_TRUE_MIN __DBL_DENORM_MIN__
#define LDBL_TRUE_MIN __LDBL_DENORM_MIN__

#endif /* C11 */

#ifdef __STDC_WANT_IEC_60559_BFP_EXT__
/* Number of decimal digits for which conversions between decimal
character strings and binary formats, in both directions, are
correctly rounded. */
#define CR_DECIMAL_DIG __UINTMAX_MAX__
#endif

#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
/* Constants for _FloatN and _FloatNx types from TS 18661-3. See
comments above for their semantics. */

#ifdef __FLT16_MANT_DIG__
#undef FLT16_MANT_DIG
#define FLT16_MANT_DIG __FLT16_MANT_DIG__
#undef FLT16_DIG
#define FLT16_DIG __FLT16_DIG__
#undef FLT16_MIN_EXP
#define FLT16_MIN_EXP __FLT16_MIN_EXP__
#undef FLT16_MIN_10_EXP
#define FLT16_MIN_10_EXP __FLT16_MIN_10_EXP__
#undef FLT16_MAX_EXP
#define FLT16_MAX_EXP __FLT16_MAX_EXP__
#undef FLT16_MAX_10_EXP
#define FLT16_MAX_10_EXP __FLT16_MAX_10_EXP__
#undef FLT16_MAX
#define FLT16_MAX __FLT16_MAX__
#undef FLT16_EPSILON
#define FLT16_EPSILON __FLT16_EPSILON__
#undef FLT16_MIN
#define FLT16_MIN __FLT16_MIN__
#undef FLT16_DECIMAL_DIG
#define FLT16_DECIMAL_DIG __FLT16_DECIMAL_DIG__
#undef FLT16_TRUE_MIN
#define FLT16_TRUE_MIN __FLT16_DENORM_MIN__
#endif /* __FLT16_MANT_DIG__. */

#ifdef __FLT32_MANT_DIG__
#undef FLT32_MANT_DIG
#define FLT32_MANT_DIG __FLT32_MANT_DIG__
#undef FLT32_DIG
#define FLT32_DIG __FLT32_DIG__
#undef FLT32_MIN_EXP
#define FLT32_MIN_EXP __FLT32_MIN_EXP__
#undef FLT32_MIN_10_EXP
#define FLT32_MIN_10_EXP __FLT32_MIN_10_EXP__
#undef FLT32_MAX_EXP
#define FLT32_MAX_EXP __FLT32_MAX_EXP__
#undef FLT32_MAX_10_EXP
#define FLT32_MAX_10_EXP __FLT32_MAX_10_EXP__
#undef FLT32_MAX
#define FLT32_MAX __FLT32_MAX__
#undef FLT32_EPSILON
#define FLT32_EPSILON __FLT32_EPSILON__
#undef FLT32_MIN
#define FLT32_MIN __FLT32_MIN__
#undef FLT32_DECIMAL_DIG
#define FLT32_DECIMAL_DIG __FLT32_DECIMAL_DIG__
#undef FLT32_TRUE_MIN
#define FLT32_TRUE_MIN __FLT32_DENORM_MIN__
#endif /* __FLT32_MANT_DIG__. */

#ifdef __FLT64_MANT_DIG__
#undef FLT64_MANT_DIG
#define FLT64_MANT_DIG __FLT64_MANT_DIG__
#undef FLT64_DIG
#define FLT64_DIG __FLT64_DIG__
#undef FLT64_MIN_EXP
#define FLT64_MIN_EXP __FLT64_MIN_EXP__
#undef FLT64_MIN_10_EXP
#define FLT64_MIN_10_EXP __FLT64_MIN_10_EXP__
#undef FLT64_MAX_EXP
#define FLT64_MAX_EXP __FLT64_MAX_EXP__
#undef FLT64_MAX_10_EXP
#define FLT64_MAX_10_EXP __FLT64_MAX_10_EXP__
#undef FLT64_MAX
#define FLT64_MAX __FLT64_MAX__
#undef FLT64_EPSILON
#define FLT64_EPSILON __FLT64_EPSILON__
#undef FLT64_MIN
#define FLT64_MIN __FLT64_MIN__
#undef FLT64_DECIMAL_DIG
#define FLT64_DECIMAL_DIG __FLT64_DECIMAL_DIG__
#undef FLT64_TRUE_MIN
#define FLT64_TRUE_MIN __FLT64_DENORM_MIN__
#endif /* __FLT64_MANT_DIG__. */

#ifdef __FLT128_MANT_DIG__
#undef FLT128_MANT_DIG
#define FLT128_MANT_DIG __FLT128_MANT_DIG__
#undef FLT128_DIG
#define FLT128_DIG __FLT128_DIG__
#undef FLT128_MIN_EXP
#define FLT128_MIN_EXP __FLT128_MIN_EXP__
#undef FLT128_MIN_10_EXP
#define FLT128_MIN_10_EXP __FLT128_MIN_10_EXP__
#undef FLT128_MAX_EXP
#define FLT128_MAX_EXP __FLT128_MAX_EXP__
#undef FLT128_MAX_10_EXP
#define FLT128_MAX_10_EXP __FLT128_MAX_10_EXP__
#undef FLT128_MAX
#define FLT128_MAX __FLT128_MAX__
#undef FLT128_EPSILON
#define FLT128_EPSILON __FLT128_EPSILON__
#undef FLT128_MIN
#define FLT128_MIN __FLT128_MIN__
#undef FLT128_DECIMAL_DIG
#define FLT128_DECIMAL_DIG __FLT128_DECIMAL_DIG__
#undef FLT128_TRUE_MIN
#define FLT128_TRUE_MIN __FLT128_DENORM_MIN__
#endif /* __FLT128_MANT_DIG__. */

#ifdef __FLT32X_MANT_DIG__
#undef FLT32X_MANT_DIG
#define FLT32X_MANT_DIG __FLT32X_MANT_DIG__
#undef FLT32X_DIG
#define FLT32X_DIG __FLT32X_DIG__
#undef FLT32X_MIN_EXP
#define FLT32X_MIN_EXP __FLT32X_MIN_EXP__
#undef FLT32X_MIN_10_EXP
#define FLT32X_MIN_10_EXP __FLT32X_MIN_10_EXP__
#undef FLT32X_MAX_EXP
#define FLT32X_MAX_EXP __FLT32X_MAX_EXP__
#undef FLT32X_MAX_10_EXP
#define FLT32X_MAX_10_EXP __FLT32X_MAX_10_EXP__
#undef FLT32X_MAX
#define FLT32X_MAX __FLT32X_MAX__
#undef FLT32X_EPSILON
#define FLT32X_EPSILON __FLT32X_EPSILON__
#undef FLT32X_MIN
#define FLT32X_MIN __FLT32X_MIN__
#undef FLT32X_DECIMAL_DIG
#define FLT32X_DECIMAL_DIG __FLT32X_DECIMAL_DIG__
#undef FLT32X_TRUE_MIN
#define FLT32X_TRUE_MIN __FLT32X_DENORM_MIN__
#endif /* __FLT32X_MANT_DIG__. */

#ifdef __FLT64X_MANT_DIG__
#undef FLT64X_MANT_DIG
#define FLT64X_MANT_DIG __FLT64X_MANT_DIG__
#undef FLT64X_DIG
#define FLT64X_DIG __FLT64X_DIG__
#undef FLT64X_MIN_EXP
#define FLT64X_MIN_EXP __FLT64X_MIN_EXP__
#undef FLT64X_MIN_10_EXP
#define FLT64X_MIN_10_EXP __FLT64X_MIN_10_EXP__
#undef FLT64X_MAX_EXP
#define FLT64X_MAX_EXP __FLT64X_MAX_EXP__
#undef FLT64X_MAX_10_EXP
#define FLT64X_MAX_10_EXP __FLT64X_MAX_10_EXP__
#undef FLT64X_MAX
#define FLT64X_MAX __FLT64X_MAX__
#undef FLT64X_EPSILON
#define FLT64X_EPSILON __FLT64X_EPSILON__
#undef FLT64X_MIN
#define FLT64X_MIN __FLT64X_MIN__
#undef FLT64X_DECIMAL_DIG
#define FLT64X_DECIMAL_DIG __FLT64X_DECIMAL_DIG__
#undef FLT64X_TRUE_MIN
#define FLT64X_TRUE_MIN __FLT64X_DENORM_MIN__
#endif /* __FLT64X_MANT_DIG__. */

#ifdef __FLT128X_MANT_DIG__
#undef FLT128X_MANT_DIG
#define FLT128X_MANT_DIG __FLT128X_MANT_DIG__
#undef FLT128X_DIG
#define FLT128X_DIG __FLT128X_DIG__
#undef FLT128X_MIN_EXP
#define FLT128X_MIN_EXP __FLT128X_MIN_EXP__
#undef FLT128X_MIN_10_EXP
#define FLT128X_MIN_10_EXP __FLT128X_MIN_10_EXP__
#undef FLT128X_MAX_EXP
#define FLT128X_MAX_EXP __FLT128X_MAX_EXP__
#undef FLT128X_MAX_10_EXP
#define FLT128X_MAX_10_EXP __FLT128X_MAX_10_EXP__
#undef FLT128X_MAX
#define FLT128X_MAX __FLT128X_MAX__
#undef FLT128X_EPSILON
#define FLT128X_EPSILON __FLT128X_EPSILON__
#undef FLT128X_MIN
#define FLT128X_MIN __FLT128X_MIN__
#undef FLT128X_DECIMAL_DIG
#define FLT128X_DECIMAL_DIG __FLT128X_DECIMAL_DIG__
#undef FLT128X_TRUE_MIN
#define FLT128X_TRUE_MIN __FLT128X_DENORM_MIN__
#endif /* __FLT128X_MANT_DIG__. */

#endif /* __STDC_WANT_IEC_60559_TYPES_EXT__. */

#ifdef __STDC_WANT_DEC_FP__
/* Draft Technical Report 24732, extension for decimal floating-point
arithmetic: Characteristic of decimal floating types <float.h>. */

/* Number of base-FLT_RADIX digits in the significand, p. */
#undef DEC32_MANT_DIG
#undef DEC64_MANT_DIG
#undef DEC128_MANT_DIG
#define DEC32_MANT_DIG __DEC32_MANT_DIG__
#define DEC64_MANT_DIG __DEC64_MANT_DIG__
#define DEC128_MANT_DIG __DEC128_MANT_DIG__

/* Minimum exponent. */
#undef DEC32_MIN_EXP
#undef DEC64_MIN_EXP
#undef DEC128_MIN_EXP
#define DEC32_MIN_EXP __DEC32_MIN_EXP__
#define DEC64_MIN_EXP __DEC64_MIN_EXP__
#define DEC128_MIN_EXP __DEC128_MIN_EXP__

/* Maximum exponent. */
#undef DEC32_MAX_EXP
#undef DEC64_MAX_EXP
#undef DEC128_MAX_EXP
#define DEC32_MAX_EXP __DEC32_MAX_EXP__
#define DEC64_MAX_EXP __DEC64_MAX_EXP__
#define DEC128_MAX_EXP __DEC128_MAX_EXP__

/* Maximum representable finite decimal floating-point number
(there are 6, 15, and 33 9s after the decimal points respectively). */
#undef DEC32_MAX
#undef DEC64_MAX
#undef DEC128_MAX
#define DEC32_MAX __DEC32_MAX__
#define DEC64_MAX __DEC64_MAX__
#define DEC128_MAX __DEC128_MAX__

/* The difference between 1 and the least value greater than 1 that is
representable in the given floating point type. */
#undef DEC32_EPSILON
#undef DEC64_EPSILON
#undef DEC128_EPSILON
#define DEC32_EPSILON __DEC32_EPSILON__
#define DEC64_EPSILON __DEC64_EPSILON__
#define DEC128_EPSILON __DEC128_EPSILON__

/* Minimum normalized positive floating-point number. */
#undef DEC32_MIN
#undef DEC64_MIN
#undef DEC128_MIN
#define DEC32_MIN __DEC32_MIN__
#define DEC64_MIN __DEC64_MIN__
#define DEC128_MIN __DEC128_MIN__

/* Minimum subnormal positive floating-point number. */
#undef DEC32_SUBNORMAL_MIN
#undef DEC64_SUBNORMAL_MIN
#undef DEC128_SUBNORMAL_MIN
#define DEC32_SUBNORMAL_MIN __DEC32_SUBNORMAL_MIN__
#define DEC64_SUBNORMAL_MIN __DEC64_SUBNORMAL_MIN__
#define DEC128_SUBNORMAL_MIN __DEC128_SUBNORMAL_MIN__

/* The floating-point expression evaluation method.
-1 indeterminate
0 evaluate all operations and constants just to the range and
precision of the type
1 evaluate operations and constants of type _Decimal32
and _Decimal64 to the range and precision of the _Decimal64
type, evaluate _Decimal128 operations and constants to the
range and precision of the _Decimal128 type;
2 evaluate all operations and constants to the range and
precision of the _Decimal128 type. */

#undef DEC_EVAL_METHOD
#define DEC_EVAL_METHOD __DEC_EVAL_METHOD__

#endif /* __STDC_WANT_DEC_FP__ */

#endif /* _FLOAT_H___ */

+ 41
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include/gcov.h View File

@@ -0,0 +1,41 @@
/* GCOV interface routines.
Copyright (C) 2017-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

#ifndef GCC_GCOV_H
#define GCC_GCOV_H

/* Set all counters to zero. */

extern void __gcov_reset (void);

/* Write profile information to a file. */

extern void __gcov_dump (void);

/* Write profile information to a file and reset counters to zero.
The function does operations under a mutex. */

extern void __gcov_flush (void);

#endif /* GCC_GCOV_H */

+ 45
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include/iso646.h View File

@@ -0,0 +1,45 @@
/* Copyright (C) 1997-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

/*
* ISO C Standard: 7.9 Alternative spellings <iso646.h>
*/

#ifndef _ISO646_H
#define _ISO646_H

#ifndef __cplusplus
#define and &&
#define and_eq &=
#define bitand &
#define bitor |
#define compl ~
#define not !
#define not_eq !=
#define or ||
#define or_eq |=
#define xor ^
#define xor_eq ^=
#endif

#endif

+ 39
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include/stdalign.h View File

@@ -0,0 +1,39 @@
/* Copyright (C) 2011-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

/* ISO C1X: 7.15 Alignment <stdalign.h>. */

#ifndef _STDALIGN_H
#define _STDALIGN_H

#ifndef __cplusplus

#define alignas _Alignas
#define alignof _Alignof

#define __alignas_is_defined 1
#define __alignof_is_defined 1

#endif

#endif /* stdalign.h */

+ 127
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include/stdarg.h View File

@@ -0,0 +1,127 @@
/* Copyright (C) 1989-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

/*
* ISO C Standard: 7.15 Variable arguments <stdarg.h>
*/

#ifndef _STDARG_H
#ifndef _ANSI_STDARG_H_
#ifndef __need___va_list
#define _STDARG_H
#define _ANSI_STDARG_H_
#endif /* not __need___va_list */
#undef __need___va_list

/* Define __gnuc_va_list. */

#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef __builtin_va_list __gnuc_va_list;
#endif

/* Define the standard macros for the user,
if this invocation was from the user program. */
#ifdef _STDARG_H

#define va_start(v,l) __builtin_va_start(v,l)
#define va_end(v) __builtin_va_end(v)
#define va_arg(v,l) __builtin_va_arg(v,l)
#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \
|| __cplusplus + 0 >= 201103L
#define va_copy(d,s) __builtin_va_copy(d,s)
#endif
#define __va_copy(d,s) __builtin_va_copy(d,s)

/* Define va_list, if desired, from __gnuc_va_list. */
/* We deliberately do not define va_list when called from
stdio.h, because ANSI C says that stdio.h is not supposed to define
va_list. stdio.h needs to have access to that data type,
but must not use that name. It should use the name __gnuc_va_list,
which is safe because it is reserved for the implementation. */

#ifdef _BSD_VA_LIST
#undef _BSD_VA_LIST
#endif

#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
/* SVR4.2 uses _VA_LIST for an internal alias for va_list,
so we must avoid testing it and setting it here.
SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
have no conflict with that. */
#ifndef _VA_LIST_
#define _VA_LIST_
#ifdef __i860__
#ifndef _VA_LIST
#define _VA_LIST va_list
#endif
#endif /* __i860__ */
typedef __gnuc_va_list va_list;
#ifdef _SCO_DS
#define __VA_LIST
#endif
#endif /* _VA_LIST_ */
#else /* not __svr4__ || _SCO_DS */

/* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
But on BSD NET2 we must not test or define or undef it.
(Note that the comments in NET 2's ansi.h
are incorrect for _VA_LIST_--see stdio.h!) */
#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT)
/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */
#ifndef _VA_LIST_DEFINED
/* The macro _VA_LIST is used in SCO Unix 3.2. */
#ifndef _VA_LIST
/* The macro _VA_LIST_T_H is used in the Bull dpx2 */
#ifndef _VA_LIST_T_H
/* The macro __va_list__ is used by BeOS. */
#ifndef __va_list__
typedef __gnuc_va_list va_list;
#endif /* not __va_list__ */
#endif /* not _VA_LIST_T_H */
#endif /* not _VA_LIST */
#endif /* not _VA_LIST_DEFINED */
#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
#define _VA_LIST_
#endif
#ifndef _VA_LIST
#define _VA_LIST
#endif
#ifndef _VA_LIST_DEFINED
#define _VA_LIST_DEFINED
#endif
#ifndef _VA_LIST_T_H
#define _VA_LIST_T_H
#endif
#ifndef __va_list__
#define __va_list__
#endif

#endif /* not _VA_LIST_, except on certain systems */

#endif /* not __svr4__ */

#endif /* _STDARG_H */

#endif /* not _ANSI_STDARG_H_ */
#endif /* not _STDARG_H */

+ 243
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include/stdatomic.h View File

@@ -0,0 +1,243 @@
/* Copyright (C) 2013-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

/* ISO C11 Standard: 7.17 Atomics <stdatomic.h>. */

#ifndef _STDATOMIC_H
#define _STDATOMIC_H

typedef enum
{
memory_order_relaxed = __ATOMIC_RELAXED,
memory_order_consume = __ATOMIC_CONSUME,
memory_order_acquire = __ATOMIC_ACQUIRE,
memory_order_release = __ATOMIC_RELEASE,
memory_order_acq_rel = __ATOMIC_ACQ_REL,
memory_order_seq_cst = __ATOMIC_SEQ_CST
} memory_order;


typedef _Atomic _Bool atomic_bool;
typedef _Atomic char atomic_char;
typedef _Atomic signed char atomic_schar;
typedef _Atomic unsigned char atomic_uchar;
typedef _Atomic short atomic_short;
typedef _Atomic unsigned short atomic_ushort;
typedef _Atomic int atomic_int;
typedef _Atomic unsigned int atomic_uint;
typedef _Atomic long atomic_long;
typedef _Atomic unsigned long atomic_ulong;
typedef _Atomic long long atomic_llong;
typedef _Atomic unsigned long long atomic_ullong;
typedef _Atomic __CHAR16_TYPE__ atomic_char16_t;
typedef _Atomic __CHAR32_TYPE__ atomic_char32_t;
typedef _Atomic __WCHAR_TYPE__ atomic_wchar_t;
typedef _Atomic __INT_LEAST8_TYPE__ atomic_int_least8_t;
typedef _Atomic __UINT_LEAST8_TYPE__ atomic_uint_least8_t;
typedef _Atomic __INT_LEAST16_TYPE__ atomic_int_least16_t;
typedef _Atomic __UINT_LEAST16_TYPE__ atomic_uint_least16_t;
typedef _Atomic __INT_LEAST32_TYPE__ atomic_int_least32_t;
typedef _Atomic __UINT_LEAST32_TYPE__ atomic_uint_least32_t;
typedef _Atomic __INT_LEAST64_TYPE__ atomic_int_least64_t;
typedef _Atomic __UINT_LEAST64_TYPE__ atomic_uint_least64_t;
typedef _Atomic __INT_FAST8_TYPE__ atomic_int_fast8_t;
typedef _Atomic __UINT_FAST8_TYPE__ atomic_uint_fast8_t;
typedef _Atomic __INT_FAST16_TYPE__ atomic_int_fast16_t;
typedef _Atomic __UINT_FAST16_TYPE__ atomic_uint_fast16_t;
typedef _Atomic __INT_FAST32_TYPE__ atomic_int_fast32_t;
typedef _Atomic __UINT_FAST32_TYPE__ atomic_uint_fast32_t;
typedef _Atomic __INT_FAST64_TYPE__ atomic_int_fast64_t;
typedef _Atomic __UINT_FAST64_TYPE__ atomic_uint_fast64_t;
typedef _Atomic __INTPTR_TYPE__ atomic_intptr_t;
typedef _Atomic __UINTPTR_TYPE__ atomic_uintptr_t;
typedef _Atomic __SIZE_TYPE__ atomic_size_t;
typedef _Atomic __PTRDIFF_TYPE__ atomic_ptrdiff_t;
typedef _Atomic __INTMAX_TYPE__ atomic_intmax_t;
typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t;


#define ATOMIC_VAR_INIT(VALUE) (VALUE)

/* Initialize an atomic object pointed to by PTR with VAL. */
#define atomic_init(PTR, VAL) \
atomic_store_explicit (PTR, VAL, __ATOMIC_RELAXED)

#define kill_dependency(Y) \
__extension__ \
({ \
__auto_type __kill_dependency_tmp = (Y); \
__kill_dependency_tmp; \
})

extern void atomic_thread_fence (memory_order);
#define atomic_thread_fence(MO) __atomic_thread_fence (MO)
extern void atomic_signal_fence (memory_order);
#define atomic_signal_fence(MO) __atomic_signal_fence (MO)
#define atomic_is_lock_free(OBJ) __atomic_is_lock_free (sizeof (*(OBJ)), (OBJ))

#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE


/* Note that these macros require __typeof__ and __auto_type to remove
_Atomic qualifiers (and const qualifiers, if those are valid on
macro operands).
Also note that the header file uses the generic form of __atomic
builtins, which requires the address to be taken of the value
parameter, and then we pass that value on. This allows the macros
to work for any type, and the compiler is smart enough to convert
these to lock-free _N variants if possible, and throw away the
temps. */

#define atomic_store_explicit(PTR, VAL, MO) \
__extension__ \
({ \
__auto_type __atomic_store_ptr = (PTR); \
__typeof__ (*__atomic_store_ptr) __atomic_store_tmp = (VAL); \
__atomic_store (__atomic_store_ptr, &__atomic_store_tmp, (MO)); \
})

#define atomic_store(PTR, VAL) \
atomic_store_explicit (PTR, VAL, __ATOMIC_SEQ_CST)


#define atomic_load_explicit(PTR, MO) \
__extension__ \
({ \
__auto_type __atomic_load_ptr = (PTR); \
__typeof__ (*__atomic_load_ptr) __atomic_load_tmp; \
__atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (MO)); \
__atomic_load_tmp; \
})

#define atomic_load(PTR) atomic_load_explicit (PTR, __ATOMIC_SEQ_CST)


#define atomic_exchange_explicit(PTR, VAL, MO) \
__extension__ \
({ \
__auto_type __atomic_exchange_ptr = (PTR); \
__typeof__ (*__atomic_exchange_ptr) __atomic_exchange_val = (VAL); \
__typeof__ (*__atomic_exchange_ptr) __atomic_exchange_tmp; \
__atomic_exchange (__atomic_exchange_ptr, &__atomic_exchange_val, \
&__atomic_exchange_tmp, (MO)); \
__atomic_exchange_tmp; \
})

#define atomic_exchange(PTR, VAL) \
atomic_exchange_explicit (PTR, VAL, __ATOMIC_SEQ_CST)


#define atomic_compare_exchange_strong_explicit(PTR, VAL, DES, SUC, FAIL) \
__extension__ \
({ \
__auto_type __atomic_compare_exchange_ptr = (PTR); \
__typeof__ (*__atomic_compare_exchange_ptr) __atomic_compare_exchange_tmp \
= (DES); \
__atomic_compare_exchange (__atomic_compare_exchange_ptr, (VAL), \
&__atomic_compare_exchange_tmp, 0, \
(SUC), (FAIL)); \
})

#define atomic_compare_exchange_strong(PTR, VAL, DES) \
atomic_compare_exchange_strong_explicit (PTR, VAL, DES, __ATOMIC_SEQ_CST, \
__ATOMIC_SEQ_CST)

#define atomic_compare_exchange_weak_explicit(PTR, VAL, DES, SUC, FAIL) \
__extension__ \
({ \
__auto_type __atomic_compare_exchange_ptr = (PTR); \
__typeof__ (*__atomic_compare_exchange_ptr) __atomic_compare_exchange_tmp \
= (DES); \
__atomic_compare_exchange (__atomic_compare_exchange_ptr, (VAL), \
&__atomic_compare_exchange_tmp, 1, \
(SUC), (FAIL)); \
})

#define atomic_compare_exchange_weak(PTR, VAL, DES) \
atomic_compare_exchange_weak_explicit (PTR, VAL, DES, __ATOMIC_SEQ_CST, \
__ATOMIC_SEQ_CST)



#define atomic_fetch_add(PTR, VAL) __atomic_fetch_add ((PTR), (VAL), \
__ATOMIC_SEQ_CST)
#define atomic_fetch_add_explicit(PTR, VAL, MO) \
__atomic_fetch_add ((PTR), (VAL), (MO))

#define atomic_fetch_sub(PTR, VAL) __atomic_fetch_sub ((PTR), (VAL), \
__ATOMIC_SEQ_CST)
#define atomic_fetch_sub_explicit(PTR, VAL, MO) \
__atomic_fetch_sub ((PTR), (VAL), (MO))

#define atomic_fetch_or(PTR, VAL) __atomic_fetch_or ((PTR), (VAL), \
__ATOMIC_SEQ_CST)
#define atomic_fetch_or_explicit(PTR, VAL, MO) \
__atomic_fetch_or ((PTR), (VAL), (MO))

#define atomic_fetch_xor(PTR, VAL) __atomic_fetch_xor ((PTR), (VAL), \
__ATOMIC_SEQ_CST)
#define atomic_fetch_xor_explicit(PTR, VAL, MO) \
__atomic_fetch_xor ((PTR), (VAL), (MO))

#define atomic_fetch_and(PTR, VAL) __atomic_fetch_and ((PTR), (VAL), \
__ATOMIC_SEQ_CST)
#define atomic_fetch_and_explicit(PTR, VAL, MO) \
__atomic_fetch_and ((PTR), (VAL), (MO))


typedef _Atomic struct
{
#if __GCC_ATOMIC_TEST_AND_SET_TRUEVAL == 1
_Bool __val;
#else
unsigned char __val;
#endif
} atomic_flag;

#define ATOMIC_FLAG_INIT { 0 }


extern _Bool atomic_flag_test_and_set (volatile atomic_flag *);
#define atomic_flag_test_and_set(PTR) \
__atomic_test_and_set ((PTR), __ATOMIC_SEQ_CST)
extern _Bool atomic_flag_test_and_set_explicit (volatile atomic_flag *,
memory_order);
#define atomic_flag_test_and_set_explicit(PTR, MO) \
__atomic_test_and_set ((PTR), (MO))

extern void atomic_flag_clear (volatile atomic_flag *);
#define atomic_flag_clear(PTR) __atomic_clear ((PTR), __ATOMIC_SEQ_CST)
extern void atomic_flag_clear_explicit (volatile atomic_flag *, memory_order);
#define atomic_flag_clear_explicit(PTR, MO) __atomic_clear ((PTR), (MO))

#endif /* _STDATOMIC_H */

+ 54
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include/stdbool.h View File

@@ -0,0 +1,54 @@
/* Copyright (C) 1998-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC 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.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */

/*
* ISO C Standard: 7.16 Boolean type and values <stdbool.h>
*/

#ifndef _STDBOOL_H
#define _STDBOOL_H

#ifndef __cplusplus

#define bool _Bool
#define true 1
#define false 0

#else /* __cplusplus */

/* Supporting _Bool in C++ is a GCC extension. */
#define _Bool bool

#if __cplusplus < 201103L
/* Defining these macros in C++98 is a GCC extension. */
#define bool bool
#define false false
#define true true
#endif

#endif /* __cplusplus */

/* Signal that all the definitions are present. */
#define __bool_true_false_are_defined 1

#endif /* stdbool.h */

+ 451
- 0
lib/gcc/riscv64-unknown-elf/8.3.0/include/stddef.h View File

@@ -0,0 +1,451 @@
/* Copyright (C) 1989-2018 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC 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.

Under Section 7 of GPL version 3, you are gr