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
412381d9
Commit
412381d9
authored
Jul 13, 1994
by
Torbjorn Granlund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_divmod, case CEIL_DIV_EXPR): Handle emit_store_flag returning 0.
From-SVN: r7768
parent
24a13950
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
gcc/expmed.c
+16
-4
No files found.
gcc/expmed.c
View file @
412381d9
...
...
@@ -3132,16 +3132,28 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
unsigned
HOST_WIDE_INT
d
=
INTVAL
(
op1
);
t1
=
expand_shift
(
RSHIFT_EXPR
,
compute_mode
,
op0
,
build_int_2
(
floor_log2
(
d
),
0
),
NULL_RTX
,
1
);
tquotient
,
1
);
t2
=
expand_binop
(
compute_mode
,
and_optab
,
op0
,
GEN_INT
(
d
-
1
),
NULL_RTX
,
1
,
OPTAB_LIB_WIDEN
);
t3
=
gen_reg_rtx
(
compute_mode
);
t3
=
emit_store_flag
(
t3
,
NE
,
t2
,
const0_rtx
,
compute_mode
,
1
,
1
);
quotient
=
force_operand
(
gen_rtx
(
PLUS
,
compute_mode
,
t1
,
t3
),
tquotient
);
if
(
t3
==
0
)
{
rtx
lab
;
lab
=
gen_label_rtx
();
emit_cmp_insn
(
t2
,
const0_rtx
,
EQ
,
NULL_RTX
,
compute_mode
,
0
,
0
);
emit_jump_insn
(
gen_beq
(
lab
));
expand_inc
(
t1
,
const1_rtx
);
emit_label
(
lab
);
quotient
=
t1
;
}
else
quotient
=
force_operand
(
gen_rtx
(
PLUS
,
compute_mode
,
t1
,
t3
),
tquotient
);
break
;
}
...
...
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