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
97aea203
Commit
97aea203
authored
Jun 28, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(alpha_emit_set_long_const): New function.
From-SVN: r12358
parent
d0f8fcea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
gcc/config/alpha/alpha.c
+58
-0
No files found.
gcc/config/alpha/alpha.c
View file @
97aea203
...
@@ -965,6 +965,64 @@ alpha_emit_set_const_1 (target, mode, c, n)
...
@@ -965,6 +965,64 @@ alpha_emit_set_const_1 (target, mode, c, n)
return
0
;
return
0
;
}
}
#if HOST_BITS_PER_WIDE_INT == 64
/* Having failed to find a 3 insn sequence in alpha_emit_set_const,
fall back to a straight forward decomposition. We do this to avoid
exponential run times encountered when looking for longer sequences
with alpha_emit_set_const. */
rtx
alpha_emit_set_long_const
(
target
,
c
)
rtx
target
;
HOST_WIDE_INT
c
;
{
/* Use a pseudo if highly optimizing and still generating RTL. */
rtx
subtarget
=
(
flag_expensive_optimizations
&&
rtx_equal_function_value_matters
?
0
:
target
);
HOST_WIDE_INT
d1
,
d2
,
d3
,
d4
;
rtx
r
;
/* Decompose the entire word */
d1
=
((
c
&
0xffff
)
^
0x8000
)
-
0x8000
;
c
-=
d1
;
d2
=
((
c
&
0xffffffff
)
^
0x80000000
)
-
0x80000000
;
c
=
(
c
-
d2
)
>>
32
;
d3
=
((
c
&
0xffff
)
^
0x8000
)
-
0x8000
;
c
-=
d3
;
d4
=
((
c
&
0xffffffff
)
^
0x80000000
)
-
0x80000000
;
if
(
c
-
d4
!=
0
)
abort
();
/* Construct the high word */
if
(
d3
==
0
)
r
=
copy_to_suggested_reg
(
GEN_INT
(
d4
),
subtarget
,
DImode
);
else
if
(
d4
==
0
)
r
=
copy_to_suggested_reg
(
GEN_INT
(
d3
),
subtarget
,
DImode
);
else
r
=
expand_binop
(
DImode
,
add_optab
,
GEN_INT
(
d3
),
GEN_INT
(
d4
),
subtarget
,
0
,
OPTAB_WIDEN
);
/* Shift it into place */
r
=
expand_binop
(
DImode
,
ashl_optab
,
r
,
GEN_INT
(
32
),
subtarget
,
0
,
OPTAB_WIDEN
);
/* Add in the low word */
if
(
d2
!=
0
)
r
=
expand_binop
(
DImode
,
add_optab
,
r
,
GEN_INT
(
d2
),
subtarget
,
0
,
OPTAB_WIDEN
);
if
(
d1
!=
0
)
r
=
expand_binop
(
DImode
,
add_optab
,
r
,
GEN_INT
(
d1
),
subtarget
,
0
,
OPTAB_WIDEN
);
if
(
subtarget
==
0
)
r
=
copy_to_suggested_reg
(
r
,
target
,
DImode
);
return
r
;
}
#endif
/* HOST_BITS_PER_WIDE_INT == 64 */
/* Rewrite a comparison against zero CMP of the form
/* Rewrite a comparison against zero CMP of the form
(CODE (cc0) (const_int 0)) so it can be written validly in
(CODE (cc0) (const_int 0)) so it can be written validly in
a conditional move (if_then_else CMP ...).
a conditional move (if_then_else CMP ...).
...
...
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