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
75874af9
Commit
75874af9
authored
Feb 06, 2000
by
Kaveh R. Ghazi
Committed by
Kaveh Ghazi
Feb 06, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* longlong.h [sparc] (udiv_qrnnd): Avoid stringifying macro arg.
From-SVN: r31814
parent
5ca1627b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
gcc/ChangeLog
+4
-0
gcc/longlong.h
+12
-12
No files found.
gcc/ChangeLog
View file @
75874af9
2000
-
02
-
05
Kaveh
R
.
Ghazi
<
ghazi
@caip
.
rutgers
.
edu
>
*
longlong
.
h
[
sparc
]
(
udiv_qrnnd
)
:
Avoid
stringifying
macro
arg
.
2000
-
02
-
05
Kaveh
R
.
Ghazi
<
ghazi
@caip
.
rutgers
.
edu
>
*
Makefile
.
in
(
c
-
common
.
o
)
:
Depend
on
$
(
EXPR_H
).
*
c
-
common
.
c
:
Include
expr
.
h
.
...
...
gcc/longlong.h
View file @
75874af9
...
...
@@ -1024,13 +1024,13 @@ UDItype __umulsidi3 (USItype, USItype);
"
=
r
" ((USItype) (w0)) \
: "
r
" ((USItype) (u)), \
"
r
" ((USItype) (v)))
#define udiv_qrnnd(
q, r, n1, n0,
d) \
#define udiv_qrnnd(
__q, __r, __n1, __n0, __
d) \
__asm__ ("
mov
%
2
,
%%
y
;
nop
;
nop
;
nop
;
udiv
%
3
,
%
4
,
%
0
;
umul
%
0
,
%
4
,
%
1
;
sub
%
3
,
%
1
,
%
1
"\
: "
=&
r
" ((USItype) (q)), \
"
=&
r
" ((USItype) (r)) \
: "
r
" ((USItype) (n1)), \
"
r
" ((USItype) (n0)), \
"
r
" ((USItype) (d)))
: "
=&
r
" ((USItype) (
__
q)), \
"
=&
r
" ((USItype) (
__
r)) \
: "
r
" ((USItype) (
__
n1)), \
"
r
" ((USItype) (
__
n0)), \
"
r
" ((USItype) (
__
d)))
#else
#if defined (__sparclite__)
/* This has hardware multiply but not divide. It also has two additional
...
...
@@ -1149,7 +1149,7 @@ UDItype __umulsidi3 (USItype, USItype);
#define UMUL_TIME 39 /* 39 instructions */
/* It's quite necessary to add this much assembler for the sparc.
The default udiv_qrnnd (in C) is more than 10 times slower! */
#define udiv_qrnnd(
q, r, n1, n0,
d) \
#define udiv_qrnnd(
__q, __r, __n1, __n0, __
d) \
__asm__ ("
!
Inlined
udiv_qrnnd
mov
32
,
%%
g1
subcc
%
1
,
%
2
,
%%
g0
...
...
@@ -1174,11 +1174,11 @@ UDItype __umulsidi3 (USItype, USItype);
sub
%
1
,
%
2
,
%
1
3
:
xnor
%
0
,
0
,
%
0
!
End
of
inline
udiv_qrnnd
" \
: "
=&
r
" ((USItype) (q)), \
"
=&
r
" ((USItype) (r)) \
: "
r
" ((USItype) (d)), \
"
1
" ((USItype) (n1)), \
"
0
" ((USItype) (n0)) : "
g1
" __AND_CLOBBER_CC)
: "
=&
r
" ((USItype) (
__
q)), \
"
=&
r
" ((USItype) (
__
r)) \
: "
r
" ((USItype) (
__
d)), \
"
1
" ((USItype) (
__
n1)), \
"
0
" ((USItype) (
__
n0)) : "
g1
" __AND_CLOBBER_CC)
#define UDIV_TIME (3+7*32) /* 7 instructions/iteration. 32 iterations. */
#endif /* __sparclite__ */
#endif /* __sparc_v8__ */
...
...
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