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
c166a311
Commit
c166a311
authored
Jul 06, 1992
by
Charles Hannum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
entered into RCS
From-SVN: r1476
parent
37366632
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
106 additions
and
53 deletions
+106
-53
gcc/reg-stack.c
+5
-4
gcc/rtl.c
+48
-5
gcc/rtlanal.c
+9
-4
gcc/stor-layout.c
+20
-14
gcc/unroll.c
+23
-25
gcc/xcoffout.c
+1
-1
No files found.
gcc/reg-stack.c
View file @
c166a311
...
@@ -655,7 +655,7 @@ constrain_asm_operands (n_operands, operands, operand_constraints,
...
@@ -655,7 +655,7 @@ constrain_asm_operands (n_operands, operands, operand_constraints,
/* Match any CONST_DOUBLE, but only if
/* Match any CONST_DOUBLE, but only if
we can examine the bits of it reliably. */
we can examine the bits of it reliably. */
if
((
HOST_FLOAT_FORMAT
!=
TARGET_FLOAT_FORMAT
if
((
HOST_FLOAT_FORMAT
!=
TARGET_FLOAT_FORMAT
||
HOST_BITS_PER_INT
!=
BITS_PER_WORD
)
||
HOST_BITS_PER_
WIDE_
INT
!=
BITS_PER_WORD
)
&&
GET_CODE
(
op
)
!=
VOIDmode
&&
!
flag_pretend_float
)
&&
GET_CODE
(
op
)
!=
VOIDmode
&&
!
flag_pretend_float
)
break
;
break
;
if
(
GET_CODE
(
op
)
==
CONST_DOUBLE
)
if
(
GET_CODE
(
op
)
==
CONST_DOUBLE
)
...
@@ -1160,7 +1160,7 @@ record_reg_life (insn, block, regstack)
...
@@ -1160,7 +1160,7 @@ record_reg_life (insn, block, regstack)
int
n_inputs
,
n_outputs
;
int
n_inputs
,
n_outputs
;
char
**
constraints
=
(
char
**
)
alloca
(
n_operands
*
sizeof
(
char
*
));
char
**
constraints
=
(
char
**
)
alloca
(
n_operands
*
sizeof
(
char
*
));
decode_asm_operands
(
body
,
operands
,
0
,
constraints
,
0
);
decode_asm_operands
(
body
,
operands
,
NULL_PTR
,
constraints
,
NULL_PTR
);
get_asm_operand_lengths
(
body
,
n_operands
,
&
n_inputs
,
&
n_outputs
);
get_asm_operand_lengths
(
body
,
n_operands
,
&
n_inputs
,
&
n_outputs
);
record_asm_reg_life
(
insn
,
regstack
,
operands
,
constraints
,
record_asm_reg_life
(
insn
,
regstack
,
operands
,
constraints
,
n_inputs
,
n_outputs
);
n_inputs
,
n_outputs
);
...
@@ -2383,7 +2383,8 @@ subst_stack_regs (insn, regstack)
...
@@ -2383,7 +2383,8 @@ subst_stack_regs (insn, regstack)
char
**
constraints
char
**
constraints
=
(
char
**
)
alloca
(
n_operands
*
sizeof
(
char
*
));
=
(
char
**
)
alloca
(
n_operands
*
sizeof
(
char
*
));
decode_asm_operands
(
body
,
operands
,
operands_loc
,
constraints
,
0
);
decode_asm_operands
(
body
,
operands
,
operands_loc
,
constraints
,
NULL_PTR
);
get_asm_operand_lengths
(
body
,
n_operands
,
&
n_inputs
,
&
n_outputs
);
get_asm_operand_lengths
(
body
,
n_operands
,
&
n_inputs
,
&
n_outputs
);
subst_asm_stack_regs
(
insn
,
regstack
,
operands
,
operands_loc
,
subst_asm_stack_regs
(
insn
,
regstack
,
operands
,
operands_loc
,
constraints
,
n_inputs
,
n_outputs
);
constraints
,
n_inputs
,
n_outputs
);
...
@@ -2391,7 +2392,7 @@ subst_stack_regs (insn, regstack)
...
@@ -2391,7 +2392,7 @@ subst_stack_regs (insn, regstack)
}
}
if
(
GET_CODE
(
PATTERN
(
insn
))
==
PARALLEL
)
if
(
GET_CODE
(
PATTERN
(
insn
))
==
PARALLEL
)
for
(
i
=
0
;
i
<
XVECLEN
(
PATTERN
(
insn
)
,
0
);
i
++
)
for
(
i
=
0
;
i
<
XVECLEN
(
PATTERN
(
insn
),
0
);
i
++
)
{
{
if
(
stack_regs_mentioned_p
(
XVECEXP
(
PATTERN
(
insn
),
0
,
i
)))
if
(
stack_regs_mentioned_p
(
XVECEXP
(
PATTERN
(
insn
),
0
,
i
)))
subst_stack_regs_pat
(
insn
,
regstack
,
subst_stack_regs_pat
(
insn
,
regstack
,
...
...
gcc/rtl.c
View file @
c166a311
...
@@ -36,6 +36,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
...
@@ -36,6 +36,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
extern
struct
obstack
*
rtl_obstack
;
extern
struct
obstack
*
rtl_obstack
;
extern
long
ftell
();
extern
long
ftell
();
#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
extern
long
atol
();
#endif
/* Indexed by rtx code, gives number of operands for an rtx with that code.
/* Indexed by rtx code, gives number of operands for an rtx with that code.
Does NOT include rtx header data (code and links).
Does NOT include rtx header data (code and links).
...
@@ -136,6 +140,8 @@ char *rtx_format[] = {
...
@@ -136,6 +140,8 @@ char *rtx_format[] = {
"i" an integer
"i" an integer
prints the integer
prints the integer
"n" like "i", but prints entries from `note_insn_name'
"n" like "i", but prints entries from `note_insn_name'
"w" an integer of width HOST_BITS_PER_WIDE_INT
prints the integer
"s" a pointer to a string
"s" a pointer to a string
prints the string
prints the string
"S" like "s", but optional:
"S" like "s", but optional:
...
@@ -282,6 +288,7 @@ copy_rtx (orig)
...
@@ -282,6 +288,7 @@ copy_rtx (orig)
XEXP
(
copy
,
i
)
=
copy_rtx
(
XEXP
(
orig
,
i
));
XEXP
(
copy
,
i
)
=
copy_rtx
(
XEXP
(
orig
,
i
));
break
;
break
;
case
'0'
:
case
'u'
:
case
'u'
:
XEXP
(
copy
,
i
)
=
XEXP
(
orig
,
i
);
XEXP
(
copy
,
i
)
=
XEXP
(
orig
,
i
);
break
;
break
;
...
@@ -297,9 +304,21 @@ copy_rtx (orig)
...
@@ -297,9 +304,21 @@ copy_rtx (orig)
}
}
break
;
break
;
default
:
case
'w'
:
XWINT
(
copy
,
i
)
=
XWINT
(
orig
,
i
);
break
;
case
'i'
:
XINT
(
copy
,
i
)
=
XINT
(
orig
,
i
);
XINT
(
copy
,
i
)
=
XINT
(
orig
,
i
);
break
;
break
;
case
's'
:
case
'S'
:
XSTR
(
copy
,
i
)
=
XSTR
(
orig
,
i
);
break
;
default
:
abort
();
}
}
}
}
return
copy
;
return
copy
;
...
@@ -355,6 +374,7 @@ copy_most_rtx (orig, may_share)
...
@@ -355,6 +374,7 @@ copy_most_rtx (orig, may_share)
XEXP
(
copy
,
i
)
=
copy_most_rtx
(
XEXP
(
orig
,
i
),
may_share
);
XEXP
(
copy
,
i
)
=
copy_most_rtx
(
XEXP
(
orig
,
i
),
may_share
);
break
;
break
;
case
'0'
:
case
'u'
:
case
'u'
:
XEXP
(
copy
,
i
)
=
XEXP
(
orig
,
i
);
XEXP
(
copy
,
i
)
=
XEXP
(
orig
,
i
);
break
;
break
;
...
@@ -371,9 +391,22 @@ copy_most_rtx (orig, may_share)
...
@@ -371,9 +391,22 @@ copy_most_rtx (orig, may_share)
}
}
break
;
break
;
default
:
case
'w'
:
XWINT
(
copy
,
i
)
=
XWINT
(
orig
,
i
);
break
;
case
'n'
:
case
'i'
:
XINT
(
copy
,
i
)
=
XINT
(
orig
,
i
);
XINT
(
copy
,
i
)
=
XINT
(
orig
,
i
);
break
;
break
;
case
's'
:
case
'S'
:
XSTR
(
copy
,
i
)
=
XSTR
(
orig
,
i
);
break
;
default
:
abort
();
}
}
}
}
return
copy
;
return
copy
;
...
@@ -500,6 +533,7 @@ read_rtx (infile)
...
@@ -500,6 +533,7 @@ read_rtx (infile)
rtx
return_rtx
;
rtx
return_rtx
;
register
int
c
;
register
int
c
;
int
tmp_int
;
int
tmp_int
;
HOST_WIDE_INT
tmp_wide
;
/* Linked list structure for making RTXs: */
/* Linked list structure for making RTXs: */
struct
rtx_list
struct
rtx_list
...
@@ -612,8 +646,7 @@ read_rtx (infile)
...
@@ -612,8 +646,7 @@ read_rtx (infile)
}
}
/* get vector length and allocate it */
/* get vector length and allocate it */
XVEC
(
return_rtx
,
i
)
=
(
list_counter
XVEC
(
return_rtx
,
i
)
=
(
list_counter
?
rtvec_alloc
(
list_counter
)
?
rtvec_alloc
(
list_counter
)
:
NULL_RTVEC
);
:
(
struct
rtvec_def
*
)
NULL
);
if
(
list_counter
>
0
)
if
(
list_counter
>
0
)
{
{
next_rtx
=
list_rtx
;
next_rtx
=
list_rtx
;
...
@@ -684,6 +717,16 @@ read_rtx (infile)
...
@@ -684,6 +717,16 @@ read_rtx (infile)
}
}
break
;
break
;
case
'w'
:
read_name
(
tmp_char
,
infile
);
#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
tmp_wide
=
atoi
(
tmp_char
);
#else
tmp_wide
=
atol
(
tmp_char
);
#endif
XWINT
(
return_rtx
,
i
)
=
tmp_wide
;
break
;
case
'i'
:
case
'i'
:
case
'n'
:
case
'n'
:
read_name
(
tmp_char
,
infile
);
read_name
(
tmp_char
,
infile
);
...
@@ -737,7 +780,7 @@ init_rtl ()
...
@@ -737,7 +780,7 @@ init_rtl ()
/* Set the GET_RTX_FORMAT of CONST_DOUBLE to a string
/* Set the GET_RTX_FORMAT of CONST_DOUBLE to a string
of as many `i's as we now have elements. */
of as many `i's as we now have elements. */
for
(
i
=
0
;
i
<
rtx_length
[(
int
)
CONST_DOUBLE
];
i
++
)
for
(
i
=
0
;
i
<
rtx_length
[(
int
)
CONST_DOUBLE
];
i
++
)
*
s
++
=
'
i
'
;
*
s
++
=
'
w
'
;
*
s
++
=
0
;
*
s
++
=
0
;
}
}
#endif
#endif
...
...
gcc/rtlanal.c
View file @
c166a311
/* Analyze RTL for C-Compiler
/* Analyze RTL for C-Compiler
Copyright (C) 1987, 1988, 1991 Free Software Foundation, Inc.
Copyright (C) 1987, 1988, 1991
, 1992
Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -184,7 +184,7 @@ rtx_addr_varies_p (x)
...
@@ -184,7 +184,7 @@ rtx_addr_varies_p (x)
Only obvious integer terms are detected.
Only obvious integer terms are detected.
This is used in cse.c with the `related_value' field.*/
This is used in cse.c with the `related_value' field.*/
int
HOST_WIDE_INT
get_integer_term
(
x
)
get_integer_term
(
x
)
rtx
x
;
rtx
x
;
{
{
...
@@ -561,7 +561,7 @@ find_last_value (x, pinsn, valid_to)
...
@@ -561,7 +561,7 @@ find_last_value (x, pinsn, valid_to)
if
(
GET_RTX_CLASS
(
GET_CODE
(
p
))
==
'i'
)
if
(
GET_RTX_CLASS
(
GET_CODE
(
p
))
==
'i'
)
{
{
rtx
set
=
single_set
(
p
);
rtx
set
=
single_set
(
p
);
rtx
note
=
find_reg_note
(
p
,
REG_EQUAL
,
0
);
rtx
note
=
find_reg_note
(
p
,
REG_EQUAL
,
NULL_RTX
);
if
(
set
&&
rtx_equal_p
(
x
,
SET_DEST
(
set
)))
if
(
set
&&
rtx_equal_p
(
x
,
SET_DEST
(
set
)))
{
{
...
@@ -735,7 +735,7 @@ reg_overlap_mentioned_p (x, in)
...
@@ -735,7 +735,7 @@ reg_overlap_mentioned_p (x, in)
endregno
=
regno
+
(
regno
<
FIRST_PSEUDO_REGISTER
endregno
=
regno
+
(
regno
<
FIRST_PSEUDO_REGISTER
?
HARD_REGNO_NREGS
(
regno
,
GET_MODE
(
x
))
:
1
);
?
HARD_REGNO_NREGS
(
regno
,
GET_MODE
(
x
))
:
1
);
return
refers_to_regno_p
(
regno
,
endregno
,
in
,
0
);
return
refers_to_regno_p
(
regno
,
endregno
,
in
,
NULL_PTR
);
}
}
/* Used for communications between the next few functions. */
/* Used for communications between the next few functions. */
...
@@ -886,6 +886,11 @@ rtx_equal_p (x, y)
...
@@ -886,6 +886,11 @@ rtx_equal_p (x, y)
{
{
switch
(
fmt
[
i
])
switch
(
fmt
[
i
])
{
{
case
'w'
:
if
(
XWINT
(
x
,
i
)
!=
XWINT
(
y
,
i
))
return
0
;
break
;
case
'n'
:
case
'n'
:
case
'i'
:
case
'i'
:
if
(
XINT
(
x
,
i
)
!=
XINT
(
y
,
i
))
if
(
XINT
(
x
,
i
)
!=
XINT
(
y
,
i
))
...
...
gcc/stor-layout.c
View file @
c166a311
...
@@ -86,9 +86,9 @@ variable_size (size)
...
@@ -86,9 +86,9 @@ variable_size (size)
}
}
if
(
immediate_size_expand
)
if
(
immediate_size_expand
)
expand_expr
(
size
,
0
,
VOIDmode
,
0
);
expand_expr
(
size
,
NULL_PTR
,
VOIDmode
,
0
);
else
else
pending_sizes
=
tree_cons
(
0
,
size
,
pending_sizes
);
pending_sizes
=
tree_cons
(
NULL_TREE
,
size
,
pending_sizes
);
return
size
;
return
size
;
}
}
...
@@ -280,7 +280,7 @@ layout_record (rec)
...
@@ -280,7 +280,7 @@ layout_record (rec)
if
(
TREE_STATIC
(
field
))
if
(
TREE_STATIC
(
field
))
{
{
pending_statics
=
tree_cons
(
NULL
,
field
,
pending_statics
);
pending_statics
=
tree_cons
(
NULL
_TREE
,
field
,
pending_statics
);
continue
;
continue
;
}
}
/* Enumerators and enum types which are local to this class need not
/* Enumerators and enum types which are local to this class need not
...
@@ -873,14 +873,18 @@ make_signed_type (precision)
...
@@ -873,14 +873,18 @@ make_signed_type (precision)
/* Create the extreme values based on the number of bits. */
/* Create the extreme values based on the number of bits. */
TYPE_MIN_VALUE
(
type
)
TYPE_MIN_VALUE
(
type
)
=
build_int_2
((
precision
-
HOST_BITS_PER_INT
>
0
?
0
:
(
-
1
)
<<
(
precision
-
1
)),
=
build_int_2
((
precision
-
HOST_BITS_PER_WIDE_INT
>
0
(
-
1
)
<<
(
precision
-
HOST_BITS_PER_INT
-
1
>
0
?
0
:
(
HOST_WIDE_INT
)
(
-
1
)
<<
(
precision
-
1
)),
?
precision
-
HOST_BITS_PER_INT
-
1
(((
HOST_WIDE_INT
)
(
-
1
)
:
0
));
<<
(
precision
-
HOST_BITS_PER_WIDE_INT
-
1
>
0
?
precision
-
HOST_BITS_PER_WIDE_INT
-
1
:
0
))));
TYPE_MAX_VALUE
(
type
)
TYPE_MAX_VALUE
(
type
)
=
build_int_2
((
precision
-
HOST_BITS_PER_INT
>
0
?
-
1
:
(
1
<<
(
precision
-
1
))
-
1
),
=
build_int_2
((
precision
-
HOST_BITS_PER_WIDE_INT
>
0
(
precision
-
HOST_BITS_PER_INT
-
1
>
0
?
-
1
:
((
HOST_WIDE_INT
)
1
<<
(
precision
-
1
))
-
1
),
?
(
1
<<
(
precision
-
HOST_BITS_PER_INT
-
1
))
-
1
(
precision
-
HOST_BITS_PER_WIDE_INT
-
1
>
0
?
(((
HOST_WIDE_INT
)
1
<<
(
precision
-
HOST_BITS_PER_INT
-
1
)))
-
1
:
0
));
:
0
));
/* Give this type's extreme values this type as their type. */
/* Give this type's extreme values this type as their type. */
...
@@ -937,10 +941,12 @@ fixup_unsigned_type (type)
...
@@ -937,10 +941,12 @@ fixup_unsigned_type (type)
TYPE_MIN_VALUE
(
type
)
=
build_int_2
(
0
,
0
);
TYPE_MIN_VALUE
(
type
)
=
build_int_2
(
0
,
0
);
TYPE_MAX_VALUE
(
type
)
TYPE_MAX_VALUE
(
type
)
=
build_int_2
(
precision
-
HOST_BITS_PER_INT
>=
0
?
-
1
:
(
1
<<
precision
)
-
1
,
=
build_int_2
(
precision
-
HOST_BITS_PER_WIDE_INT
>=
0
precision
-
HOST_BITS_PER_INT
>
0
?
-
1
:
((
HOST_WIDE_INT
)
1
<<
precision
)
-
1
,
?
((
unsigned
)
~
0
precision
-
HOST_BITS_PER_WIDE_INT
>
0
>>
(
HOST_BITS_PER_INT
-
(
precision
-
HOST_BITS_PER_INT
)))
?
((
unsigned
HOST_WIDE_INT
)
~
0
>>
(
HOST_BITS_PER_WIDE_INT
-
(
precision
-
HOST_BITS_PER_WIDE_INT
)))
:
0
);
:
0
);
TREE_TYPE
(
TYPE_MIN_VALUE
(
type
))
=
type
;
TREE_TYPE
(
TYPE_MIN_VALUE
(
type
))
=
type
;
TREE_TYPE
(
TYPE_MAX_VALUE
(
type
))
=
type
;
TREE_TYPE
(
TYPE_MAX_VALUE
(
type
))
=
type
;
...
...
gcc/unroll.c
View file @
c166a311
...
@@ -783,15 +783,14 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
...
@@ -783,15 +783,14 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
improperly shared rtl. */
improperly shared rtl. */
diff
=
expand_binop
(
mode
,
sub_optab
,
copy_rtx
(
final_value
),
diff
=
expand_binop
(
mode
,
sub_optab
,
copy_rtx
(
final_value
),
copy_rtx
(
initial_value
),
0
,
0
,
copy_rtx
(
initial_value
),
NULL_RTX
,
0
,
OPTAB_LIB_WIDEN
);
OPTAB_LIB_WIDEN
);
/* Now calculate (diff % (unroll * abs (increment))) by using an
/* Now calculate (diff % (unroll * abs (increment))) by using an
and instruction. */
and instruction. */
diff
=
expand_binop
(
GET_MODE
(
diff
),
and_optab
,
diff
,
diff
=
expand_binop
(
GET_MODE
(
diff
),
and_optab
,
diff
,
gen_rtx
(
CONST_INT
,
VOIDmode
,
GEN_INT
(
unroll_number
*
abs_inc
-
1
),
unroll_number
*
abs_inc
-
1
),
NULL_RTX
,
0
,
OPTAB_LIB_WIDEN
);
0
,
0
,
OPTAB_LIB_WIDEN
);
/* Now emit a sequence of branches to jump to the proper precond
/* Now emit a sequence of branches to jump to the proper precond
loop entry point. */
loop entry point. */
...
@@ -826,9 +825,8 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
...
@@ -826,9 +825,8 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
else
else
cmp_const
=
i
;
cmp_const
=
i
;
emit_cmp_insn
(
diff
,
gen_rtx
(
CONST_INT
,
VOIDmode
,
emit_cmp_insn
(
diff
,
GEN_INT
(
abs_inc
*
cmp_const
),
abs_inc
*
cmp_const
),
EQ
,
NULL_RTX
,
mode
,
0
,
0
);
EQ
,
0
,
mode
,
0
,
0
);
if
(
i
==
0
)
if
(
i
==
0
)
emit_jump_insn
(
gen_beq
(
labels
[
i
]));
emit_jump_insn
(
gen_beq
(
labels
[
i
]));
...
@@ -858,8 +856,8 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
...
@@ -858,8 +856,8 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
else
else
cmp_const
=
abs_inc
*
(
unroll_number
-
1
)
+
1
;
cmp_const
=
abs_inc
*
(
unroll_number
-
1
)
+
1
;
emit_cmp_insn
(
diff
,
gen_rtx
(
CONST_INT
,
VOIDmode
,
cmp_const
)
,
emit_cmp_insn
(
diff
,
GEN_INT
(
cmp_const
),
EQ
,
NULL_RTX
,
EQ
,
0
,
mode
,
0
,
0
);
mode
,
0
,
0
);
if
(
neg_inc
)
if
(
neg_inc
)
emit_jump_insn
(
gen_ble
(
labels
[
0
]));
emit_jump_insn
(
gen_ble
(
labels
[
0
]));
...
@@ -1178,7 +1176,7 @@ precondition_loop_p (initial_value, final_value, increment, loop_start,
...
@@ -1178,7 +1176,7 @@ precondition_loop_p (initial_value, final_value, increment, loop_start,
{
{
*
initial_value
=
const0_rtx
;
*
initial_value
=
const0_rtx
;
*
increment
=
const1_rtx
;
*
increment
=
const1_rtx
;
*
final_value
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
loop_n_iterations
);
*
final_value
=
GEN_INT
(
loop_n_iterations
);
if
(
loop_dump_stream
)
if
(
loop_dump_stream
)
fprintf
(
loop_dump_stream
,
fprintf
(
loop_dump_stream
,
...
@@ -1583,8 +1581,7 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
...
@@ -1583,8 +1581,7 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
#endif
#endif
splittable_regs
[
regno
]
splittable_regs
[
regno
]
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
=
GEN_INT
(
INTVAL
(
giv_inc
)
INTVAL
(
giv_inc
)
+
INTVAL
(
splittable_regs
[
regno
]));
+
INTVAL
(
splittable_regs
[
regno
]));
giv_inc
=
splittable_regs
[
regno
];
giv_inc
=
splittable_regs
[
regno
];
...
@@ -2391,7 +2388,7 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
...
@@ -2391,7 +2388,7 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
/* Check for the case where the pseudo is set by a shift/add
/* Check for the case where the pseudo is set by a shift/add
sequence, in which case the first insn setting the pseudo
sequence, in which case the first insn setting the pseudo
is the first insn of the shift/add sequence. */
is the first insn of the shift/add sequence. */
&&
(
!
(
tem
=
find_reg_note
(
v
->
insn
,
REG_RETVAL
,
0
))
&&
(
!
(
tem
=
find_reg_note
(
v
->
insn
,
REG_RETVAL
,
NULL_RTX
))
||
(
regno_first_uid
[
REGNO
(
v
->
dest_reg
)]
||
(
regno_first_uid
[
REGNO
(
v
->
dest_reg
)]
!=
INSN_UID
(
XEXP
(
tem
,
0
)))))
!=
INSN_UID
(
XEXP
(
tem
,
0
)))))
/* Line above always fails if INSN was moved by loop opt. */
/* Line above always fails if INSN was moved by loop opt. */
...
@@ -2785,8 +2782,7 @@ final_biv_value (bl, loop_start, loop_end)
...
@@ -2785,8 +2782,7 @@ final_biv_value (bl, loop_start, loop_end)
case it is needed later. */
case it is needed later. */
tem
=
gen_reg_rtx
(
bl
->
biv
->
mode
);
tem
=
gen_reg_rtx
(
bl
->
biv
->
mode
);
emit_iv_add_mult
(
increment
,
emit_iv_add_mult
(
increment
,
GEN_INT
(
loop_n_iterations
),
gen_rtx
(
CONST_INT
,
VOIDmode
,
loop_n_iterations
),
bl
->
initial_value
,
tem
,
NEXT_INSN
(
loop_end
));
bl
->
initial_value
,
tem
,
NEXT_INSN
(
loop_end
));
if
(
loop_dump_stream
)
if
(
loop_dump_stream
)
...
@@ -2877,8 +2873,7 @@ final_giv_value (v, loop_start, loop_end)
...
@@ -2877,8 +2873,7 @@ final_giv_value (v, loop_start, loop_end)
/* Put the final biv value in tem. */
/* Put the final biv value in tem. */
tem
=
gen_reg_rtx
(
bl
->
biv
->
mode
);
tem
=
gen_reg_rtx
(
bl
->
biv
->
mode
);
emit_iv_add_mult
(
increment
,
emit_iv_add_mult
(
increment
,
GEN_INT
(
loop_n_iterations
),
gen_rtx
(
CONST_INT
,
VOIDmode
,
loop_n_iterations
),
bl
->
initial_value
,
tem
,
insert_before
);
bl
->
initial_value
,
tem
,
insert_before
);
/* Subtract off extra increments as we find them. */
/* Subtract off extra increments as we find them. */
...
@@ -2904,7 +2899,7 @@ final_giv_value (v, loop_start, loop_end)
...
@@ -2904,7 +2899,7 @@ final_giv_value (v, loop_start, loop_end)
start_sequence
();
start_sequence
();
tem
=
expand_binop
(
GET_MODE
(
tem
),
sub_optab
,
tem
,
tem
=
expand_binop
(
GET_MODE
(
tem
),
sub_optab
,
tem
,
XEXP
(
SET_SRC
(
pattern
),
1
),
0
,
0
,
XEXP
(
SET_SRC
(
pattern
),
1
),
NULL_RTX
,
0
,
OPTAB_LIB_WIDEN
);
OPTAB_LIB_WIDEN
);
seq
=
gen_sequence
();
seq
=
gen_sequence
();
end_sequence
();
end_sequence
();
...
@@ -2947,14 +2942,15 @@ final_giv_value (v, loop_start, loop_end)
...
@@ -2947,14 +2942,15 @@ final_giv_value (v, loop_start, loop_end)
/* Calculate the number of loop iterations. Returns the exact number of loop
/* Calculate the number of loop iterations. Returns the exact number of loop
iterations if it can be calculated, otherwise returns zero. */
iterations if it can be calculated, otherwise returns zero. */
unsigned
long
unsigned
HOST_WIDE_INT
loop_iterations
(
loop_start
,
loop_end
)
loop_iterations
(
loop_start
,
loop_end
)
rtx
loop_start
,
loop_end
;
rtx
loop_start
,
loop_end
;
{
{
rtx
comparison
,
comparison_value
;
rtx
comparison
,
comparison_value
;
rtx
iteration_var
,
initial_value
,
increment
,
final_value
;
rtx
iteration_var
,
initial_value
,
increment
,
final_value
;
enum
rtx_code
comparison_code
;
enum
rtx_code
comparison_code
;
int
i
,
increment_dir
;
HOST_WIDE_INT
i
;
int
increment_dir
;
int
unsigned_compare
,
compare_dir
,
final_larger
;
int
unsigned_compare
,
compare_dir
,
final_larger
;
unsigned
long
tempu
;
unsigned
long
tempu
;
rtx
last_loop_insn
;
rtx
last_loop_insn
;
...
@@ -3044,7 +3040,7 @@ loop_iterations (loop_start, loop_end)
...
@@ -3044,7 +3040,7 @@ loop_iterations (loop_start, loop_end)
&&
(
set
=
single_set
(
insn
))
&&
(
set
=
single_set
(
insn
))
&&
(
SET_DEST
(
set
)
==
comparison_value
))
&&
(
SET_DEST
(
set
)
==
comparison_value
))
{
{
rtx
note
=
find_reg_note
(
insn
,
REG_EQUAL
,
0
);
rtx
note
=
find_reg_note
(
insn
,
REG_EQUAL
,
NULL_RTX
);
if
(
note
&&
GET_CODE
(
XEXP
(
note
,
0
))
!=
EXPR_LIST
)
if
(
note
&&
GET_CODE
(
XEXP
(
note
,
0
))
!=
EXPR_LIST
)
comparison_value
=
XEXP
(
note
,
0
);
comparison_value
=
XEXP
(
note
,
0
);
...
@@ -3094,11 +3090,13 @@ loop_iterations (loop_start, loop_end)
...
@@ -3094,11 +3090,13 @@ loop_iterations (loop_start, loop_end)
/* Final_larger is 1 if final larger, 0 if they are equal, otherwise -1. */
/* Final_larger is 1 if final larger, 0 if they are equal, otherwise -1. */
if
(
unsigned_compare
)
if
(
unsigned_compare
)
final_larger
final_larger
=
((
unsigned
)
INTVAL
(
final_value
)
>
(
unsigned
)
INTVAL
(
initial_value
))
-
=
((
unsigned
HOST_WIDE_INT
)
INTVAL
(
final_value
)
((
unsigned
)
INTVAL
(
final_value
)
<
(
unsigned
)
INTVAL
(
initial_value
));
>
(
unsigned
HOST_WIDE_INT
)
INTVAL
(
initial_value
))
-
((
unsigned
HOST_WIDE_INT
)
INTVAL
(
final_value
)
<
(
unsigned
HOST_WIDE_INT
)
INTVAL
(
initial_value
));
else
else
final_larger
=
(
INTVAL
(
final_value
)
>
INTVAL
(
initial_value
))
-
final_larger
=
(
INTVAL
(
final_value
)
>
INTVAL
(
initial_value
))
(
INTVAL
(
final_value
)
<
INTVAL
(
initial_value
));
-
(
INTVAL
(
final_value
)
<
INTVAL
(
initial_value
));
if
(
INTVAL
(
increment
)
>
0
)
if
(
INTVAL
(
increment
)
>
0
)
increment_dir
=
1
;
increment_dir
=
1
;
...
...
gcc/xcoffout.c
View file @
c166a311
...
@@ -359,7 +359,7 @@ xcoffout_block (block, depth, args)
...
@@ -359,7 +359,7 @@ xcoffout_block (block, depth, args)
next_block_number
++
;
next_block_number
++
;
/* Output the subblocks. */
/* Output the subblocks. */
xcoffout_block
(
BLOCK_SUBBLOCKS
(
block
),
depth
+
1
,
0
);
xcoffout_block
(
BLOCK_SUBBLOCKS
(
block
),
depth
+
1
,
NULL_TREE
);
}
}
block
=
BLOCK_CHAIN
(
block
);
block
=
BLOCK_CHAIN
(
block
);
}
}
...
...
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