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
8a6f8129
Commit
8a6f8129
authored
Dec 06, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_binop): Correct sign of complex quotient imagpart.
From-SVN: r2843
parent
67aac05d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
gcc/optabs.c
+13
-13
No files found.
gcc/optabs.c
View file @
8a6f8129
...
...
@@ -969,17 +969,17 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
if
(
res
!=
imagr
)
emit_move_insn
(
imagr
,
res
);
}
else
/* Divi
de
r is of complex type */
else
/* Divi
so
r is of complex type */
{
/* X/(a+ib) */
rtx
divi
de
r
;
rtx
divi
so
r
;
rtx
real_t
;
rtx
imag_t
;
optab
mulopt
=
unsignedp
?
umul_widen_optab
:
smul_optab
;
/* Divi
der: a*a + b*b
*/
divi
de
r
=
expand_binop
(
submode
,
add_optab
,
/* Divi
sor: c*c + d*d
*/
divi
so
r
=
expand_binop
(
submode
,
add_optab
,
expand_binop
(
submode
,
mulopt
,
real1
,
real1
,
0
,
unsignedp
,
methods
),
...
...
@@ -988,9 +988,9 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
0
,
unsignedp
,
methods
),
0
,
unsignedp
,
methods
);
if
(
!
imag0
)
/* ((
c)(a-ib))/divide
r */
{
/* Calculate the dividen
t
*/
if
(
!
imag0
)
/* ((
a)(c-id))/diviso
r */
{
/* (a+i0) / (c+id) = (ac/(cc+dd)) + i(-ad/(cc+dd)) */
/* Calculate the dividen
d
*/
real_t
=
expand_binop
(
submode
,
mulopt
,
real0
,
real1
,
0
,
unsignedp
,
methods
);
...
...
@@ -1000,9 +1000,9 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
0
,
unsignedp
,
methods
),
0
,
unsignedp
);
}
else
/* ((
c+id)(a-ib
))/divider */
else
/* ((
a+ib)(c-id
))/divider */
{
/* Calculate the dividen
t
*/
/* Calculate the dividen
d
*/
real_t
=
expand_binop
(
submode
,
add_optab
,
expand_binop
(
submode
,
mulopt
,
real0
,
real1
,
...
...
@@ -1014,21 +1014,21 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
imag_t
=
expand_binop
(
submode
,
sub_optab
,
expand_binop
(
submode
,
mulopt
,
real0
,
imag
1
,
imag0
,
real
1
,
0
,
unsignedp
,
methods
),
expand_binop
(
submode
,
mulopt
,
real
1
,
imag0
,
real
0
,
imag1
,
0
,
unsignedp
,
methods
),
0
,
unsignedp
,
methods
);
}
res
=
expand_binop
(
submode
,
binoptab
,
real_t
,
divi
de
r
,
res
=
expand_binop
(
submode
,
binoptab
,
real_t
,
divi
so
r
,
realr
,
unsignedp
,
methods
);
if
(
res
!=
realr
)
emit_move_insn
(
realr
,
res
);
res
=
expand_binop
(
submode
,
binoptab
,
imag_t
,
divi
de
r
,
res
=
expand_binop
(
submode
,
binoptab
,
imag_t
,
divi
so
r
,
imagr
,
unsignedp
,
methods
);
if
(
res
!=
imagr
)
emit_move_insn
(
imagr
,
res
);
...
...
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