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
d9a31758
Commit
d9a31758
authored
Aug 03, 1999
by
Jeff Law
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete questionable tests.
From-SVN: r28448
parent
61fb22b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
253 deletions
+0
-253
gcc/testsuite/gcc.c-torture/unsorted/i386bug.c
+0
-51
gcc/testsuite/gcc.c-torture/unsorted/xxs.c
+0
-202
No files found.
gcc/testsuite/gcc.c-torture/unsorted/i386bug.c
deleted
100644 → 0
View file @
61fb22b1
typedef
union
{
struct
{
long
RH
,
LH
;
}
v
;
struct
{
unsigned
char
B1
;
}
u
;
}
twohalves
;
typedef
union
{
long
cint
;
twohalves
hhfield
;
}
memoryword
;
extern
memoryword
mem
[
262
];
long
znewstructure
(
p
)
long
p
;
{
long
q
,
r
;
{
q
=
mem
[
p
+
2
]
.
hhfield
.
v
.
RH
;
r
=
mem
[
q
+
1
]
.
hhfield
.
v
.
LH
;
do
{
q
=
r
;
r
=
mem
[
r
]
.
hhfield
.
v
.
RH
;
}
while
(
!
(
r
==
p
)
);
r
=
foo
((
long
)
(
3
));
mem
[
q
]
.
hhfield
.
v
.
RH
=
r
;
mem
[
r
+
2
]
=
mem
[
p
+
2
];
if
(
mem
[
p
+
2
]
.
hhfield
.
v
.
LH
==
0
)
{
q
=
mem
[
p
+
2
]
.
hhfield
.
v
.
RH
+
1
;
while
(
mem
[
q
]
.
hhfield
.
v
.
RH
!=
p
)
q
=
mem
[
q
]
.
hhfield
.
v
.
RH
;
mem
[
q
]
.
hhfield
.
v
.
RH
=
r
;
}
}
mem
[
r
]
.
hhfield
.
u
.
B1
=
mem
[
p
]
.
hhfield
.
u
.
B1
;
mem
[
r
+
1
]
.
hhfield
.
v
.
LH
=
p
;
q
=
foo
((
long
)
(
3
));
mem
[
r
+
1
]
.
hhfield
.
v
.
RH
=
q
;
mem
[
q
+
2
]
.
hhfield
.
v
.
RH
=
r
;
return
(
r
);
}
gcc/testsuite/gcc.c-torture/unsorted/xxs.c
deleted
100644 → 0
View file @
61fb22b1
void
*
malloc
();
struct
timeval
{
long
tv_sec
;
long
tv_usec
;
};
struct
timezone
{
int
tz_minuteswest
;
int
tz_dsttime
;
};
struct
itimerval
{
struct
timeval
it_interval
;
struct
timeval
it_value
;
};
typedef
int
sigset_t
;
typedef
unsigned
int
speed_t
;
typedef
unsigned
long
tcflag_t
;
typedef
unsigned
char
cc_t
;
typedef
int
pid_t
;
typedef
unsigned
short
mode_t
;
typedef
short
nlink_t
;
typedef
long
clock_t
;
typedef
long
time_t
;
typedef
int
size_t
;
typedef
int
ptrdiff_t
;
typedef
unsigned
short
wchar_t
;
struct
tm
{
int
tm_sec
;
int
tm_min
;
int
tm_hour
;
int
tm_mday
;
int
tm_mon
;
int
tm_year
;
int
tm_wday
;
int
tm_yday
;
int
tm_isdst
;
char
*
tm_zone
;
long
tm_gmtoff
;
};
extern
struct
tm
*
gmtime
(),
*
localtime
();
extern
char
*
asctime
(),
*
ctime
();
extern
void
tzset
(),
tzsetwall
();
extern
int
dysize
();
extern
time_t
timelocal
(),
timegm
();
struct
rusage
{
struct
timeval
ru_utime
;
struct
timeval
ru_stime
;
long
ru_maxrss
;
long
ru_ixrss
;
long
ru_idrss
;
long
ru_isrss
;
long
ru_minflt
;
long
ru_majflt
;
long
ru_nswap
;
long
ru_inblock
;
long
ru_oublock
;
long
ru_msgsnd
;
long
ru_msgrcv
;
long
ru_nsignals
;
long
ru_nvcsw
;
long
ru_nivcsw
;
};
struct
rlimit
{
int
rlim_cur
;
int
rlim_max
;
};
unsigned
long
cputime
()
{
struct
rusage
rus
;
getrusage
(
0
,
&
rus
);
return
(((
rus
.
ru_utime
.
tv_sec
+
rus
.
ru_stime
.
tv_sec
)
*
1000000
)
+
rus
.
ru_utime
.
tv_usec
+
rus
.
ru_stime
.
tv_usec
)
/
1000
;
}
int
do_assoc_test
(
mem
,
start
,
cc
)
register
char
*
mem
;
register
int
start
;
register
int
cc
;
{
register
int
j
;
register
int
ind
=
start
;
register
int
x
;
for
(
j
=
0x100000
;
--
j
>=
0
;
)
{
int
x
=
((
volatile
char
*
)
mem
)[
ind
];
ind
-=
cc
;
if
(
ind
<
0
)
ind
=
start
;
}
return
x
;
}
int
determine_assoc
(
size
)
{
register
char
*
mem
=
malloc
(
size
*
(
1
<<
5
));
int
cc
=
size
;
int
lbsets
;
int
times
[
5
+
1
];
for
(
lbsets
=
0
;
lbsets
<=
5
;
lbsets
++
)
{
int
t
=
cputime
();
do_assoc_test
(
mem
,
(
cc
<<
lbsets
)
-
cc
,
cc
);
t
=
cputime
()
-
t
;
times
[
lbsets
]
=
t
;
printf
(
"sets = %2u: %u ms
\n
"
,
1
<<
lbsets
,
t
);
}
free
(
mem
);
{
int
max
=
1000
*
times
[
1
]
/
times
[
0
];
int
maxindex
=
0
;
int
min
=
1000
*
times
[
1
]
/
times
[
0
];
int
minindex
=
0
;
for
(
lbsets
=
1
;
lbsets
<
4
;
lbsets
++
)
{
int
x
=
1000
*
times
[
lbsets
+
1
]
/
times
[
lbsets
];
if
(
x
>
max
)
{
max
=
x
;
maxindex
=
lbsets
;
}
if
(
x
<
min
)
{
min
=
x
;
minindex
=
lbsets
;
}
}
if
(
min
*
100
>
max
*
75
)
return
0
;
return
1
<<
maxindex
;
}
}
do_size_test
(
mem
,
size
,
reps
)
register
int
*
mem
;
register
int
size
;
register
int
reps
;
{
register
int
j
,
i
,
x
;
mem
+=
size
;
for
(
j
=
reps
;
--
j
>=
0
;)
for
(
i
=
-
size
;
i
<
0
;
i
++
)
x
=
((
volatile
int
*
)
mem
)[
i
];
}
int
determine_size
()
{
register
int
*
mem
=
malloc
(
1
<<
20
);
int
lbsize
;
int
times
[
20
];
for
(
lbsize
=
12
;
lbsize
<
20
;
lbsize
++
)
{
int
t
=
cputime
();
do_size_test
(
mem
,
(
1
<<
lbsize
)
/
sizeof
(
int
)
-
64
,
0x1000000
>>
lbsize
);
t
=
cputime
()
-
t
;
times
[
lbsize
]
=
t
;
printf
(
"size = %2u: %u ms
\n
"
,
1
<<
lbsize
,
t
);
}
free
(
mem
);
{
int
max
=
1000
*
times
[
12
+
1
]
/
times
[
12
];
int
maxindex
=
0
;
int
min
=
1000
*
times
[
12
+
1
]
/
times
[
12
];
int
minindex
=
0
;
for
(
lbsize
=
12
;
lbsize
<
20
-
1
;
lbsize
++
)
{
int
x
=
1000
*
times
[
lbsize
+
1
]
/
times
[
lbsize
];
if
(
x
>
max
)
{
max
=
x
;
maxindex
=
lbsize
;
}
if
(
x
<
min
)
{
min
=
x
;
minindex
=
lbsize
;
}
}
if
(
min
*
100
>
max
*
75
)
return
0
;
return
1
<<
maxindex
;
}
}
int
main
()
{
int
size
,
assoc
;
size
=
determine_size
();
if
(
size
)
printf
(
"I guess this cache is %d bytes.
\n
"
,
size
);
else
printf
(
"I can't determine the size from this run.
\n
"
);
if
(
size
==
0
)
size
=
65536
;
assoc
=
determine_assoc
(
size
);
if
(
assoc
>
1
)
printf
(
"I guess this cache is %d-way set associative.
\n
"
,
assoc
);
else
if
(
assoc
==
1
)
printf
(
"I guess this cache is direct mapped.
\n
"
);
else
printf
(
"I can't determine the associativity from this run.
\n
"
);
return
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