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
72eaa7a0
Commit
72eaa7a0
authored
Jan 19, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(add_1_to_mem): Deleted.
(output_operand_address): Added output modifier 'A'. From-SVN: r13527
parent
a9cd25ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
68 deletions
+18
-68
gcc/config/1750a/1750a.c
+18
-68
No files found.
gcc/config/1750a/1750a.c
View file @
72eaa7a0
...
@@ -369,68 +369,6 @@ simple_memory_operand (op, mode)
...
@@ -369,68 +369,6 @@ simple_memory_operand (op, mode)
}
}
/* destructively add one to memory address */
add_1_to_mem
(
opnd
)
/* returns 0 for success, -1 for failure */
rtx
opnd
;
/* OPND must be a MEM rtx */
{
rtx
inner
=
XEXP
(
opnd
,
0
);
if
(
GET_CODE
(
opnd
)
!=
MEM
)
{
fprintf
(
stderr
,
"add_1_to_mem: input is not MEM
\n
"
);
return
-
1
;
/* failure */
}
switch
(
GET_CODE
(
inner
))
{
case
CONST
:
inner
=
XEXP
(
inner
,
0
);
if
(
GET_CODE
(
inner
)
!=
PLUS
||
GET_CODE
(
XEXP
(
inner
,
1
))
!=
CONST_INT
)
{
fprintf
(
stderr
,
"add_1_to_mem: CONST failure
\n
"
);
return
-
1
;
}
INTVAL
(
XEXP
(
XEXP
(
XEXP
(
opnd
,
0
),
0
),
1
))
+=
1
;
break
;
case
REG
:
XEXP
(
opnd
,
0
)
=
gen_rtx
(
PLUS
,
Pmode
,
inner
,
const1_rtx
);
break
;
case
SYMBOL_REF
:
case
LABEL_REF
:
XEXP
(
opnd
,
0
)
=
gen_rtx
(
CONST
,
VOIDmode
,
gen_rtx
(
PLUS
,
Pmode
,
inner
,
const1_rtx
));
break
;
case
PLUS
:
inner
=
XEXP
(
inner
,
1
);
switch
(
GET_CODE
(
inner
))
{
case
CONST
:
inner
=
XEXP
(
inner
,
0
);
if
(
GET_CODE
(
inner
)
!=
PLUS
||
GET_CODE
(
XEXP
(
inner
,
1
))
!=
CONST_INT
)
{
fprintf
(
stderr
,
"add_1_to_mem: PLUS CONST failure
\n
"
);
return
-
1
;
}
INTVAL
(
XEXP
(
XEXP
(
XEXP
(
XEXP
(
opnd
,
0
),
1
),
0
),
1
))
+=
1
;
break
;
case
CONST_INT
:
INTVAL
(
XEXP
(
XEXP
(
opnd
,
0
),
1
))
+=
1
;
break
;
case
SYMBOL_REF
:
case
LABEL_REF
:
XEXP
(
XEXP
(
opnd
,
0
),
1
)
=
gen_rtx
(
CONST
,
VOIDmode
,
gen_rtx
(
PLUS
,
Pmode
,
inner
,
const1_rtx
));
break
;
default
:
fprintf
(
stderr
,
"add_1_to_mem: PLUS failure
\n
"
);
return
-
1
;
}
}
return
0
;
}
/* Decide whether to output a conditional jump as a "Jump Conditional"
/* Decide whether to output a conditional jump as a "Jump Conditional"
or as a "Branch Conditional": */
or as a "Branch Conditional": */
...
@@ -504,6 +442,7 @@ next_cc_user_is_unsigned (insn)
...
@@ -504,6 +442,7 @@ next_cc_user_is_unsigned (insn)
}
}
static
int
addr_inc
;
/* The PRINT_OPERAND and PRINT_OPERAND_ADDRESS macros have been
/* The PRINT_OPERAND and PRINT_OPERAND_ADDRESS macros have been
made functions: */
made functions: */
...
@@ -520,6 +459,8 @@ print_operand (file, x, kode)
...
@@ -520,6 +459,8 @@ print_operand (file, x, kode)
break
;
break
;
case
SYMBOL_REF
:
case
SYMBOL_REF
:
fprintf
(
file
,
"%s"
,
XSTR
(
x
,
0
));
fprintf
(
file
,
"%s"
,
XSTR
(
x
,
0
));
if
(
kode
==
'A'
)
fprintf
(
file
,
"+1"
);
break
;
break
;
case
LABEL_REF
:
case
LABEL_REF
:
case
CONST
:
case
CONST
:
...
@@ -541,7 +482,10 @@ print_operand (file, x, kode)
...
@@ -541,7 +482,10 @@ print_operand (file, x, kode)
}
}
}
}
else
else
output_address
(
XEXP
(
x
,
0
));
{
addr_inc
=
(
kode
==
'A'
?
1
:
0
);
output_address
(
XEXP
(
x
,
0
));
}
break
;
break
;
case
CONST_DOUBLE
:
case
CONST_DOUBLE
:
/* {
/* {
...
@@ -647,6 +591,7 @@ print_operand (file, x, kode)
...
@@ -647,6 +591,7 @@ print_operand (file, x, kode)
default
:
default
:
fprintf
(
file
,
"p_o_UFO code=%d"
,
GET_CODE
(
x
));
fprintf
(
file
,
"p_o_UFO code=%d"
,
GET_CODE
(
x
));
}
}
addr_inc
=
0
;
}
}
print_operand_address
(
file
,
addr
)
print_operand_address
(
file
,
addr
)
...
@@ -656,7 +601,7 @@ print_operand_address (file, addr)
...
@@ -656,7 +601,7 @@ print_operand_address (file, addr)
switch
(
GET_CODE
(
addr
))
switch
(
GET_CODE
(
addr
))
{
{
case
REG
:
case
REG
:
fprintf
(
file
,
"
0,r%d ; P_O_A"
,
REGNO
(
addr
));
fprintf
(
file
,
"
%d,r%d ; P_O_A"
,
addr_inc
,
REGNO
(
addr
));
break
;
break
;
case
PLUS
:
case
PLUS
:
{
{
...
@@ -671,11 +616,13 @@ print_operand_address (file, addr)
...
@@ -671,11 +616,13 @@ print_operand_address (file, addr)
fprintf
(
file
,
",r%d ;P_O_A reg + const expr"
,
REGNO
(
x
));
fprintf
(
file
,
",r%d ;P_O_A reg + const expr"
,
REGNO
(
x
));
break
;
break
;
case
CONST_INT
:
case
CONST_INT
:
fprintf
(
file
,
"%d,r%d"
,
INTVAL
(
y
),
REGNO
(
x
));
fprintf
(
file
,
"%d,r%d"
,
INTVAL
(
y
)
+
addr_inc
,
REGNO
(
x
));
break
;
break
;
case
SYMBOL_REF
:
case
SYMBOL_REF
:
fprintf
(
file
,
"%s,r%d ; P_O_A reg + sym"
,
fprintf
(
file
,
"%s"
,
XSTR
(
y
,
0
));
XSTR
(
y
,
0
),
REGNO
(
x
));
if
(
addr_inc
)
fprintf
(
file
,
"+%d"
,
addr_inc
);
fprintf
(
file
,
",r%d ; P_O_A reg + sym"
,
REGNO
(
x
));
break
;
break
;
case
LABEL_REF
:
case
LABEL_REF
:
output_address
(
XEXP
(
y
,
0
));
output_address
(
XEXP
(
y
,
0
));
...
@@ -693,7 +640,7 @@ print_operand_address (file, addr)
...
@@ -693,7 +640,7 @@ print_operand_address (file, addr)
switch
(
GET_CODE
(
y
))
switch
(
GET_CODE
(
y
))
{
{
case
CONST_INT
:
case
CONST_INT
:
fprintf
(
file
,
"%d+%s"
,
INTVAL
(
y
),
XSTR
(
x
,
0
));
fprintf
(
file
,
"%d+%s"
,
INTVAL
(
y
)
+
addr_inc
,
XSTR
(
x
,
0
));
break
;
break
;
case
REG
:
case
REG
:
fprintf
(
file
,
"%s,r%d ;P_O_A sym + reg"
,
fprintf
(
file
,
"%s,r%d ;P_O_A sym + reg"
,
...
@@ -735,6 +682,8 @@ print_operand_address (file, addr)
...
@@ -735,6 +682,8 @@ print_operand_address (file, addr)
case
LABEL_REF
:
case
LABEL_REF
:
case
SYMBOL_REF
:
case
SYMBOL_REF
:
fprintf
(
file
,
"%s"
,
XSTR
(
addr
,
0
));
fprintf
(
file
,
"%s"
,
XSTR
(
addr
,
0
));
if
(
addr_inc
)
fprintf
(
file
,
"+%d"
,
addr_inc
);
break
;
break
;
case
MEM
:
case
MEM
:
fprintf
(
file
,
"[memUFO:"
);
fprintf
(
file
,
"[memUFO:"
);
...
@@ -753,5 +702,6 @@ print_operand_address (file, addr)
...
@@ -753,5 +702,6 @@ print_operand_address (file, addr)
(
int
)
GET_CODE
(
addr
),
INTVAL
(
addr
));
(
int
)
GET_CODE
(
addr
),
INTVAL
(
addr
));
break
;
break
;
}
}
addr_inc
=
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