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
b74cf1ce
Commit
b74cf1ce
authored
Sep 08, 2001
by
Jan Hubicka
Committed by
Jan Hubicka
Sep 08, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* reg-stack.c (subst_stack_regs_pat): Fix fcmov reversal code.
From-SVN: r45490
parent
718fd87e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
gcc/ChangeLog
+4
-0
gcc/reg-stack.c
+15
-19
No files found.
gcc/ChangeLog
View file @
b74cf1ce
Sat
Sep
8
22
:
00
:
55
CEST
2001
Jan
Hubicka
<
jh
@suse
.
cz
>
*
reg
-
stack
.
c
(
subst_stack_regs_pat
)
:
Fix
fcmov
reversal
code
.
2001
-
09
-
08
Andreas
Jaeger
<
aj
@suse
.
de
>
*
i386
.
h
(
TARGET_SWITCHES
)
:
Fix
description
.
...
...
gcc/reg-stack.c
View file @
b74cf1ce
...
...
@@ -1797,20 +1797,18 @@ subst_stack_regs_pat (insn, regstack, pat)
||
(
REGNO
(
*
src2
)
==
regstack
->
reg
[
regstack
->
top
]
&&
src2_note
))
{
/* We know that both sources "dies", as one dies and other
is overwriten by the destination. Claim both sources
to be dead, as the code bellow will properly pop the
non-top-of-stack note and replace top-of-stack by the
result by popping source first and then pushing result. */
if
(
!
src1_note
)
src1_note
=
REG_NOTES
(
insn
)
=
gen_rtx_EXPR_LIST
(
REG_DEAD
,
*
src1
,
REG_NOTES
(
insn
));
if
(
!
src2_note
)
src2_note
=
REG_NOTES
(
insn
)
=
gen_rtx_EXPR_LIST
(
REG_DEAD
,
*
src2
,
REG_NOTES
(
insn
));
/* i386 do have comparison always reversible. */
int
idx1
=
(
get_hard_regnum
(
regstack
,
*
src1
)
-
FIRST_STACK_REG
);
int
idx2
=
(
get_hard_regnum
(
regstack
,
*
src2
)
-
FIRST_STACK_REG
);
/* Make reg-stack believe that the operands are already
swapped on the stack */
regstack
->
reg
[
regstack
->
top
-
idx1
]
=
REGNO
(
*
src2
);
regstack
->
reg
[
regstack
->
top
-
idx2
]
=
REGNO
(
*
src1
);
/* Reverse condition to compensate the operand swap.
i386 do have comparison always reversible. */
PUT_CODE
(
XEXP
(
pat_src
,
0
),
reversed_comparison_code
(
XEXP
(
pat_src
,
0
),
insn
));
}
...
...
@@ -1845,11 +1843,9 @@ subst_stack_regs_pat (insn, regstack, pat)
EMIT_AFTER
);
}
else
{
CLEAR_HARD_REG_BIT
(
regstack
->
reg_set
,
regno
);
replace_reg
(
&
XEXP
(
src_note
[
i
],
0
),
FIRST_STACK_REG
);
regstack
->
top
--
;
}
/* Top of stack never dies, as it is the
destination. */
abort
();
}
}
...
...
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