diff options
Diffstat (limited to 'libgcc/config/frv')
-rw-r--r-- | libgcc/config/frv/cmovd.c | 51 | ||||
-rw-r--r-- | libgcc/config/frv/cmovh.c | 47 | ||||
-rw-r--r-- | libgcc/config/frv/cmovw.c | 51 | ||||
-rw-r--r-- | libgcc/config/frv/modi.c | 4 | ||||
-rw-r--r-- | libgcc/config/frv/t-frv | 10 | ||||
-rw-r--r-- | libgcc/config/frv/t-linux | 2 | ||||
-rw-r--r-- | libgcc/config/frv/uitod.c | 4 | ||||
-rw-r--r-- | libgcc/config/frv/uitof.c | 4 | ||||
-rw-r--r-- | libgcc/config/frv/ulltod.c | 4 | ||||
-rw-r--r-- | libgcc/config/frv/ulltof.c | 4 | ||||
-rw-r--r-- | libgcc/config/frv/umodi.c | 4 |
11 files changed, 184 insertions, 1 deletions
diff --git a/libgcc/config/frv/cmovd.c b/libgcc/config/frv/cmovd.c new file mode 100644 index 00000000000..e46070aac04 --- /dev/null +++ b/libgcc/config/frv/cmovd.c @@ -0,0 +1,51 @@ +/* Move double-word library function. + Copyright (C) 2000, 2003, 2009 Free Software Foundation, Inc. + Contributed by Red Hat, 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/>. */ + +void +__cmovd (long long *dest, const long long *src, unsigned len) +{ + unsigned i; + unsigned num = len >> 3; + unsigned xlen = len & ~7; + char *dest_byte = (char *)dest; + const char *src_byte = (const char *)src; + + if (dest_byte < src_byte || dest_byte > src_byte+len) + { + for (i = 0; i < num; i++) + dest[i] = src[i]; + + while (len > xlen) + { + dest_byte[xlen] = src_byte[xlen]; + xlen++; + } + } + else + { + while (len-- > 0) + dest_byte[len] = src_byte[len]; + } +} diff --git a/libgcc/config/frv/cmovh.c b/libgcc/config/frv/cmovh.c new file mode 100644 index 00000000000..6b0901d95a7 --- /dev/null +++ b/libgcc/config/frv/cmovh.c @@ -0,0 +1,47 @@ +/* Move half-word library function. + Copyright (C) 2000, 2003, 2009 Free Software Foundation, Inc. + Contributed by Red Hat, 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/>. */ + +void +__cmovh (short *dest, const short *src, unsigned len) +{ + unsigned i; + unsigned num = len >> 1; + char *dest_byte = (char *)dest; + const char *src_byte = (const char *)src; + + if (dest_byte < src_byte || dest_byte > src_byte+len) + { + for (i = 0; i < num; i++) + dest[i] = src[i]; + + if ((len & 1) != 0) + dest_byte[len-1] = src_byte[len-1]; + } + else + { + while (len-- > 0) + dest_byte[len] = src_byte[len]; + } +} diff --git a/libgcc/config/frv/cmovw.c b/libgcc/config/frv/cmovw.c new file mode 100644 index 00000000000..f27db75aaf6 --- /dev/null +++ b/libgcc/config/frv/cmovw.c @@ -0,0 +1,51 @@ +/* Move word library function. + Copyright (C) 2000, 2003, 2009 Free Software Foundation, Inc. + Contributed by Red Hat, 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/>. */ + +void +__cmovw (int *dest, const int *src, unsigned len) +{ + unsigned i; + unsigned num = len >> 2; + unsigned xlen = len & ~3; + char *dest_byte = (char *)dest; + const char *src_byte = (const char *)src; + + if (dest_byte < src_byte || dest_byte > src_byte+len) + { + for (i = 0; i < num; i++) + dest[i] = src[i]; + + while (len > xlen) + { + dest_byte[xlen] = src_byte[xlen]; + xlen++; + } + } + else + { + while (len-- > 0) + dest_byte[len] = src_byte[len]; + } +} diff --git a/libgcc/config/frv/modi.c b/libgcc/config/frv/modi.c new file mode 100644 index 00000000000..d5a91fc0f55 --- /dev/null +++ b/libgcc/config/frv/modi.c @@ -0,0 +1,4 @@ +int __modi (int a, int b) +{ + return a % b; +} diff --git a/libgcc/config/frv/t-frv b/libgcc/config/frv/t-frv index 9773722d8e7..a4ff0585183 100644 --- a/libgcc/config/frv/t-frv +++ b/libgcc/config/frv/t-frv @@ -1,6 +1,16 @@ LIB1ASMSRC = frv/lib1funcs.S LIB1ASMFUNCS = _cmpll _cmpf _cmpd _addll _subll _andll _orll _xorll _notll _cmov +LIB2ADD = $(srcdir)/config/frv/cmovh.c \ + $(srcdir)/config/frv/cmovw.c \ + $(srcdir)/config/frv/cmovd.c \ + $(srcdir)/config/frv/modi.c \ + $(srcdir)/config/frv/umodi.c \ + $(srcdir)/config/frv/uitof.c \ + $(srcdir)/config/frv/uitod.c \ + $(srcdir)/config/frv/ulltof.c \ + $(srcdir)/config/frv/ulltod.c + # Compile two additional files that are linked with every program # linked using GCC on systems using COFF or ELF, for the sake of C++ # constructors. diff --git a/libgcc/config/frv/t-linux b/libgcc/config/frv/t-linux index 2b4fe3f94e8..0240efefae9 100644 --- a/libgcc/config/frv/t-linux +++ b/libgcc/config/frv/t-linux @@ -1,3 +1,3 @@ -CRTSTUFF_T_CFLAGS = -fPIC +CRTSTUFF_T_CFLAGS = $(PICFLAG) SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/frv/libgcc-glibc.ver diff --git a/libgcc/config/frv/uitod.c b/libgcc/config/frv/uitod.c new file mode 100644 index 00000000000..14290ab6b04 --- /dev/null +++ b/libgcc/config/frv/uitod.c @@ -0,0 +1,4 @@ +double __uitod (unsigned int a) +{ + return a; +} diff --git a/libgcc/config/frv/uitof.c b/libgcc/config/frv/uitof.c new file mode 100644 index 00000000000..059bc7c7417 --- /dev/null +++ b/libgcc/config/frv/uitof.c @@ -0,0 +1,4 @@ +float __uitof (unsigned int a) +{ + return a; +} diff --git a/libgcc/config/frv/ulltod.c b/libgcc/config/frv/ulltod.c new file mode 100644 index 00000000000..e6bee12081f --- /dev/null +++ b/libgcc/config/frv/ulltod.c @@ -0,0 +1,4 @@ +double __ulltod (unsigned long long a) +{ + return a; +} diff --git a/libgcc/config/frv/ulltof.c b/libgcc/config/frv/ulltof.c new file mode 100644 index 00000000000..29cdfd4d2a1 --- /dev/null +++ b/libgcc/config/frv/ulltof.c @@ -0,0 +1,4 @@ +float __ulltof (unsigned long long a) +{ + return a; +} diff --git a/libgcc/config/frv/umodi.c b/libgcc/config/frv/umodi.c new file mode 100644 index 00000000000..4ffe5ad8132 --- /dev/null +++ b/libgcc/config/frv/umodi.c @@ -0,0 +1,4 @@ +unsigned int __umodi (unsigned int a, unsigned int b) +{ + return a % b; +} |