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
1120a1d3
Commit
1120a1d3
authored
Dec 07, 2000
by
Kazu Hirata
Committed by
Jeff Law
Dec 06, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/h8300/h8300.h: Fix formatting.
From-SVN: r38095
parent
bc98ef7f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
93 deletions
+128
-93
gcc/ChangeLog
+4
-0
gcc/config/h8300/h8300.h
+124
-93
No files found.
gcc/ChangeLog
View file @
1120a1d3
2000-12-06 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.h: Fix formatting.
2000-12-06 Joel Sherrill <joel@OARcorp.com>
2000-12-06 Joel Sherrill <joel@OARcorp.com>
* config.gcc (a29k*-*-rtems*, arm*-*-rtems*, c4x-*-rtems*,
* config.gcc (a29k*-*-rtems*, arm*-*-rtems*, c4x-*-rtems*,
...
...
gcc/config/h8300/h8300.h
View file @
1120a1d3
...
@@ -502,11 +502,11 @@ enum reg_class {
...
@@ -502,11 +502,11 @@ enum reg_class {
dangerous, so we claim that it always pushes a word, then we catch
dangerous, so we claim that it always pushes a word, then we catch
the mov.b rx,@-sp and turn it into a mov.w rx,@-sp on output.
the mov.b rx,@-sp and turn it into a mov.w rx,@-sp on output.
On the H8/300
h, we simplify TARGET_QUICKCALL by setting this to 4 and doing
On the H8/300
H, we simplify TARGET_QUICKCALL by setting this to 4
a similar thing. */
a
nd doing a
similar thing. */
#define PUSH_ROUNDING(BYTES) \
#define PUSH_ROUNDING(BYTES) \
(((BYTES) + PARM_BOUNDARY
/8 - 1) & -PARM_BOUNDARY/
8)
(((BYTES) + PARM_BOUNDARY
/ 8 - 1) & -PARM_BOUNDARY /
8)
/* Offset of first parameter from the argument pointer register value. */
/* Offset of first parameter from the argument pointer register value. */
/* Is equal to the size of the saved fp + pc, even if an fp isn't
/* Is equal to the size of the saved fp + pc, even if an fp isn't
...
@@ -574,7 +574,7 @@ enum reg_class {
...
@@ -574,7 +574,7 @@ enum reg_class {
/* Define how to find the value returned by a library function
/* Define how to find the value returned by a library function
assuming the value has mode MODE. */
assuming the value has mode MODE. */
/* On the
h8 the return value is in R0/R1
*/
/* On the
H8 the return value is in R0/R1.
*/
#define LIBCALL_VALUE(MODE) \
#define LIBCALL_VALUE(MODE) \
gen_rtx_REG (MODE, 0)
gen_rtx_REG (MODE, 0)
...
@@ -615,9 +615,9 @@ enum reg_class {
...
@@ -615,9 +615,9 @@ enum reg_class {
and about the args processed so far, enough to enable macros
and about the args processed so far, enough to enable macros
such as FUNCTION_ARG to determine where the next arg should go.
such as FUNCTION_ARG to determine where the next arg should go.
On the H8/300, this is a two item struct, the first is the number
of bytes
On the H8/300, this is a two item struct, the first is the number
scanned so far and the second is the rtx of the called library
of bytes scanned so far and the second is the rtx of the called
function if any. */
library
function if any. */
#define CUMULATIVE_ARGS struct cum_arg
#define CUMULATIVE_ARGS struct cum_arg
struct
cum_arg
struct
cum_arg
...
@@ -989,7 +989,7 @@ struct cum_arg
...
@@ -989,7 +989,7 @@ struct cum_arg
#define Pmode (TARGET_H8300H || TARGET_H8300S ? SImode : HImode)
#define Pmode (TARGET_H8300H || TARGET_H8300S ? SImode : HImode)
/* ANSI C types.
/* ANSI C types.
We use longs for the 300
h
because ints can be 16 or 32.
We use longs for the 300
H
because ints can be 16 or 32.
GCC requires SIZE_TYPE to be the same size as pointers. */
GCC requires SIZE_TYPE to be the same size as pointers. */
#define NO_BUILTIN_SIZE_TYPE
#define NO_BUILTIN_SIZE_TYPE
#define NO_BUILTIN_PTRDIFF_TYPE
#define NO_BUILTIN_PTRDIFF_TYPE
...
@@ -1111,45 +1111,53 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
...
@@ -1111,45 +1111,53 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
#define EXTRA_SECTIONS in_ctors, in_dtors, in_readonly_data
#define EXTRA_SECTIONS in_ctors, in_dtors, in_readonly_data
#define EXTRA_SECTION_FUNCTIONS \
#define EXTRA_SECTION_FUNCTIONS
\
\
\
void \
void
\
ctors_section ()
\
ctors_section ()
\
{ \
{
\
if (in_section != in_ctors) \
if (in_section != in_ctors)
\
{ \
{
\
fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);
\
in_section = in_ctors; \
in_section = in_ctors;
\
} \
}
\
} \
}
\
\
\
void \
void
\
dtors_section ()
\
dtors_section ()
\
{ \
{
\
if (in_section != in_dtors) \
if (in_section != in_dtors)
\
{ \
{
\
fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);
\
in_section = in_dtors; \
in_section = in_dtors;
\
} \
}
\
} \
}
\
\
\
void \
void
\
readonly_data ()
\
readonly_data ()
\
{ \
{
\
if (in_section != in_readonly_data) \
if (in_section != in_readonly_data)
\
{ \
{
\
fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP);\
fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP);
\
in_section = in_readonly_data; \
in_section = in_readonly_data;
\
} \
}
\
}
}
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
do { ctors_section(); \
do \
fprintf(FILE, "%s_%s\n", ASM_WORD_OP, NAME); } while (0)
{ \
ctors_section (); \
fprintf (FILE, "%s_%s\n", ASM_WORD_OP, NAME); \
} \
while (0)
#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
do { dtors_section(); \
do \
fprintf(FILE, "%s_%s\n", ASM_WORD_OP, NAME); } while (0)
{ \
dtors_section (); \
fprintf (FILE, "%s_%s\n", ASM_WORD_OP, NAME); \
} \
while (0)
#undef DO_GLOBAL_CTORS_BODY
#undef DO_GLOBAL_CTORS_BODY
#define DO_GLOBAL_CTORS_BODY \
#define DO_GLOBAL_CTORS_BODY \
...
@@ -1182,29 +1190,31 @@ readonly_data () \
...
@@ -1182,29 +1190,31 @@ readonly_data () \
/* If we are referencing a function that is supposed to be called
/* If we are referencing a function that is supposed to be called
through the function vector, the SYMBOL_REF_FLAG in the rtl
through the function vector, the SYMBOL_REF_FLAG in the rtl
so the call patterns can generate the correct code. */
so the call patterns can generate the correct code. */
#define ENCODE_SECTION_INFO(DECL)
\
#define ENCODE_SECTION_INFO(DECL)
\
if (TREE_CODE (DECL) == FUNCTION_DECL
\
if (TREE_CODE (DECL) == FUNCTION_DECL
\
&& h8300_funcvec_function_p (DECL))
\
&& h8300_funcvec_function_p (DECL))
\
SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;
\
SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;
\
else if ((TREE_STATIC (DECL) || DECL_EXTERNAL (DECL))
\
else if ((TREE_STATIC (DECL) || DECL_EXTERNAL (DECL))
\
&& TREE_CODE (DECL) == VAR_DECL
\
&& TREE_CODE (DECL) == VAR_DECL
\
&& h8300_eightbit_data_p (DECL))
\
&& h8300_eightbit_data_p (DECL))
\
SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;
\
SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;
\
else if ((TREE_STATIC (DECL) || DECL_EXTERNAL (DECL))
\
else if ((TREE_STATIC (DECL) || DECL_EXTERNAL (DECL))
\
&& TREE_CODE (DECL) == VAR_DECL
\
&& TREE_CODE (DECL) == VAR_DECL
\
&& h8300_tiny_data_p (DECL))
\
&& h8300_tiny_data_p (DECL))
\
h8300_encode_label (DECL);
h8300_encode_label (DECL);
/* Store the user-specified part of SYMBOL_NAME in VAR.
/* Store the user-specified part of SYMBOL_NAME in VAR.
This is sort of inverse to ENCODE_SECTION_INFO. */
This is sort of inverse to ENCODE_SECTION_INFO. */
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
(VAR) = (SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' || (SYMBOL_NAME)[0] == '@' || (SYMBOL_NAME)[0] == '&')
(VAR) = (SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' \
|| (SYMBOL_NAME)[0] == '@' \
|| (SYMBOL_NAME)[0] == '&');
/* How to refer to registers in assembler output.
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */
This sequence is indexed by compiler's hard-register-number (see above). */
#define REGISTER_NAMES \
#define REGISTER_NAMES \
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "sp", "mac", "ap"}
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "sp", "mac", "ap"
}
#define ADDITIONAL_REGISTER_NAMES \
#define ADDITIONAL_REGISTER_NAMES \
{ {"er0", 0}, {"er1", 1}, {"er2", 2}, {"er3", 3}, {"er4", 4}, \
{ {"er0", 0}, {"er1", 1}, {"er2", 2}, {"er3", 3}, {"er4", 4}, \
...
@@ -1243,8 +1253,13 @@ readonly_data () \
...
@@ -1243,8 +1253,13 @@ readonly_data () \
/* This is how to output the definition of a user-level label named NAME,
/* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */
such as the label on a static function or variable NAME. */
#define ASM_OUTPUT_LABEL(FILE, NAME) \
#define ASM_OUTPUT_LABEL(FILE, NAME) \
do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
do \
{ \
assemble_name (FILE, NAME); \
fputs (":\n", FILE); \
} \
while (0)
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
asm_fprintf ((FILE), "%U%s", (NAME) + (TINY_DATA_NAME_P (NAME) ? 1 : 0))
asm_fprintf ((FILE), "%U%s", (NAME) + (TINY_DATA_NAME_P (NAME) ? 1 : 0))
...
@@ -1254,8 +1269,14 @@ readonly_data () \
...
@@ -1254,8 +1269,14 @@ readonly_data () \
/* This is how to output a command to make the user-level label named NAME
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
defined for reference from other files. */
#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
do \
{ \
fputs ("\t.global ", FILE); \
assemble_name (FILE, NAME); \
fputs ("\n", FILE); \
} \
while (0)
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
ASM_OUTPUT_LABEL(FILE, NAME)
ASM_OUTPUT_LABEL(FILE, NAME)
...
@@ -1284,18 +1305,22 @@ readonly_data () \
...
@@ -1284,18 +1305,22 @@ readonly_data () \
/* This is how to output an assembler line defining a `double' constant.
/* This is how to output an assembler line defining a `double' constant.
It is .dfloat or .gfloat, depending. */
It is .dfloat or .gfloat, depending. */
#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
do { char dstr[30]; \
do \
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
{ \
fprintf (FILE, "\t.double %s\n", dstr); \
char dstr[30]; \
} while (0)
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
fprintf (FILE, "\t.double %s\n", dstr); \
} while (0)
/* This is how to output an assembler line defining a `float' constant. */
/* This is how to output an assembler line defining a `float' constant. */
#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
do { char dstr[30]; \
do \
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
{ \
fprintf (FILE, "\t.float %s\n", dstr); \
char dstr[30]; \
} while (0)
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
fprintf (FILE, "\t.float %s\n", dstr); \
} while (0)
/* This is how to output an assembler line defining an `int' constant. */
/* This is how to output an assembler line defining an `int' constant. */
...
@@ -1354,7 +1379,7 @@ do { char dstr[30]; \
...
@@ -1354,7 +1379,7 @@ do { char dstr[30]; \
that says to advance the location counter by SIZE bytes. */
that says to advance the location counter by SIZE bytes. */
#define ASM_OUTPUT_IDENT(FILE, NAME) \
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf(FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME)
fprintf
(FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME)
#define ASM_OUTPUT_SKIP(FILE, SIZE) \
#define ASM_OUTPUT_SKIP(FILE, SIZE) \
fprintf (FILE, "\t.space %d\n", (SIZE))
fprintf (FILE, "\t.space %d\n", (SIZE))
...
@@ -1406,12 +1431,12 @@ do { char dstr[30]; \
...
@@ -1406,12 +1431,12 @@ do { char dstr[30]; \
#define TARGET_CR 015
#define TARGET_CR 015
/* Print an instruction operand X on file FILE.
/* Print an instruction operand X on file FILE.
look in h8300.c for details
*/
Look in h8300.c for details.
*/
#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
((CODE) == '#')
((CODE) == '#')
#define PRINT_OPERAND(FILE, X, CODE)
print_operand(FILE,X,CODE)
#define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE,X,CODE)
/* Print a memory operand whose address is X, on file FILE.
/* Print a memory operand whose address is X, on file FILE.
This uses a function in h8300.c. */
This uses a function in h8300.c. */
...
@@ -1419,12 +1444,16 @@ do { char dstr[30]; \
...
@@ -1419,12 +1444,16 @@ do { char dstr[30]; \
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
/* H8300 specific pragmas. */
/* H8300 specific pragmas. */
#define REGISTER_TARGET_PRAGMAS(PFILE) do { \
#define REGISTER_TARGET_PRAGMAS(PFILE) \
cpp_register_pragma (PFILE, 0, "saveall", h8300_pr_saveall); \
do \
cpp_register_pragma (PFILE, 0, "interrupt", h8300_pr_interrupt); \
{ \
} while (0)
cpp_register_pragma (PFILE, 0, "saveall", h8300_pr_saveall); \
cpp_register_pragma (PFILE, 0, "interrupt", h8300_pr_interrupt); \
} \
while (0)
#define FINAL_PRESCAN_INSN(insn, operand, nop) final_prescan_insn (insn, operand,nop)
#define FINAL_PRESCAN_INSN(insn, operand, nop) \
final_prescan_insn (insn, operand, nop)
/* Define this macro if GNU CC should generate calls to the System V
/* Define this macro if GNU CC should generate calls to the System V
(and ANSI C) library functions `memcpy' and `memset' rather than
(and ANSI C) library functions `memcpy' and `memset' rather than
...
@@ -1440,19 +1469,21 @@ do { char dstr[30]; \
...
@@ -1440,19 +1469,21 @@ do { char dstr[30]; \
/* Perform target dependent optabs initialization. */
/* Perform target dependent optabs initialization. */
#define INIT_TARGET_OPTABS \
#define INIT_TARGET_OPTABS \
do { \
do \
smul_optab->handlers[(int) HImode].libfunc \
{ \
= init_one_libfunc (MULHI3_LIBCALL); \
smul_optab->handlers[(int) HImode].libfunc \
sdiv_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (MULHI3_LIBCALL); \
= init_one_libfunc (DIVHI3_LIBCALL); \
sdiv_optab->handlers[(int) HImode].libfunc \
udiv_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (DIVHI3_LIBCALL); \
= init_one_libfunc (UDIVHI3_LIBCALL); \
udiv_optab->handlers[(int) HImode].libfunc \
smod_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (UDIVHI3_LIBCALL); \
= init_one_libfunc (MODHI3_LIBCALL); \
smod_optab->handlers[(int) HImode].libfunc \
umod_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (MODHI3_LIBCALL); \
= init_one_libfunc (UMODHI3_LIBCALL); \
umod_optab->handlers[(int) HImode].libfunc \
} while (0)
= init_one_libfunc (UMODHI3_LIBCALL); \
} \
while (0)
#define MOVE_RATIO 3
#define MOVE_RATIO 3
...
...
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