summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-16 21:15:46 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-16 21:15:46 +0000
commitc5a0ae5e13c60a19a053a901e505ac71c05f5a82 (patch)
treeca39e481d4043f5d69add06ef190a5ec3d62d059 /libgcc
parent043115ec2d2ce23d00b19598983d622d2d921e9c (diff)
downloadgcc-c5a0ae5e13c60a19a053a901e505ac71c05f5a82.tar.gz
* config/rl78/rl78.c (rl78_asm_file_start): Specify alternate
vregs location for RL78/G10. (rl78_expand_prologue): Avoid SEL on G10. (rl78_expand_epilogue): Likewise. (rl78_peep_movhi_p): Can't move a constant to memory in HImode. * config/rl78/rl78.h (TARGET_CPU_CPP_BUILTINS): Define __RL78_G10__ when appropriate. (ASM_SPEC): Pass -mg10 along to the assembler. * config/rl78/rl78.md (sel_rb): Disable for G10. * config/rl78/rl78.opt: Add -mg10 option. * config/rl78/t-rl78: Add -mg10 multilib. * config/rl78/lib2mul.c: Enable for RL78/G10. * config/rl78/lib2div.c: Likewise. * config/rl78/lshrsi3.S: Use vregs.h. * config/rl78/cmpsi2.S: Likewise. * config/rl78/trampoline.S: Likewise. * config/rl78/mulsi2.S: Likewise. Disable for RL78/G10. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202637 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog9
-rw-r--r--libgcc/config/rl78/cmpsi2.S3
-rw-r--r--libgcc/config/rl78/lib2div.c2
-rw-r--r--libgcc/config/rl78/lib2mul.c15
-rw-r--r--libgcc/config/rl78/lshrsi3.S17
-rw-r--r--libgcc/config/rl78/mulsi3.S37
-rw-r--r--libgcc/config/rl78/trampoline.S4
7 files changed, 35 insertions, 52 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 518a26c9470..728360ca8cc 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,12 @@
+2013-09-16 DJ Delorie <dj@redhat.com>
+
+ * config/rl78/lib2mul.c: Enable for RL78/G10.
+ * config/rl78/lib2div.c: Likewise.
+ * config/rl78/lshrsi3.S: Use vregs.h.
+ * config/rl78/cmpsi2.S: Likewise.
+ * config/rl78/trampoline.S: Likewise.
+ * config/rl78/mulsi2.S: Likewise. Disable for RL78/G10.
+
2013-09-14 DJ Delorie <dj@redhat.com>
Nick Clifton <nickc@redhat.com>
diff --git a/libgcc/config/rl78/cmpsi2.S b/libgcc/config/rl78/cmpsi2.S
index d815793daba..7fdc76a03f6 100644
--- a/libgcc/config/rl78/cmpsi2.S
+++ b/libgcc/config/rl78/cmpsi2.S
@@ -21,8 +21,7 @@
; <http://www.gnu.org/licenses/>.
-; clobberable
-r8 = 0xffef0
+#include "vregs.h"
.text
diff --git a/libgcc/config/rl78/lib2div.c b/libgcc/config/rl78/lib2div.c
index 4b5033ef970..b37f55a94ac 100644
--- a/libgcc/config/rl78/lib2div.c
+++ b/libgcc/config/rl78/lib2div.c
@@ -34,7 +34,7 @@ typedef int word_type __attribute__ ((mode (__word__)));
#define C3B(a,b,c) a##b##c
#define C3(a,b,c) C3B(a,b,c)
-#if 0
+#ifdef __RL78_G10__
#define UINT_TYPE uint32_type
#define SINT_TYPE sint32_type
diff --git a/libgcc/config/rl78/lib2mul.c b/libgcc/config/rl78/lib2mul.c
index 6460f9e69db..fee50817722 100644
--- a/libgcc/config/rl78/lib2mul.c
+++ b/libgcc/config/rl78/lib2mul.c
@@ -30,12 +30,25 @@ typedef unsigned int uint08_type __attribute__ ((mode (QI)));
#define C3B(a,b,c) a##b##c
#define C3(a,b,c) C3B(a,b,c)
+#ifdef __RL78_G10__
+
+#define UINT_TYPE uint32_type
+#define BITS_MINUS_1 31
+#define NAME_MODE si
+
+#include "rl78-mul.h"
+
+#undef UINT_TYPE
+#undef BITS_MINUS_1
+#undef NAME_MODE
#define UINT_TYPE uint16_type
#define BITS_MINUS_1 15
#define NAME_MODE hi
-/*#include "rl78-mul.h"*/
+#include "rl78-mul.h"
+
+#endif
#undef UINT_TYPE
#undef BITS_MINUS_1
diff --git a/libgcc/config/rl78/lshrsi3.S b/libgcc/config/rl78/lshrsi3.S
index 1ee7325143f..8bd997897aa 100644
--- a/libgcc/config/rl78/lshrsi3.S
+++ b/libgcc/config/rl78/lshrsi3.S
@@ -20,22 +20,7 @@
; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
; <http://www.gnu.org/licenses/>.
-r8 = 0xffef0
-r16 = 0xffee8
-r9 = 0xffef1
-r17 = 0xffee9
-r10 = 0xffef2
-r18 = 0xffeea
-r11 = 0xffef3
-r19 = 0xffeeb
-r12 = 0xffef4
-r20 = 0xffeec
-r13 = 0xffef5
-r21 = 0xffeed
-r14 = 0xffef6
-r22 = 0xffeee
-r15 = 0xffef7
-r23 = 0xffeef
+#include "vregs.h"
.text
.global ___lshrsi3
diff --git a/libgcc/config/rl78/mulsi3.S b/libgcc/config/rl78/mulsi3.S
index 012e87e285f..1ce45ba3402 100644
--- a/libgcc/config/rl78/mulsi3.S
+++ b/libgcc/config/rl78/mulsi3.S
@@ -22,35 +22,12 @@
;; 32x32=32 multiply
-; real
-; GAS defines r0..r7 as aliases for real registers; we want the saddr
-; forms here.
-r_0 = 0xffef8
-r_1 = 0xffef9
-r_2 = 0xffefa
-r_3 = 0xffefb
-r_4 = 0xffefc
-r_5 = 0xffefd
-r_6 = 0xffefe
-r_7 = 0xffeff
-; clobberable
-r8 = 0xffef0
-r9 = 0xffef1
-r10 = 0xffef2
-r11 = 0xffef3
-r12 = 0xffef4
-r13 = 0xffef5
-r14 = 0xffef6
-r15 = 0xffef7
-; preserved
-r16 = 0xffee8
-r17 = 0xffee9
-r18 = 0xffeea
-r19 = 0xffeeb
-r20 = 0xffeec
-r21 = 0xffeed
-r22 = 0xffeee
-r23 = 0xffeef
+#include "vregs.h"
+
+; the G10 only has one register bank, so cannot use these optimized
+; versions. Use the C version instead.
+
+#ifndef __RL78_G10__
;----------------------------------------------------------------------
@@ -221,3 +198,5 @@ ___mulhi3:
.Lmul_hi_done:
ret
+
+#endif
diff --git a/libgcc/config/rl78/trampoline.S b/libgcc/config/rl78/trampoline.S
index b15b0d361e2..59d429eb589 100644
--- a/libgcc/config/rl78/trampoline.S
+++ b/libgcc/config/rl78/trampoline.S
@@ -32,9 +32,7 @@
*/
-r8 = 0xffef0
-r10 = 0xffef2
-r14 = 0xffef6
+#include "vregs.h"
.data
.p2align 1