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
5f4f0e22
Commit
5f4f0e22
authored
Jul 06, 1992
by
Charles Hannum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1471
parent
3d678dca
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
127 additions
and
61 deletions
+127
-61
gcc/collect2.c
+0
-1
gcc/combine.c
+0
-0
gcc/flow.c
+0
-0
gcc/function.c
+31
-31
gcc/genpeep.c
+1
-1
gcc/halfpic.c
+0
-1
gcc/jump.c
+29
-19
gcc/machmode.h
+30
-2
gcc/rtl.def
+2
-2
gcc/rtl.h
+34
-4
No files found.
gcc/collect2.c
View file @
5f4f0e22
...
...
@@ -28,7 +28,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <signal.h>
...
...
gcc/combine.c
View file @
5f4f0e22
This diff is collapsed.
Click to expand it.
gcc/flow.c
View file @
5f4f0e22
This diff is collapsed.
Click to expand it.
gcc/function.c
View file @
5f4f0e22
...
...
@@ -1205,7 +1205,7 @@ fixup_var_refs_1 (var, loc, insn, replacements)
/* Make the change and see if the insn remains valid. */
INSN_CODE
(
insn
)
=
-
1
;
XEXP
(
x
,
0
)
=
newmem
;
XEXP
(
x
,
2
)
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
pos
);
XEXP
(
x
,
2
)
=
GEN_INT
(
pos
);
if
(
recog_memoized
(
insn
)
>=
0
)
return
;
...
...
@@ -1270,7 +1270,7 @@ fixup_var_refs_1 (var, loc, insn, replacements)
optimize_bit_field
(
x
,
insn
,
0
);
if
(
GET_CODE
(
SET_SRC
(
x
))
==
SIGN_EXTRACT
||
GET_CODE
(
SET_SRC
(
x
))
==
ZERO_EXTRACT
)
optimize_bit_field
(
x
,
insn
,
0
);
optimize_bit_field
(
x
,
insn
,
NULL_PTR
);
/* If SET_DEST is now a paradoxical SUBREG, put the result of this
insn into a pseudo and store the low part of the pseudo into VAR. */
...
...
@@ -1362,7 +1362,7 @@ fixup_var_refs_1 (var, loc, insn, replacements)
/* Make the change and see if the insn remains valid. */
INSN_CODE
(
insn
)
=
-
1
;
XEXP
(
outerdest
,
0
)
=
newmem
;
XEXP
(
outerdest
,
2
)
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
pos
);
XEXP
(
outerdest
,
2
)
=
GEN_INT
(
pos
);
if
(
recog_memoized
(
insn
)
>=
0
)
return
;
...
...
@@ -1867,7 +1867,7 @@ instantiate_virtual_regs (fndecl, insns)
||
GET_CODE
(
insn
)
==
CALL_INSN
)
{
instantiate_virtual_regs_1
(
&
PATTERN
(
insn
),
insn
,
1
);
instantiate_virtual_regs_1
(
&
REG_NOTES
(
insn
),
0
,
0
);
instantiate_virtual_regs_1
(
&
REG_NOTES
(
insn
),
NULL_RTX
,
0
);
}
/* Now instantiate the remaining register equivalences for debugging info.
...
...
@@ -1904,11 +1904,13 @@ instantiate_decls (fndecl, valid_only)
{
if
(
DECL_RTL
(
decl
)
&&
GET_CODE
(
DECL_RTL
(
decl
))
==
MEM
)
instantiate_virtual_regs_1
(
&
XEXP
(
DECL_RTL
(
decl
),
0
),
valid_only
?
DECL_RTL
(
decl
)
:
0
,
0
);
(
valid_only
?
DECL_RTL
(
decl
)
:
NULL_RTX
),
0
);
if
(
DECL_INCOMING_RTL
(
decl
)
&&
GET_CODE
(
DECL_INCOMING_RTL
(
decl
))
==
MEM
)
instantiate_virtual_regs_1
(
&
XEXP
(
DECL_INCOMING_RTL
(
decl
),
0
),
valid_only
?
DECL_INCOMING_RTL
(
decl
)
:
0
,
(
valid_only
?
DECL_INCOMING_RTL
(
decl
)
:
NULL_RTX
),
0
);
}
...
...
@@ -1938,7 +1940,7 @@ instantiate_decls_1 (let, valid_only)
for
(
t
=
BLOCK_VARS
(
let
);
t
;
t
=
TREE_CHAIN
(
t
))
if
(
DECL_RTL
(
t
)
&&
GET_CODE
(
DECL_RTL
(
t
))
==
MEM
)
instantiate_virtual_regs_1
(
&
XEXP
(
DECL_RTL
(
t
),
0
),
valid_only
?
DECL_RTL
(
t
)
:
0
,
0
);
valid_only
?
DECL_RTL
(
t
)
:
NULL_RTX
,
0
);
/* Process all subblocks. */
for
(
t
=
BLOCK_SUBBLOCKS
(
let
);
t
;
t
=
TREE_CHAIN
(
t
))
...
...
@@ -2023,10 +2025,10 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
start_sequence
();
if
(
GET_CODE
(
SET_SRC
(
x
))
!=
REG
)
temp
=
force_operand
(
SET_SRC
(
x
),
0
);
temp
=
force_operand
(
SET_SRC
(
x
),
NULL_RTX
);
else
temp
=
SET_SRC
(
x
);
temp
=
force_operand
(
plus_constant
(
temp
,
offset
),
0
);
temp
=
force_operand
(
plus_constant
(
temp
,
offset
),
NULL_RTX
);
seq
=
get_insns
();
end_sequence
();
...
...
@@ -2128,7 +2130,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
XEXP
(
x
,
0
)
=
old
;
start_sequence
();
temp
=
force_operand
(
new
,
0
);
temp
=
force_operand
(
new
,
NULL_RTX
);
seq
=
get_insns
();
end_sequence
();
...
...
@@ -2267,7 +2269,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
return
0
;
start_sequence
();
temp
=
force_operand
(
temp
,
0
);
temp
=
force_operand
(
temp
,
NULL_RTX
);
seq
=
get_insns
();
end_sequence
();
...
...
@@ -2490,7 +2492,7 @@ assign_parms (fndecl, second_time)
{
tree
type
=
build_pointer_type
(
fntype
);
function_result_decl
=
build_decl
(
PARM_DECL
,
0
,
type
);
function_result_decl
=
build_decl
(
PARM_DECL
,
NULL_TREE
,
type
);
DECL_ARG_TYPE
(
function_result_decl
)
=
type
;
TREE_CHAIN
(
function_result_decl
)
=
fnargs
;
...
...
@@ -2501,9 +2503,9 @@ assign_parms (fndecl, second_time)
bzero
(
parm_reg_stack_loc
,
nparmregs
*
sizeof
(
rtx
));
#ifdef INIT_CUMULATIVE_INCOMING_ARGS
INIT_CUMULATIVE_INCOMING_ARGS
(
args_so_far
,
fntype
,
0
);
INIT_CUMULATIVE_INCOMING_ARGS
(
args_so_far
,
fntype
,
NULL_PTR
);
#else
INIT_CUMULATIVE_ARGS
(
args_so_far
,
fntype
,
0
);
INIT_CUMULATIVE_ARGS
(
args_so_far
,
fntype
,
NULL_PTR
);
#endif
/* We haven't yet found an argument that we must push and pretend the
...
...
@@ -2849,7 +2851,7 @@ assign_parms (fndecl, second_time)
&&
REGNO
(
entry_parm
)
<
FIRST_PSEUDO_REGISTER
&&
!
HARD_REGNO_MODE_OK
(
REGNO
(
entry_parm
),
GET_MODE
(
entry_parm
)))
convert_move
(
parmreg
,
copy_to_reg
(
entry_parm
));
convert_move
(
parmreg
,
copy_to_reg
(
entry_parm
)
,
0
);
else
convert_move
(
parmreg
,
validize_mem
(
entry_parm
),
0
);
}
...
...
@@ -2953,11 +2955,10 @@ assign_parms (fndecl, second_time)
#ifdef ARGS_GROW_DOWNWARD
current_function_arg_offset_rtx
=
(
stack_args_size
.
var
==
0
?
gen_rtx
(
CONST_INT
,
VOIDmode
,
-
stack_args_size
.
constant
)
=
(
stack_args_size
.
var
==
0
?
GEN_INT
(
-
stack_args_size
.
constant
)
:
expand_expr
(
size_binop
(
MINUS_EXPR
,
stack_args_size
.
var
,
size_int
(
-
stack_args_size
.
constant
)),
0
,
VOIDmode
,
0
));
NULL_RTX
,
VOIDmode
,
0
));
#else
current_function_arg_offset_rtx
=
ARGS_SIZE_RTX
(
stack_args_size
);
#endif
...
...
@@ -3497,10 +3498,10 @@ round_trampoline_addr (tramp)
/* Round address up to desired boundary. */
rtx
temp
=
gen_reg_rtx
(
Pmode
);
temp
=
expand_binop
(
Pmode
,
add_optab
,
tramp
,
gen_rtx
(
CONST_INT
,
VOIDmode
,
TRAMPOLINE_ALIGNMENT
-
1
),
GEN_INT
(
TRAMPOLINE_ALIGNMENT
-
1
),
temp
,
0
,
OPTAB_LIB_WIDEN
);
tramp
=
expand_binop
(
Pmode
,
and_optab
,
temp
,
gen_rtx
(
CONST_INT
,
VOIDmode
,
-
TRAMPOLINE_ALIGNMENT
),
GEN_INT
(
-
TRAMPOLINE_ALIGNMENT
),
temp
,
0
,
OPTAB_LIB_WIDEN
);
#endif
return
tramp
;
...
...
@@ -3615,7 +3616,7 @@ init_function_start (subr, filename, line)
/* Make sure first insn is a note even if we don't want linenums.
This makes sure the first insn will never be deleted.
Also, final expects a note to appear there. */
emit_note
(
0
,
NOTE_INSN_DELETED
);
emit_note
(
NULL_PTR
,
NOTE_INSN_DELETED
);
/* Set flags used by final.c. */
if
(
aggregate_value_p
(
DECL_RESULT
(
subr
)))
...
...
@@ -3795,12 +3796,12 @@ expand_function_start (subr, parms_have_cleanups)
The move is supposed to make sdb output more accurate. */
/* Indicate the beginning of the function body,
as opposed to parm setup. */
emit_note
(
0
,
NOTE_INSN_FUNCTION_BEG
);
emit_note
(
NULL_PTR
,
NOTE_INSN_FUNCTION_BEG
);
/* If doing stupid allocation, mark parms as born here. */
if
(
GET_CODE
(
get_last_insn
())
!=
NOTE
)
emit_note
(
0
,
NOTE_INSN_DELETED
);
emit_note
(
NULL_PTR
,
NOTE_INSN_DELETED
);
parm_birth_insn
=
get_last_insn
();
if
(
obey_regdecls
)
...
...
@@ -3841,11 +3842,11 @@ expand_function_start (subr, parms_have_cleanups)
/* After the display initializations is where the tail-recursion label
should go, if we end up needing one. Ensure we have a NOTE here
since some things (like trampolines) get placed before this. */
tail_recursion_reentry
=
emit_note
(
0
,
NOTE_INSN_DELETED
);
tail_recursion_reentry
=
emit_note
(
NULL_PTR
,
NOTE_INSN_DELETED
);
/* Evaluate now the sizes of any types declared among the arguments. */
for
(
tem
=
nreverse
(
get_pending_sizes
());
tem
;
tem
=
TREE_CHAIN
(
tem
))
expand_expr
(
TREE_VALUE
(
tem
),
0
,
VOIDmode
,
0
);
expand_expr
(
TREE_VALUE
(
tem
),
NULL_RTX
,
VOIDmode
,
0
);
/* Make sure there is a line number after the function entry setup code. */
force_next_line_note
();
...
...
@@ -3905,8 +3906,7 @@ expand_function_end (filename, line)
start_sequence
();
tramp
=
change_address
(
initial_trampoline
,
BLKmode
,
round_trampoline_addr
(
XEXP
(
tramp
,
0
)));
emit_block_move
(
tramp
,
initial_trampoline
,
gen_rtx
(
CONST_INT
,
VOIDmode
,
TRAMPOLINE_SIZE
),
emit_block_move
(
tramp
,
initial_trampoline
,
GEN_INT
(
TRAMPOLINE_SIZE
),
FUNCTION_BOUNDARY
/
BITS_PER_UNIT
);
INITIALIZE_TRAMPOLINE
(
XEXP
(
tramp
,
0
),
XEXP
(
DECL_RTL
(
function
),
0
),
context
);
...
...
@@ -3938,7 +3938,7 @@ expand_function_end (filename, line)
/* End any sequences that failed to be closed due to syntax errors. */
while
(
in_sequence_p
())
end_sequence
(
0
);
end_sequence
();
/* Outside function body, can't compute type's actual size
until next function's body starts. */
...
...
@@ -3971,7 +3971,7 @@ expand_function_end (filename, line)
/* Mark the end of the function body.
If control reaches this insn, the function can drop through
without returning a value. */
emit_note
(
0
,
NOTE_INSN_FUNCTION_END
);
emit_note
(
NULL_PTR
,
NOTE_INSN_FUNCTION_END
);
/* Output a linenumber for the end of the function.
SDB depends on this. */
...
...
@@ -3997,7 +3997,7 @@ expand_function_end (filename, line)
rtx
tem
=
0
;
emit_stack_save
(
SAVE_FUNCTION
,
&
tem
,
parm_birth_insn
);
emit_stack_restore
(
SAVE_FUNCTION
,
tem
,
0
);
emit_stack_restore
(
SAVE_FUNCTION
,
tem
,
NULL_RTX
);
}
/* If scalar return value was computed in a pseudo-reg,
...
...
@@ -4072,7 +4072,7 @@ expand_function_end (filename, line)
/* If you have any cleanups to do at this point,
and they need to create temporary variables,
then you will lose. */
fixup_gotos
(
0
,
0
,
0
,
get_insns
(),
0
);
fixup_gotos
(
NULL_PTR
,
NULL_RTX
,
NULL_TREE
,
get_insns
(),
0
);
}
/* These arrays record the INSN_UIDs of the prologue and epilogue insns. */
...
...
gcc/genpeep.c
View file @
5f4f0e22
...
...
@@ -106,7 +106,7 @@ gen_peephole (peep)
/* Walk the insn's pattern, remembering at all times the path
down to the walking point. */
match_rtx
(
XVECEXP
(
peep
,
0
,
i
),
0
,
insn_code_number
);
match_rtx
(
XVECEXP
(
peep
,
0
,
i
),
NULL_PTR
,
insn_code_number
);
}
/* We get this far if the pattern matches.
...
...
gcc/halfpic.c
View file @
5f4f0e22
...
...
@@ -34,7 +34,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "tree.h"
#include "rtl.h"
#include <stdio.h>
#include <string.h>
#include "obstack.h"
#define obstack_chunk_alloc xmalloc
...
...
gcc/jump.c
View file @
5f4f0e22
/* Optimize jump instructions, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1991 Free Software Foundation, Inc.
Copyright (C) 1987, 1988, 1989, 1991
, 1992
Free Software Foundation, Inc.
This file is part of GNU CC.
...
...
@@ -368,8 +368,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
}
else
XEXP
(
SET_SRC
(
PATTERN
(
stack_adjust_insn
)),
1
)
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
stack_adjust_amount
-
total_pushed
);
=
GEN_INT
(
stack_adjust_amount
-
total_pushed
);
/* Change the appropriate push insns to ordinary stores. */
p
=
insn
;
...
...
@@ -396,7 +395,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
if
(
total_pushed
<
0
)
{
emit_insn_before
(
gen_add2_insn
(
stack_pointer_rtx
,
gen_rtx
(
CONST_INT
,
VOIDmode
,
-
total_pushed
)),
GEN_INT
(
-
total_pushed
)),
p
);
break
;
}
...
...
@@ -433,8 +432,8 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
else
if
(
sreg
>=
0
&&
dreg
>=
0
)
{
rtx
trial
;
rtx
tem
=
find_equiv_reg
(
0
,
insn
,
0
,
sreg
,
0
,
dreg
,
rtx
tem
=
find_equiv_reg
(
NULL_RTX
,
insn
,
0
,
sreg
,
NULL_PTR
,
dreg
,
GET_MODE
(
SET_SRC
(
body
)));
#ifdef PRESERVE_DEATH_INFO_REGNO_P
...
...
@@ -463,8 +462,9 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
}
}
else
if
(
dreg
>=
0
&&
CONSTANT_P
(
SET_SRC
(
body
))
&&
find_equiv_reg
(
SET_SRC
(
body
),
insn
,
0
,
dreg
,
0
,
0
,
GET_MODE
(
SET_DEST
(
body
))))
&&
find_equiv_reg
(
SET_SRC
(
body
),
insn
,
0
,
dreg
,
NULL_PTR
,
0
,
GET_MODE
(
SET_DEST
(
body
))))
{
/* This handles the case where we have two consecutive
assignments of the same constant to pseudos that didn't
...
...
@@ -629,7 +629,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
it into a RETURN insn, possibly a conditional one. */
if
(
JUMP_LABEL
(
insn
)
&&
next_active_insn
(
JUMP_LABEL
(
insn
))
==
0
)
changed
|=
redirect_jump
(
insn
,
0
);
changed
|=
redirect_jump
(
insn
,
NULL_RTX
);
/* Detect jump to following insn. */
if
(
reallabelprev
==
insn
&&
condjump_p
(
insn
))
...
...
@@ -902,7 +902,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
if
(
normalizep
!=
1
)
target
=
expand_and
(
yes
,
target
,
(
GET_CODE
(
target
)
==
REG
?
target
:
0
));
?
target
:
NULL_RTX
));
seq
=
gen_sequence
();
end_sequence
();
emit_insn_before
(
seq
,
temp5
);
...
...
@@ -1718,8 +1718,8 @@ duplicate_loop_exit_test (loop_start)
case
JUMP_INSN
:
case
INSN
:
if
(
++
num_insns
>
20
||
find_reg_note
(
insn
,
REG_RETVAL
,
0
)
||
find_reg_note
(
insn
,
REG_LIBCALL
,
0
))
||
find_reg_note
(
insn
,
REG_RETVAL
,
NULL_RTX
)
||
find_reg_note
(
insn
,
REG_LIBCALL
,
NULL_RTX
))
return
0
;
break
;
}
...
...
@@ -1996,10 +1996,10 @@ find_cross_jump (e1, e2, minimum, f1, f2)
rtx
equiv2
;
if
(
!
lose
&&
GET_CODE
(
p1
)
==
GET_CODE
(
p2
)
&&
((
equiv1
=
find_reg_note
(
i1
,
REG_EQUAL
,
0
))
!=
0
||
(
equiv1
=
find_reg_note
(
i1
,
REG_EQUIV
,
0
))
!=
0
)
&&
((
equiv2
=
find_reg_note
(
i2
,
REG_EQUAL
,
0
))
!=
0
||
(
equiv2
=
find_reg_note
(
i2
,
REG_EQUIV
,
0
))
!=
0
)
&&
((
equiv1
=
find_reg_note
(
i1
,
REG_EQUAL
,
NULL_RTX
))
!=
0
||
(
equiv1
=
find_reg_note
(
i1
,
REG_EQUIV
,
NULL_RTX
))
!=
0
)
&&
((
equiv2
=
find_reg_note
(
i2
,
REG_EQUAL
,
NULL_RTX
))
!=
0
||
(
equiv2
=
find_reg_note
(
i2
,
REG_EQUIV
,
NULL_RTX
))
!=
0
)
/* If the equivalences are not to a constant, they may
reference pseudos that no longer exist, so we can't
use them. */
...
...
@@ -2743,7 +2743,7 @@ mark_jump_label (x, insn, cross_jump)
int
eltnum
=
code
==
ADDR_DIFF_VEC
?
1
:
0
;
for
(
i
=
0
;
i
<
XVECLEN
(
x
,
eltnum
);
i
++
)
mark_jump_label
(
XVECEXP
(
x
,
eltnum
,
i
),
0
,
cross_jump
);
mark_jump_label
(
XVECEXP
(
x
,
eltnum
,
i
),
NULL_RTX
,
cross_jump
);
return
;
}
}
...
...
@@ -2788,7 +2788,7 @@ delete_jump (insn)
&&
sets_cc0_p
(
PATTERN
(
prev
)))
{
if
(
sets_cc0_p
(
PATTERN
(
prev
))
>
0
&&
!
FIND_REG_INC_NOTE
(
prev
,
0
))
&&
!
FIND_REG_INC_NOTE
(
prev
,
NULL_RTX
))
delete_insn
(
prev
);
else
/* Otherwise, show that cc0 won't be used. */
...
...
@@ -2834,7 +2834,7 @@ delete_jump (insn)
if
(
reg_set_p
(
XEXP
(
note
,
0
),
PATTERN
(
our_prev
)))
{
if
(
FIND_REG_INC_NOTE
(
our_prev
,
0
))
if
(
FIND_REG_INC_NOTE
(
our_prev
,
NULL_RTX
))
break
;
if
(
GET_CODE
(
PATTERN
(
our_prev
))
==
PARALLEL
)
...
...
@@ -3463,6 +3463,11 @@ rtx_renumbered_equal_p (x, y)
register
int
j
;
switch
(
fmt
[
i
])
{
case
'w'
:
if
(
XWINT
(
x
,
i
)
!=
XWINT
(
y
,
i
))
return
0
;
break
;
case
'i'
:
if
(
XINT
(
x
,
i
)
!=
XINT
(
y
,
i
))
return
0
;
...
...
@@ -3875,6 +3880,11 @@ rtx_equal_for_thread_p (x, y, yinsn)
{
switch
(
fmt
[
i
])
{
case
'w'
:
if
(
XWINT
(
x
,
i
)
!=
XWINT
(
y
,
i
))
return
0
;
break
;
case
'n'
:
case
'i'
:
if
(
XINT
(
x
,
i
)
!=
XINT
(
y
,
i
))
...
...
gcc/machmode.h
View file @
5f4f0e22
...
...
@@ -33,6 +33,34 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
/* Find the largest host integer type and set its size and type. */
#ifndef HOST_BITS_PER_WIDE_INT
#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
#define HOST_WIDE_INT long
#else
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
#define HOST_WIDE_INT int
#endif
#endif
/* Define the number of entries in an 8-bit `shorts' array needed to represent
the largest supported constant, which is twice the width of the largest
host integer type. */
#ifndef MAX_SHORTS
#define MAX_SHORTS (HOST_BITS_PER_WIDE_INT * 2 / 8)
#endif
/* Provide a default way to print an address in hex via printf. */
#ifndef HOST_PTR_PRINTF
#define HOST_PTR_PRINTF sizeof (int) == sizeof (char *) ? "%x" : "%lx"
#endif
/* Make an enum class that gives all the machine modes. */
#define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT, WIDER) SYM,
...
...
@@ -90,8 +118,8 @@ extern int mode_unit_size[];
that fit within mode MODE. */
#define GET_MODE_MASK(MODE) \
((GET_MODE_BITSIZE (MODE) >= HOST_BITS_PER_INT) \
?
-1 : ((
1 << GET_MODE_BITSIZE (MODE)) - 1))
((GET_MODE_BITSIZE (MODE) >= HOST_BITS_PER_
WIDE_
INT) \
?
(HOST_WIDE_INT) ~0 : (((HOST_WIDE_INT)
1 << GET_MODE_BITSIZE (MODE)) - 1))
/* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
...
...
gcc/rtl.def
View file @
5f4f0e22
...
...
@@ -464,7 +464,7 @@ DEF_RTL_EXPR(TRAP_IF, "trap_if", "ei", 'x')
---------------------------------------------------------------------- */
/* numeric integer constant */
DEF_RTL_EXPR(CONST_INT, "const_int", "
i
", 'o')
DEF_RTL_EXPR(CONST_INT, "const_int", "
w
", 'o')
/* numeric double constant.
Operand 0 is the MEM that stores this constant in memory,
...
...
@@ -473,7 +473,7 @@ DEF_RTL_EXPR(CONST_INT, "const_int", "i", 'o')
Remaining operands hold the actual value.
The number of operands may be more than 2 if cross-compiling;
see init_rtl. */
DEF_RTL_EXPR(CONST_DOUBLE, "const_double", "e0
ii
", 'o')
DEF_RTL_EXPR(CONST_DOUBLE, "const_double", "e0
ww
", 'o')
/* String constant. Used only for attributes right now. */
DEF_RTL_EXPR(CONST_STRING, "const_string", "s", 'o')
...
...
gcc/rtl.h
View file @
5f4f0e22
...
...
@@ -55,6 +55,7 @@ extern char rtx_class[];
typedef
union
rtunion_def
{
HOST_WIDE_INT
rtwint
;
int
rtint
;
char
*
rtstr
;
struct
rtx_def
*
rtx
;
...
...
@@ -132,6 +133,16 @@ typedef struct rtx_def
#define NULL_RTX (rtx) 0
/* Define a generic NULL if one hasn't already been defined. */
#ifndef NULL
#define NULL 0
#endif
#ifndef NULL_PTR
#define NULL_PTR (char *) NULL
#endif
/* Define macros to access the `code' field of the rtx. */
#ifdef SHORT_ENUM_BUG
...
...
@@ -179,6 +190,7 @@ typedef struct rtvec_def{
#define XEXP(RTX, N) ((RTX)->fld[N].rtx)
#define XINT(RTX, N) ((RTX)->fld[N].rtint)
#define XWINT(RTX, N) ((RTX)->fld[N].rtwint)
#define XSTR(RTX, N) ((RTX)->fld[N].rtstr)
#define XVEC(RTX, N) ((RTX)->fld[N].rtvec)
#define XVECLEN(RTX, N) ((RTX)->fld[N].rtvec->num_elem)
...
...
@@ -399,7 +411,7 @@ extern char *note_insn_name[];
/* For a CONST_INT rtx, INTVAL extracts the integer. */
#define INTVAL(RTX) ((RTX)->fld[0].rtint)
#define INTVAL(RTX) ((RTX)->fld[0].rt
w
int)
/* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of.
SUBREG_WORD extracts the word-number. */
...
...
@@ -532,17 +544,36 @@ extern char *note_insn_name[];
/* Generally useful functions. */
/* The following functions accept a wide integer argument. Rather than
having to cast on every function call, we use a macro instead, that is
defined here and in tree.h. */
#ifndef exact_log2
#define exact_log2(N) exact_log2_wide ((HOST_WIDE_INT) (N))
#define floor_log2(N) floor_log2_wide ((HOST_WIDE_INT) (N))
#endif
#define plus_constant(X,C) plus_constant_wide (X, (HOST_WIDE_INT) (C))
#define plus_constant_for_output(X,C) \
plus_constant_for_output_wide (X, (HOST_WIDE_INT) (C))
extern
rtx
plus_constant_wide
(),
plus_constant_for_output_wide
();
#define GEN_INT(N) gen_rtx (CONST_INT, VOIDmode, (N))
extern
rtx
gen_rtx
();
extern
char
*
xmalloc
();
extern
void
free
();
extern
rtx
rtx_alloc
();
extern
rtvec
rtvec_alloc
();
extern
rtx
find_reg_note
();
extern
rtx
find_regno_note
();
extern
int
get_integer_term
();
extern
HOST_WIDE_INT
get_integer_term
();
extern
rtx
get_related_value
();
extern
rtx
single_set
();
extern
rtx
find_last_value
();
extern
rtx
gen_rtx
();
extern
rtx
copy_rtx
();
extern
rtx
copy_rtx_if_shared
();
extern
rtx
copy_most_rtx
();
...
...
@@ -623,7 +654,6 @@ extern enum rtx_code reverse_condition ();
extern
enum
rtx_code
swap_condition
();
extern
enum
rtx_code
unsigned_condition
();
extern
enum
rtx_code
signed_condition
();
extern
rtx
plus_constant
(),
plus_constant_for_output
();
extern
rtx
find_equiv_reg
();
extern
rtx
squeeze_notes
();
extern
rtx
delete_insn
();
...
...
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