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
858e4e8c
Commit
858e4e8c
authored
Nov 20, 1997
by
Richard Henderson
Committed by
Jeff Law
Nov 20, 1997
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* alpha.c (alpha_emit_set_const_1): Handle narrow hosts better.
From-SVN: r16627
parent
a21d14e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
gcc/ChangeLog
+4
-0
gcc/config/alpha/alpha.c
+18
-7
No files found.
gcc/ChangeLog
View file @
858e4e8c
Thu Nov 20 16:11:50 1997 Richard Henderson <rth@cygnus.com>
* alpha.c (alpha_emit_set_const_1): Handle narrow hosts better.
Thu Nov 20 16:11:50 1997 Klaus Kaempf <kkaempf@progis.de>
Thu Nov 20 16:11:50 1997 Klaus Kaempf <kkaempf@progis.de>
* alpha/vms.h (ASM_OUTPUT_ADDR_VEC_ELT): Add an L for the local label
* alpha/vms.h (ASM_OUTPUT_ADDR_VEC_ELT): Add an L for the local label
...
...
gcc/config/alpha/alpha.c
View file @
858e4e8c
...
@@ -904,12 +904,10 @@ alpha_emit_set_const_1 (target, mode, c, n)
...
@@ -904,12 +904,10 @@ alpha_emit_set_const_1 (target, mode, c, n)
/* If this is a sign-extended 32-bit constant, we can do this in at most
/* If this is a sign-extended 32-bit constant, we can do this in at most
three insns, so do it if we have enough insns left. We always have
three insns, so do it if we have enough insns left. We always have
a sign-extended 32-bit constant when compiling on a narrow machine.
a sign-extended 32-bit constant when compiling on a narrow machine. */
Note that we cannot handle the constant 0x80000000. */
if
((
HOST_BITS_PER_WIDE_INT
!=
64
if
(
HOST_BITS_PER_WIDE_INT
!=
64
||
c
>>
31
==
-
1
||
c
>>
31
==
0
)
||
c
>>
31
==
-
1
||
c
>>
31
==
0
)
&&
c
!=
0x80000000U
)
{
{
HOST_WIDE_INT
low
=
(
c
&
0xffff
)
-
2
*
(
c
&
0x8000
);
HOST_WIDE_INT
low
=
(
c
&
0xffff
)
-
2
*
(
c
&
0x8000
);
HOST_WIDE_INT
tmp1
=
c
-
low
;
HOST_WIDE_INT
tmp1
=
c
-
low
;
...
@@ -928,7 +926,18 @@ alpha_emit_set_const_1 (target, mode, c, n)
...
@@ -928,7 +926,18 @@ alpha_emit_set_const_1 (target, mode, c, n)
}
}
if
(
c
==
low
||
(
low
==
0
&&
extra
==
0
))
if
(
c
==
low
||
(
low
==
0
&&
extra
==
0
))
return
copy_to_suggested_reg
(
GEN_INT
(
c
),
target
,
mode
);
{
/* We used to use copy_to_suggested_reg (GEN_INT (c), target, mode)
but that meant that we can't handle INT_MIN on 32-bit machines
(like NT/Alpha), because we recurse indefinitely through
emit_move_insn to gen_movdi. So instead, since we know exactly
what we want, create it explicitly. */
if
(
target
==
NULL
)
target
=
gen_reg_rtx
(
mode
);
emit_insn
(
gen_rtx
(
SET
,
VOIDmode
,
target
,
GEN_INT
(
c
)));
return
target
;
}
else
if
(
n
>=
2
+
(
extra
!=
0
))
else
if
(
n
>=
2
+
(
extra
!=
0
))
{
{
temp
=
copy_to_suggested_reg
(
GEN_INT
(
low
),
subtarget
,
mode
);
temp
=
copy_to_suggested_reg
(
GEN_INT
(
low
),
subtarget
,
mode
);
...
@@ -1006,9 +1015,11 @@ alpha_emit_set_const_1 (target, mode, c, n)
...
@@ -1006,9 +1015,11 @@ alpha_emit_set_const_1 (target, mode, c, n)
/* Now try high-order zero bits. Here we try the shifted-in bits as
/* Now try high-order zero bits. Here we try the shifted-in bits as
all zero and all ones. Be careful to avoid shifting outside the
all zero and all ones. Be careful to avoid shifting outside the
mode and to avoid shifting outside the host wide int size. */
mode and to avoid shifting outside the host wide int size. */
/* On narrow hosts, don't shift a 1 into the high bit, since we'll
confuse the recursive call and set all of the high 32 bits. */
if
((
bits
=
(
MIN
(
HOST_BITS_PER_WIDE_INT
,
GET_MODE_SIZE
(
mode
)
*
8
)
if
((
bits
=
(
MIN
(
HOST_BITS_PER_WIDE_INT
,
GET_MODE_SIZE
(
mode
)
*
8
)
-
floor_log2
(
c
)
-
1
))
>
0
)
-
floor_log2
(
c
)
-
1
-
(
HOST_BITS_PER_WIDE_INT
<
64
)
))
>
0
)
for
(;
bits
>
0
;
bits
--
)
for
(;
bits
>
0
;
bits
--
)
if
((
temp
=
alpha_emit_set_const
(
subtarget
,
mode
,
if
((
temp
=
alpha_emit_set_const
(
subtarget
,
mode
,
c
<<
bits
,
i
))
!=
0
c
<<
bits
,
i
))
!=
0
...
...
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