aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorsebastianperta <sebastianperta@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-22 19:23:15 +0000
committersebastianperta <sebastianperta@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-22 19:23:15 +0000
commite1192dcf7e3c26fbbc24f5bd32dfdfd110a25149 (patch)
tree6f40695d6f1dddf72c76e99075eb3e6db444d323 /libgcc
parenta2618819dfdb967e125f5133d720d2ffe0a7798f (diff)
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.md: New define_expand "anddi3". 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/anddi3.S: New assembly file. * config/rl78/t-rl78: Added anddi3.S to LIB2ADD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/config/rl78/anddi3.S66
-rw-r--r--libgcc/config/rl78/t-rl783
3 files changed, 73 insertions, 1 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index dddf837aad3..f27ea4fd79c 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,5 +1,10 @@
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
+ * config/rl78/anddi3.S: New assembly file.
+ * config/rl78/t-rl78: Added anddi3.S to LIB2ADD.
+
+2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
+
* config/rl78/umindi3.S: New assembly file.
* config/rl78/t-rl78: Added umindi3.S to LIB2ADD.
diff --git a/libgcc/config/rl78/anddi3.S b/libgcc/config/rl78/anddi3.S
new file mode 100644
index 00000000000..849d4005d35
--- /dev/null
+++ b/libgcc/config/rl78/anddi3.S
@@ -0,0 +1,66 @@
+; Copyright (C) 2017 Free Software Foundation, Inc.
+; Contributed by Sebastian Perta.
+;
+; This file 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.
+;
+; This file 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/>.
+
+
+#include "vregs.h"
+
+ .text
+
+START_FUNC ___anddi3
+
+ movw hl, sp
+
+ mov a, [hl+4]
+ and a, [hl+12]
+ mov r8, a
+
+ mov a, [hl+5]
+ and a, [hl+13]
+ mov r9, a
+
+ mov a, [hl+6]
+ and a, [hl+14]
+ mov r10, a
+
+ mov a, [hl+7]
+ and a, [hl+15]
+ mov r11, a
+
+ mov a, [hl+8]
+ and a, [hl+16]
+ mov r12, a
+
+ mov a, [hl+9]
+ and a, [hl+17]
+ mov r13, a
+
+ mov a, [hl+10]
+ and a, [hl+18]
+ mov r14, a
+
+ mov a, [hl+11]
+ and a, [hl+19]
+ mov r15, a
+
+ ret
+
+END_FUNC ___anddi3
diff --git a/libgcc/config/rl78/t-rl78 b/libgcc/config/rl78/t-rl78
index 1e9a029e9f5..c9eddd92a6b 100644
--- a/libgcc/config/rl78/t-rl78
+++ b/libgcc/config/rl78/t-rl78
@@ -36,7 +36,8 @@ LIB2ADD = \
$(srcdir)/config/rl78/umindi3.S \
$(srcdir)/config/rl78/umaxdi3.S \
$(srcdir)/config/rl78/smindi3.S \
- $(srcdir)/config/rl78/smaxdi3.S
+ $(srcdir)/config/rl78/smaxdi3.S \
+ $(srcdir)/config/rl78/anddi3.S
LIB2FUNCS_EXCLUDE = _clzhi2 _clzsi2 _ctzhi2 _ctzsi2 \
_popcounthi2 _popcountsi2 \