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
24092242
Commit
24092242
authored
Jun 06, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(const_method): Do not synthesize long constants with byte or word
operations with TARGET_5200. From-SVN: r12181
parent
106bee4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
gcc/config/m68k/m68k.c
+20
-14
No files found.
gcc/config/m68k/m68k.c
View file @
24092242
...
...
@@ -1066,20 +1066,26 @@ const_method (constant)
i
=
INTVAL
(
constant
);
if
(
USE_MOVQ
(
i
))
return
MOVQ
;
/* if -256 < N < 256 but N is not in range for a moveq
N^ff will be, so use moveq #N^ff, dreg; not.b dreg. */
if
(
USE_MOVQ
(
i
^
0xff
))
return
NOTB
;
/* Likewise, try with not.w */
if
(
USE_MOVQ
(
i
^
0xffff
))
return
NOTW
;
/* This is the only value where neg.w is useful */
if
(
i
==
-
65408
)
return
NEGW
;
/* Try also with swap */
u
=
i
;
if
(
USE_MOVQ
((
u
>>
16
)
|
(
u
<<
16
)))
return
SWAP
;
/* The Coldfire doesn't have byte or word operations. */
/* FIXME: This may not be useful for the m68060 either */
if
(
!
TARGET_5200
)
{
/* if -256 < N < 256 but N is not in range for a moveq
N^ff will be, so use moveq #N^ff, dreg; not.b dreg. */
if
(
USE_MOVQ
(
i
^
0xff
))
return
NOTB
;
/* Likewise, try with not.w */
if
(
USE_MOVQ
(
i
^
0xffff
))
return
NOTW
;
/* This is the only value where neg.w is useful */
if
(
i
==
-
65408
)
return
NEGW
;
/* Try also with swap */
u
=
i
;
if
(
USE_MOVQ
((
u
>>
16
)
|
(
u
<<
16
)))
return
SWAP
;
}
/* Otherwise, use move.l */
return
MOVL
;
}
...
...
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