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
d4099651
Commit
d4099651
authored
Oct 01, 1992
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RISC-OS 5.0 changes.
From-SVN: r2303
parent
9ad5f9f6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
62 deletions
+61
-62
gcc/config/mips/bsd-4.h
+2
-1
gcc/config/mips/mips.c
+3
-7
gcc/config/mips/mips.h
+2
-1
gcc/config/mips/svr3-4.h
+2
-1
gcc/config/mips/svr4-4.h
+2
-1
gcc/mips-tfile.c
+50
-51
No files found.
gcc/config/mips/bsd-4.h
View file @
d4099651
...
...
@@ -19,7 +19,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define MIPS_BSD43
#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43"
#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43 \
-D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43"
#define SYSTEM_INCLUDE_DIR "/bsd43/usr/include"
...
...
gcc/config/mips/mips.c
View file @
d4099651
...
...
@@ -2845,17 +2845,13 @@ override_options ()
}
#endif
#ifdef _IOLBF
#if defined(_IOLBF)
#if defined(ultrix) || defined(__ultrix) || defined(__OSF1__) || defined(__osf__) || defined(osf)
/* If -mstats and -quiet, make stderr line buffered. */
if
(
quiet_flag
&&
TARGET_STATS
)
{
#if defined (MIPS_BSD43) || defined (MIPS_NEWS)
setlinebuf
(
stderr
);
#else
setvbuf
(
stderr
,
(
char
*
)
0
,
_IOLBF
,
BUFSIZ
);
setvbuf
(
stderr
,
(
char
*
)
0
,
_IOLBF
,
BUFSIZ
);
#endif
#endif
}
/* Set up the classification arrays now. */
mips_rtx_classify
[(
int
)
PLUS
]
=
CLASS_ADD_OP
;
...
...
gcc/config/mips/mips.h
View file @
d4099651
...
...
@@ -372,7 +372,8 @@ while (0)
/* Names to predefine in the preprocessor for this target machine. */
#ifndef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43"
#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43 \
-D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43"
#endif
/* Extra switches sometimes passed to the assembler. */
...
...
gcc/config/mips/svr3-4.h
View file @
d4099651
...
...
@@ -19,7 +19,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define MIPS_SYSV
#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SYSV"
#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SYSV \
-D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SYSV"
#define SYSTEM_INCLUDE_DIR "/sysv/usr/include"
...
...
gcc/config/mips/svr4-4.h
View file @
d4099651
...
...
@@ -19,7 +19,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define MIPS_SVR4
#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4"
#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4 \
-D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4"
#define SYSTEM_INCLUDE_DIR "/svr4/usr/include"
...
...
gcc/mips-tfile.c
View file @
d4099651
...
...
@@ -1032,7 +1032,7 @@ typedef struct tag {
struct
forward
*
forward_ref
;
/* list of forward references */
bt_t
basic_type
;
/* bt_Struct, bt_Union, or bt_Enum */
symint_t
ifd
;
/* file # tag defined in */
symint_t
ind
ex
;
/* index within file's local symbols */
symint_t
ind
x
;
/* index within file's local symbols */
}
tag_t
;
...
...
@@ -1066,7 +1066,7 @@ typedef struct shash {
struct
shash
*
next
;
/* next hash value */
char
*
string
;
/* string we are hashing */
symint_t
len
;
/* string length */
symint_t
ind
e
x
;
/* index within string table */
symint_t
indx
;
/* index within string table */
EXTR
*
esym_ptr
;
/* global symbol pointer */
SYMR
*
sym_ptr
;
/* local symbol pointer */
SYMR
*
end_ptr
;
/* symbol pointer to end block */
...
...
@@ -1087,7 +1087,7 @@ typedef struct shash {
typedef
struct
thash
{
struct
thash
*
next
;
/* next hash value */
AUXU
type
;
/* type we are hashing */
symint_t
ind
e
x
;
/* index within string table */
symint_t
indx
;
/* index within string table */
}
thash_t
;
...
...
@@ -1566,17 +1566,17 @@ static EXTR *orig_ext_syms; /* external symbols */
#define CHECK(num,max,str) \
(((unsigned long)num > (unsigned long)max) ? out_of_bounds (num, max, str, __LINE__) : 0)
#define ORIG_LINENUM(ind
ex) (CHECK ((index), orig_sym_hdr.cbLine, "line#"), (inde
x) + orig_linenum)
#define ORIG_DENSE(ind
ex) (CHECK ((index), orig_sym_hdr.idnMax, "dense"), (inde
x) + orig_dense)
#define ORIG_PROCS(ind
ex) (CHECK ((index), orig_sym_hdr.ipdMax, "procs"), (inde
x) + orig_procs)
#define ORIG_FILES(ind
ex) (CHECK ((index), orig_sym_hdr.ifdMax, "funcs"), (inde
x) + orig_files)
#define ORIG_LSYMS(ind
ex) (CHECK ((index), orig_sym_hdr.isymMax, "lsyms"), (inde
x) + orig_local_syms)
#define ORIG_LSTRS(ind
ex) (CHECK ((index), orig_sym_hdr.issMax, "lstrs"), (inde
x) + orig_local_strs)
#define ORIG_ESYMS(ind
ex) (CHECK ((index), orig_sym_hdr.iextMax, "esyms"), (inde
x) + orig_ext_syms)
#define ORIG_ESTRS(ind
ex) (CHECK ((index), orig_sym_hdr.issExtMax, "estrs"), (inde
x) + orig_ext_strs)
#define ORIG_OPT(ind
ex) (CHECK ((index), orig_sym_hdr.ioptMax, "opt"), (inde
x) + orig_opt_syms)
#define ORIG_AUX(ind
ex) (CHECK ((index), orig_sym_hdr.iauxMax, "aux"), (inde
x) + orig_aux_syms)
#define ORIG_RFDS(ind
ex) (CHECK ((index), orig_sym_hdr.crfd, "rfds"), (inde
x) + orig_rfds)
#define ORIG_LINENUM(ind
x) (CHECK ((indx), orig_sym_hdr.cbLine, "line#"), (ind
x) + orig_linenum)
#define ORIG_DENSE(ind
x) (CHECK ((indx), orig_sym_hdr.idnMax, "dense"), (ind
x) + orig_dense)
#define ORIG_PROCS(ind
x) (CHECK ((indx), orig_sym_hdr.ipdMax, "procs"), (ind
x) + orig_procs)
#define ORIG_FILES(ind
x) (CHECK ((indx), orig_sym_hdr.ifdMax, "funcs"), (ind
x) + orig_files)
#define ORIG_LSYMS(ind
x) (CHECK ((indx), orig_sym_hdr.isymMax, "lsyms"), (ind
x) + orig_local_syms)
#define ORIG_LSTRS(ind
x) (CHECK ((indx), orig_sym_hdr.issMax, "lstrs"), (ind
x) + orig_local_strs)
#define ORIG_ESYMS(ind
x) (CHECK ((indx), orig_sym_hdr.iextMax, "esyms"), (ind
x) + orig_ext_syms)
#define ORIG_ESTRS(ind
x) (CHECK ((indx), orig_sym_hdr.issExtMax, "estrs"), (ind
x) + orig_ext_strs)
#define ORIG_OPT(ind
x) (CHECK ((indx), orig_sym_hdr.ioptMax, "opt"), (ind
x) + orig_opt_syms)
#define ORIG_AUX(ind
x) (CHECK ((indx), orig_sym_hdr.iauxMax, "aux"), (ind
x) + orig_aux_syms)
#define ORIG_RFDS(ind
x) (CHECK ((indx), orig_sym_hdr.crfd, "rfds"), (ind
x) + orig_rfds)
/* Various other statics. */
static
HDRR
symbolic_header
;
/* symbolic header */
...
...
@@ -1879,9 +1879,8 @@ add_string (vp, hash_tbl, start, end_p1, ret_hash)
hash_tbl
[
hi
]
=
hash_ptr
;
hash_ptr
->
len
=
len
;
hash_ptr
->
index
=
vp
->
num_allocated
;
hash_ptr
->
string
=
p
=
&
vp
->
last
->
datum
->
byte
[
vp
->
objects_last_page
];
hash_ptr
->
indx
=
vp
->
num_allocated
;
hash_ptr
->
string
=
p
=
&
vp
->
last
->
datum
->
byte
[
vp
->
objects_last_page
];
vp
->
objects_last_page
+=
len
+
1
;
vp
->
num_allocated
+=
len
+
1
;
...
...
@@ -1895,7 +1894,7 @@ add_string (vp, hash_tbl, start, end_p1, ret_hash)
if
(
ret_hash
!=
(
shash_t
**
)
0
)
*
ret_hash
=
hash_ptr
;
return
hash_ptr
->
ind
e
x
;
return
hash_ptr
->
indx
;
}
...
...
@@ -1928,7 +1927,7 @@ add_local_symbol (str_start, str_end_p1, type, storage, value, indx)
psym
->
value
=
value
;
psym
->
st
=
(
unsigned
)
type
;
psym
->
sc
=
(
unsigned
)
storage
;
psym
->
ind
e
x
=
indx
;
psym
->
indx
=
indx
;
psym
->
iss
=
(
str_start
==
(
const
char
*
)
0
)
?
0
:
add_string
(
&
cur_file_ptr
->
strings
,
...
...
@@ -2016,13 +2015,13 @@ add_local_symbol (str_start, str_end_p1, type, storage, value, indx)
}
cur_file_ptr
->
cur_scope
=
pscope
->
prev
;
psym
->
ind
ex
=
pscope
->
lnumber
;
/* blk end gets begin sym # */
psym
->
ind
x
=
pscope
->
lnumber
;
/* blk end gets begin sym # */
if
(
storage
!=
sc_Info
)
psym
->
iss
=
pscope
->
lsym
->
iss
;
/* blk end gets same name */
if
(
begin_type
==
st_File
||
begin_type
==
st_Block
)
pscope
->
lsym
->
ind
ex
=
ret
+
1
;
/* block begin gets next sym # */
pscope
->
lsym
->
ind
x
=
ret
+
1
;
/* block begin gets next sym # */
/* Functions push two or more aux words as follows:
1st word: index+1 of the end symbol
...
...
@@ -2031,14 +2030,14 @@ add_local_symbol (str_start, str_end_p1, type, storage, value, indx)
else
{
symint_t
type
;
pscope
->
lsym
->
ind
e
x
=
add_aux_sym_symint
(
ret
+
1
);
pscope
->
lsym
->
indx
=
add_aux_sym_symint
(
ret
+
1
);
type
=
add_aux_sym_tir
(
&
last_func_type_info
,
hash_no
,
&
cur_file_ptr
->
thash_head
[
0
]);
if
(
last_func_eptr
)
{
last_func_eptr
->
ifd
=
cur_file_ptr
->
file_index
;
last_func_eptr
->
asym
.
ind
e
x
=
type
;
last_func_eptr
->
asym
.
indx
=
type
;
}
}
...
...
@@ -2113,7 +2112,7 @@ add_ext_symbol (str_start, str_end_p1, type, storage, value, indx, ifd)
psym
->
asym
.
value
=
value
;
psym
->
asym
.
st
=
(
unsigned
)
type
;
psym
->
asym
.
sc
=
(
unsigned
)
storage
;
psym
->
asym
.
ind
ex
=
indx
;
psym
->
asym
.
ind
x
=
indx
;
psym
->
asym
.
iss
=
(
str_start
==
(
const
char
*
)
0
)
?
0
:
add_string
(
&
ext_strings
,
...
...
@@ -2238,14 +2237,14 @@ add_aux_sym_tir (t, state, hash_tbl)
}
if
(
hash_ptr
!=
(
thash_t
*
)
0
&&
state
==
hash_yes
)
return
hash_ptr
->
ind
e
x
;
return
hash_ptr
->
indx
;
if
(
hash_ptr
==
(
thash_t
*
)
0
)
{
hash_ptr
=
allocate_thash
();
hash_ptr
->
next
=
hash_tbl
[
hi
];
hash_ptr
->
type
=
aux
;
hash_ptr
->
ind
e
x
=
vp
->
num_allocated
;
hash_ptr
->
indx
=
vp
->
num_allocated
;
hash_tbl
[
hi
]
=
hash_ptr
;
}
}
...
...
@@ -2281,7 +2280,7 @@ add_aux_sym_tir (t, state, hash_tbl)
||
t
->
basic_type
==
bt_Enum
)
{
register
symint_t
file_index
=
t
->
tag_ptr
->
ifd
;
register
symint_t
sym_index
=
t
->
tag_ptr
->
ind
e
x
;
register
symint_t
sym_index
=
t
->
tag_ptr
->
indx
;
if
(
t
->
unknown_tag
)
{
...
...
@@ -2335,10 +2334,10 @@ add_aux_sym_tir (t, state, hash_tbl)
/* Add a tag to the tag table (unless it already exists). */
STATIC
tag_t
*
get_tag
(
tag_start
,
tag_end_p1
,
ind
e
x
,
basic_type
)
get_tag
(
tag_start
,
tag_end_p1
,
indx
,
basic_type
)
const
char
*
tag_start
;
/* 1st byte of tag name */
const
char
*
tag_end_p1
;
/* 1st byte after tag name */
symint_t
ind
e
x
;
/* index of tag start block */
symint_t
indx
;
/* index of tag start block */
bt_t
basic_type
;
/* bt_Struct, bt_Union, or bt_Enum */
{
shash_t
*
hash_ptr
;
...
...
@@ -2352,11 +2351,11 @@ get_tag (tag_start, tag_end_p1, index, basic_type)
&&
hash_ptr
->
tag_ptr
!=
(
tag_t
*
)
0
)
{
tag_ptr
=
hash_ptr
->
tag_ptr
;
if
(
ind
e
x
!=
indexNil
)
if
(
indx
!=
indexNil
)
{
tag_ptr
->
basic_type
=
basic_type
;
tag_ptr
->
ifd
=
cur_file_ptr
->
file_index
;
tag_ptr
->
ind
ex
=
inde
x
;
tag_ptr
->
ind
x
=
ind
x
;
}
return
tag_ptr
;
}
...
...
@@ -2372,8 +2371,8 @@ get_tag (tag_start, tag_end_p1, index, basic_type)
tag_ptr
->
hash_ptr
=
hash_ptr
;
tag_ptr
->
same_name
=
hash_ptr
->
tag_ptr
;
tag_ptr
->
basic_type
=
basic_type
;
tag_ptr
->
ind
ex
=
inde
x
;
tag_ptr
->
ifd
=
(
ind
e
x
==
indexNil
)
?
-
1
:
cur_file_ptr
->
file_index
;
tag_ptr
->
ind
x
=
ind
x
;
tag_ptr
->
ifd
=
(
indx
==
indexNil
)
?
-
1
:
cur_file_ptr
->
file_index
;
tag_ptr
->
same_block
=
cur_tag_head
->
first_tag
;
cur_tag_head
->
first_tag
=
tag_ptr
;
...
...
@@ -2432,7 +2431,7 @@ add_unknown_tag (ptag)
f_next
=
f_next
->
next
;
f_cur
->
ifd_ptr
->
isym
=
file_index
;
f_cur
->
index_ptr
->
rndx
.
ind
e
x
=
sym_index
;
f_cur
->
index_ptr
->
rndx
.
indx
=
sym_index
;
free_forward
(
f_cur
);
}
...
...
@@ -2905,7 +2904,7 @@ parse_def (name_start)
EXTR
*
eptr
=
(
EXTR
*
)
0
;
/* ext. sym equivalent to def*/
int
is_function
=
0
;
/* != 0 if function */
symint_t
value
=
0
;
symint_t
ind
ex
=
cur_file_ptr
->
void_type
;
symint_t
ind
x
=
cur_file_ptr
->
void_type
;
int
error_line
=
0
;
symint_t
arg_number
;
symint_t
temp_array
[
N_TQ
];
...
...
@@ -3300,10 +3299,10 @@ parse_def (name_start)
type word in the aux. symbol table. */
if
(
symbol_type
==
st_Block
||
symbol_type
==
st_End
)
ind
e
x
=
0
;
indx
=
0
;
else
if
(
inside_enumeration
)
ind
e
x
=
cur_file_ptr
->
void_type
;
indx
=
cur_file_ptr
->
void_type
;
else
{
...
...
@@ -3330,9 +3329,9 @@ parse_def (name_start)
return
;
}
ind
e
x
=
add_aux_sym_tir
(
&
t
,
hash_yes
,
&
cur_file_ptr
->
thash_head
[
0
]);
indx
=
add_aux_sym_tir
(
&
t
,
hash_yes
,
&
cur_file_ptr
->
thash_head
[
0
]);
}
...
...
@@ -3340,10 +3339,10 @@ parse_def (name_start)
external symbol. */
if
(
eptr
!=
(
EXTR
*
)
0
&&
(
eptr
->
asym
.
ind
e
x
==
indexNil
||
cur_proc_ptr
==
(
PDR
*
)
0
))
&&
(
eptr
->
asym
.
indx
==
indexNil
||
cur_proc_ptr
==
(
PDR
*
)
0
))
{
eptr
->
ifd
=
cur_file_ptr
->
file_index
;
eptr
->
asym
.
ind
ex
=
inde
x
;
eptr
->
asym
.
ind
x
=
ind
x
;
}
...
...
@@ -3385,7 +3384,7 @@ parse_def (name_start)
/* Members of structures and unions that aren't bitfields, need
to adjust the value from a byte offset to a bit offset.
Members of enumerations do not have the value adjusted, and
can be distinguished by ind
e
x == indexNil. For enumerations,
can be distinguished by indx == indexNil. For enumerations,
update the maximum enumeration value. */
case
st_Member
:
...
...
@@ -3406,7 +3405,7 @@ parse_def (name_start)
symint_t
isym
=
add_local_symbol
(
name_start
,
name_end_p1
,
symbol_type
,
storage_class
,
value
,
ind
e
x
);
indx
);
/* deal with struct, union, and enum tags. */
if
(
symbol_type
==
st_Block
)
...
...
@@ -3430,7 +3429,7 @@ parse_def (name_start)
f_next
=
f_next
->
next
;
f_cur
->
ifd_ptr
->
isym
=
file_index
;
f_cur
->
index_ptr
->
rndx
.
ind
e
x
=
isym
;
f_cur
->
index_ptr
->
rndx
.
indx
=
isym
;
free_forward
(
f_cur
);
}
...
...
@@ -4565,7 +4564,7 @@ copy_object __proto((void))
(
st_t
)
eptr
->
asym
.
st
,
(
sc_t
)
eptr
->
asym
.
sc
,
eptr
->
asym
.
value
,
(
symint_t
)((
eptr
->
asym
.
ind
e
x
==
indexNil
)
?
indexNil
:
0
),
(
symint_t
)((
eptr
->
asym
.
indx
==
indexNil
)
?
indexNil
:
0
),
(
ifd
<
orig_sym_hdr
.
ifdMax
)
?
remap_file_number
[
ifd
]
:
ifd
);
}
...
...
@@ -4640,7 +4639,7 @@ copy_object __proto((void))
orig_str_hash
[
hash_index
]
=
shash_ptr
;
shash_ptr
->
len
=
len
;
shash_ptr
->
ind
e
x
=
indexNil
;
shash_ptr
->
indx
=
indexNil
;
shash_ptr
->
string
=
str
;
shash_ptr
->
sym_ptr
=
sym
;
}
...
...
@@ -4999,17 +4998,17 @@ pfatal_with_name (msg)
ORIG_xxx macros, but the function never returns. */
static
int
out_of_bounds
(
ind
e
x
,
max
,
str
,
prog_line
)
symint_t
ind
e
x
;
/* index that is out of bounds */
out_of_bounds
(
indx
,
max
,
str
,
prog_line
)
symint_t
indx
;
/* index that is out of bounds */
symint_t
max
;
/* maximum index */
const
char
*
str
;
/* string to print out */
int
prog_line
;
/* line number within mips-tfile.c */
{
if
(
ind
e
x
<
max
)
/* just in case */
if
(
indx
<
max
)
/* just in case */
return
0
;
fprintf
(
stderr
,
"%s, %s:%ld index %u is out of bounds for %s, max is %u, mips-tfile.c line# %d
\n
"
,
progname
,
input_name
,
line_number
,
ind
e
x
,
str
,
max
,
prog_line
);
progname
,
input_name
,
line_number
,
indx
,
str
,
max
,
prog_line
);
exit
(
1
);
return
0
;
/* turn off warning messages */
...
...
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