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
5bf13618
Commit
5bf13618
authored
Mar 25, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(movsi): New strategy for moving small constants into dregs, if it
can't be done with moveq. From-SVN: r6902
parent
3d0f0ad0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
35 deletions
+8
-35
gcc/config/m68k/m68k.md
+8
-35
No files found.
gcc/config/m68k/m68k.md
View file @
5bf13618
...
@@ -763,45 +763,18 @@
...
@@ -763,45 +763,18 @@
return
\"
moveq %1,%0
\"
;
return
\"
moveq %1,%0
\"
;
#endif
#endif
}
}
#ifndef NO_ADDSUB_Q
else if (DATA_REG_P (operands
[
0
]
)
/
* Do this with a moveq #N-8, dreg; addq #8,dreg *
/
&& INTVAL (operands
[
1
]
) < 136
&& INTVAL (operands
[
1
]
) >= 128)
{
operands
[
1
]
= gen_rtx (CONST_INT, VOIDmode, INTVAL (operands
[
1
]
) - 8);
#if defined(MOTOROLA) && !defined(CRDS)
return
\"
moveq%.l %1,%0
\;
addq%.w %#8,%0
\"
;
#else
return
\"
moveq %1,%0
\;
addq%.w %#8,%0
\"
;
#endif
}
else if (DATA_REG_P (operands
[
0
]
)
else if (DATA_REG_P (operands
[
0
]
)
/
* Do this with a moveq #N+8, dreg; subq #8,dreg *
/
/
*
if -256 < N < 256 but N is not in range for a moveq
&& INTVAL (operands
[
1
]
) < -128
N^ff will be, so use moveq #N^ff, dreg; not.b dreg.
*
/
&& INTVAL (operands
[
1
]
) >= -136)
&& INTVAL (operands
[
1
]
) < 256
&& INTVAL (operands
[
1
]
) >= -256)
{
{
operands
[
1
]
= gen_rtx (CONST_INT, VOIDmode, INTVAL (operands
[
1
]
)
+ 8
);
operands
[
1
]
= gen_rtx (CONST_INT, VOIDmode, INTVAL (operands
[
1
]
)
^ 0xff
);
#if defined(MOTOROLA) && !defined(CRDS)
#if defined(MOTOROLA) && !defined(CRDS)
return
\"
moveq%.l %1,%0
;subq%.w %#8,
%0
\"
;
return
\"
moveq%.l %1,%0
\;
not%.b
%0
\"
;
#else
#else
return
\"
moveq %1,%0;subq%.w %#8,%0
\"
;
return
\"
moveq %1,%0
\;
not%.b %0
\"
;
#endif
#endif
}
#endif
else if (DATA_REG_P (operands
[
0
]
)
/
*
If N is in the right range and is even, then use
moveq #N/2, dreg; addl dreg,dreg
*
/
&& INTVAL (operands
[
1
]
) > 127
&& INTVAL (operands
[
1
]
) <= 254
&& INTVAL (operands
[
1
]
) % 2 == 0)
{
operands
[
1
]
= gen_rtx (CONST_INT, VOIDmode, INTVAL (operands
[
1
]
) / 2);
#if defined(MOTOROLA) && !defined(CRDS)
return
\"
moveq%.l %1,%0
\;
add%.w %0,%0
\"
;
#else
return
\"
moveq %1,%0
\;
add%.w %0,%0
\"
;
#endif
}
}
else if (ADDRESS_REG_P (operands
[
0
]
)
else if (ADDRESS_REG_P (operands
[
0
]
)
&& INTVAL (operands
[
1
]
) < 0x8000
&& INTVAL (operands
[
1
]
) < 0x8000
...
...
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