Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
0b8495ae
Commit
0b8495ae
authored
Mar 30, 2005
by
Fariborz Jahanian
Committed by
Fariborz Jahanian
Mar 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix problem with calling powi* builtins.
OKed by Richard Henderson. From-SVN: r97278
parent
63579539
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
gcc/ChangeLog
+9
-0
gcc/builtins.c
+8
-4
gcc/libgcc2.c
+4
-2
gcc/libgcc2.h
+6
-4
No files found.
gcc/ChangeLog
View file @
0b8495ae
2005-03-30 Fariborz Jahanian <fjahanian@apple.com>
* builtins.c (expand_builtin_powi): Fix mode of
2nd argument to match int.
* libgcc2.h (__powisf2, __powidf2, __powixf2, __powitf2): Change
2nd argument type to int.
* libgcc2.c: Change prototype of __powi* functions to use
int.
2005-03-30 Dale Johannesen <dalej@apple.com>
PR middle-end/19225
...
...
gcc/builtins.c
View file @
0b8495ae
...
...
@@ -2380,6 +2380,7 @@ expand_builtin_powi (tree exp, rtx target, rtx subtarget)
tree
arg0
,
arg1
;
rtx
op0
,
op1
;
enum
machine_mode
mode
;
enum
machine_mode
mode2
;
if
(
!
validate_arglist
(
arglist
,
REAL_TYPE
,
INTEGER_TYPE
,
VOID_TYPE
))
return
0
;
...
...
@@ -2411,19 +2412,22 @@ expand_builtin_powi (tree exp, rtx target, rtx subtarget)
/* Emit a libcall to libgcc. */
/* Mode of the 2nd argument must match that of an int. */
mode2
=
mode_for_size
(
INT_TYPE_SIZE
,
MODE_INT
,
0
);
if
(
target
==
NULL_RTX
)
target
=
gen_reg_rtx
(
mode
);
op0
=
expand_expr
(
arg0
,
subtarget
,
mode
,
0
);
if
(
GET_MODE
(
op0
)
!=
mode
)
op0
=
convert_to_mode
(
mode
,
op0
,
0
);
op1
=
expand_expr
(
arg1
,
0
,
word_mode
,
0
);
if
(
GET_MODE
(
op1
)
!=
word_mode
)
op1
=
convert_to_mode
(
word_mode
,
op1
,
0
);
op1
=
expand_expr
(
arg1
,
0
,
mode2
,
0
);
if
(
GET_MODE
(
op1
)
!=
mode2
)
op1
=
convert_to_mode
(
mode2
,
op1
,
0
);
target
=
emit_library_call_value
(
powi_optab
->
handlers
[(
int
)
mode
].
libfunc
,
target
,
LCT_CONST_MAKE_BLOCK
,
mode
,
2
,
op0
,
mode
,
op1
,
word_mode
);
op0
,
mode
,
op1
,
mode2
);
return
target
;
}
...
...
gcc/libgcc2.c
View file @
0b8495ae
...
...
@@ -1538,10 +1538,12 @@ __fixunssfSI (SFtype a)
# define NAME __powitf2
# endif
#undef int
#undef unsigned
TYPE
NAME
(
TYPE
x
,
Wtype
m
)
NAME
(
TYPE
x
,
int
m
)
{
UWtype
n
=
m
<
0
?
-
m
:
m
;
unsigned
int
n
=
m
<
0
?
-
m
:
m
;
TYPE
y
=
n
%
2
?
x
:
1
;
while
(
n
>>=
1
)
{
...
...
gcc/libgcc2.h
View file @
0b8495ae
...
...
@@ -314,12 +314,13 @@ extern SItype __mulvsi3 (SItype, SItype);
extern
SItype
__negvsi2
(
SItype
);
#endif
/* COMPAT_SIMODE_TRAPPING_ARITHMETIC */
#undef int
#if LIBGCC2_HAS_SF_MODE
extern
DWtype
__fixsfdi
(
SFtype
);
extern
SFtype
__floatdisf
(
DWtype
);
extern
UWtype
__fixunssfSI
(
SFtype
);
extern
DWtype
__fixunssfDI
(
SFtype
);
extern
SFtype
__powisf2
(
SFtype
,
Wtype
);
extern
SFtype
__powisf2
(
SFtype
,
int
);
extern
SCtype
__divsc3
(
SFtype
,
SFtype
,
SFtype
,
SFtype
);
extern
SCtype
__mulsc3
(
SFtype
,
SFtype
,
SFtype
,
SFtype
);
#endif
...
...
@@ -328,7 +329,7 @@ extern DWtype __fixdfdi (DFtype);
extern
DFtype
__floatdidf
(
DWtype
);
extern
UWtype
__fixunsdfSI
(
DFtype
);
extern
DWtype
__fixunsdfDI
(
DFtype
);
extern
DFtype
__powidf2
(
DFtype
,
Wtype
);
extern
DFtype
__powidf2
(
DFtype
,
int
);
extern
DCtype
__divdc3
(
DFtype
,
DFtype
,
DFtype
,
DFtype
);
extern
DCtype
__muldc3
(
DFtype
,
DFtype
,
DFtype
,
DFtype
);
#endif
...
...
@@ -338,7 +339,7 @@ extern DWtype __fixxfdi (XFtype);
extern
DWtype
__fixunsxfDI
(
XFtype
);
extern
XFtype
__floatdixf
(
DWtype
);
extern
UWtype
__fixunsxfSI
(
XFtype
);
extern
XFtype
__powixf2
(
XFtype
,
Wtype
);
extern
XFtype
__powixf2
(
XFtype
,
int
);
extern
XCtype
__divxc3
(
XFtype
,
XFtype
,
XFtype
,
XFtype
);
extern
XCtype
__mulxc3
(
XFtype
,
XFtype
,
XFtype
,
XFtype
);
#endif
...
...
@@ -347,10 +348,11 @@ extern XCtype __mulxc3 (XFtype, XFtype, XFtype, XFtype);
extern
DWtype
__fixunstfDI
(
TFtype
);
extern
DWtype
__fixtfdi
(
TFtype
);
extern
TFtype
__floatditf
(
DWtype
);
extern
TFtype
__powitf2
(
TFtype
,
Wtype
);
extern
TFtype
__powitf2
(
TFtype
,
int
);
extern
TCtype
__divtc3
(
TFtype
,
TFtype
,
TFtype
,
TFtype
);
extern
TCtype
__multc3
(
TFtype
,
TFtype
,
TFtype
,
TFtype
);
#endif
#define int bogus_type
/* DWstructs are pairs of Wtype values in the order determined by
LIBGCC2_WORDS_BIG_ENDIAN. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment