Skip to content

Commit 2143233

Browse files
clazissartemiy-volkov
authored andcommitted
[ARCx] LIBGCC attempt adding configuration
1 parent 3679147 commit 2143233

File tree

2 files changed

+64
-3
lines changed

2 files changed

+64
-3
lines changed

libgcc/config.host

+9-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,12 @@ amdgcn*-*-*)
9595
cpu_type=gcn
9696
tmake_file="${tmake_file} t-softfp-sfdf t-softfp"
9797
;;
98-
arc*-*-*)
98+
arc[be]*-*-*)
9999
cpu_type=arc
100100
;;
101+
arc64-*-*)
102+
cpu_type=arc64
103+
;;
101104
arm*-*-*)
102105
cpu_type=arm
103106
;;
@@ -494,17 +497,20 @@ amdgcn*-*-amdhsa)
494497
tmake_file="$tmake_file gcn/t-amdgcn"
495498
extra_parts="crt0.o"
496499
;;
497-
arc*-*-elf*)
500+
arc[eb]*-*-elf*)
498501
tmake_file="arc/t-arc"
499502
extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o"
500503
extra_parts="$extra_parts crttls.o"
501504
;;
502-
arc*-*-linux*)
505+
arc[eb]*-*-linux*)
503506
tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc-uClibc arc/t-arc"
504507
extra_parts="$extra_parts crti.o crtn.o"
505508
extra_parts="$extra_parts crttls.o"
506509
md_unwind_header=arc/linux-unwind.h
507510
;;
511+
arc64-*-elf)
512+
tmake_file="${tmake_file} t-softfp-sfdf t-softfp"
513+
;;
508514
arm-wrs-vxworks7*)
509515
tmake_file="$tmake_file arm/t-arm arm/t-elf arm/t-bpabi arm/t-vxworks7"
510516
tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"

libgcc/config/arc64/sfp-machine.h

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#define _FP_W_TYPE_SIZE 64
2+
#define _FP_W_TYPE unsigned long long
3+
#define _FP_WS_TYPE signed long long
4+
#define _FP_I_TYPE long long
5+
6+
#define _FP_MUL_MEAT_S(R,X,Y) \
7+
_FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y)
8+
#define _FP_MUL_MEAT_D(R,X,Y) \
9+
_FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
10+
#define _FP_MUL_MEAT_Q(R,X,Y) \
11+
_FP_MUL_MEAT_2_wide_3mul(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
12+
13+
#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm)
14+
#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y)
15+
#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
16+
17+
#define _FP_NANFRAC_S _FP_QNANBIT_S
18+
#define _FP_NANFRAC_D _FP_QNANBIT_D
19+
#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0
20+
21+
typedef int TItype __attribute__ ((mode (TI)));
22+
typedef unsigned int UTItype __attribute__ ((mode (TI)));
23+
#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype))
24+
25+
/* The type of the result of a floating point comparison. This must
26+
match __libgcc_cmp_return__ in GCC for the target. */
27+
typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
28+
#define CMPtype __gcc_CMPtype
29+
30+
#define _FP_NANSIGN_S 0
31+
#define _FP_NANSIGN_D 0
32+
#define _FP_NANSIGN_Q 0
33+
34+
#define _FP_KEEPNANFRACP 0
35+
#define _FP_QNANNEGATEDP 0
36+
37+
#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
38+
do { \
39+
R##_s = _FP_NANSIGN_##fs; \
40+
_FP_FRAC_SET_##wc(R,_FP_NANFRAC_##fs); \
41+
R##_c = FP_CLS_NAN; \
42+
} while (0)
43+
44+
/* Not checked. */
45+
#define _FP_TININESS_AFTER_ROUNDING 0
46+
47+
#define __LITTLE_ENDIAN 1234
48+
#define __BIG_ENDIAN 4321
49+
50+
# define __BYTE_ORDER __LITTLE_ENDIAN
51+
52+
/* Define ALIASNAME as a strong alias for NAME. */
53+
# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
54+
# define _strong_alias(name, aliasname) \
55+
extern __typeof (name) aliasname __attribute__ ((alias (#name)));

0 commit comments

Comments
 (0)