Commit 54e9a19d by DJ Delorie Committed by DJ Delorie

extend.texi: Document new xstormy16 attribute.

* doc/extend.texi: Document new xstormy16 attribute.

* config/stormy16/stormy16.c (xstormy16_splittable_below100_operand): New.
(xstormy16_splittable_below100_or_register): New.
(combine_bnp): New.
(xstormy16_reorg): New.
(TARGET_MACHINE_DEPENDENT_REORG): Define.


* config/stormy16/stormy16.md (movqi_internal): Make name public.
(movhi_internal): Likewise.
(cbhranchhi): Likewise.
(cbhranchhi_neg): Likewise.
(andhi3): Only allow splittable below100 operands.
(iorhi3): Likewise.
(peephole2): New and/zero_extend->and peephole.
(peephole2): New load/ior/save->set1 peephole.
(peephole2): New load/and/save->clr1 peephole.
(bclrx, bclrx2, bclr7, bclr15): New.
(bsetx, bsetx2, bset7, bset15): New.

* config/stormy16/stormy16.c (xstormy16_print_operand): Be more
liberal about acceptable 'B' masks.

* config/stormy16/stormy16-protos.h
(xstormy16_asm_output_aligned_common, xstormy16_below100_symbol,
xstormy16_below100_operand, xstormy16_below100_or_register,
xstormy16_onebit_set_operand, xstormy16_onebit_clr_operand): New.
(PREDICATE_CODES): Add new predicates.

* config/stormy16/stormy16.c
(xstormy16_asm_output_aligned_common, xstormy16_below100_symbol,
xstormy16_below100_operand, xstormy16_below100_or_register,
xstormy16_onebit_set_operand, xstormy16_onebit_clr_operand): New.
(xstormy16_expand_iorqi3, xstormy16_expand_andqi3): New.
(xstormy16_legitimate_address_p): Allow below100 symbols.
(xstormy16_extra_constraint_p): Add 'W' for below100 operands.
(xstormy16_expand_move): Leave below100 operands as-is.
(xstormy16_encode_section_info): Encode below100 symbols.
(xstormy16_strip_name_encoding): New.
(xstormy16_print_operand): Print 'b' as shift mask.
(xstormy16_attribute_table): Add below100 attributes.
(xstormy16_handle_below100_attribute): New.

* config/stormy16/stormy16.h (EXTRA_SECTIONS): add in_bss100.
(XSTORMY16_SECTION_FUNCTION): New.
(EXTRA_SECTION_FUNCTIONS): Define using the above.
(ASM_OUTPUT_ALIGNED_DECL_COMMON, ASM_OUTPUT_ALIGNED_DECL_LOCAL): New.
(ASM_OUTPUT_SYMBOL_REF): Handle encoded symbols.
(ASM_OUTPUT_LABELREF): Define.

* config/stormy16/stormy16.md (movqi_internal): Add below100 support.
(movhi_internal): Add below100 support.
(andhi3): Add below100 support.
(iorhi3): Add below100 support.
(iorqi3, iorqi3_internal, andqi3, andqi3_internal): New.

From-SVN: r86154
parent c3f84f61
2004-08-17 DJ Delorie <dj@redhat.com>
* doc/extend.texi: Document new xstormy16 attribute.
* config/stormy16/stormy16.c (xstormy16_splittable_below100_operand): New.
(xstormy16_splittable_below100_or_register): New.
(combine_bnp): New.
(xstormy16_reorg): New.
(TARGET_MACHINE_DEPENDENT_REORG): Define.
* config/stormy16/stormy16.md (movqi_internal): Make name public.
(movhi_internal): Likewise.
(cbhranchhi): Likewise.
(cbhranchhi_neg): Likewise.
(andhi3): Only allow splittable below100 operands.
(iorhi3): Likewise.
(peephole2): New and/zero_extend->and peephole.
(peephole2): New load/ior/save->set1 peephole.
(peephole2): New load/and/save->clr1 peephole.
(bclrx, bclrx2, bclr7, bclr15): New.
(bsetx, bsetx2, bset7, bset15): New.
* config/stormy16/stormy16.c (xstormy16_print_operand): Be more
liberal about acceptable 'B' masks.
* config/stormy16/stormy16-protos.h
(xstormy16_asm_output_aligned_common, xstormy16_below100_symbol,
xstormy16_below100_operand, xstormy16_below100_or_register,
xstormy16_onebit_set_operand, xstormy16_onebit_clr_operand): New.
(PREDICATE_CODES): Add new predicates.
* config/stormy16/stormy16.c
(xstormy16_asm_output_aligned_common, xstormy16_below100_symbol,
xstormy16_below100_operand, xstormy16_below100_or_register,
xstormy16_onebit_set_operand, xstormy16_onebit_clr_operand): New.
(xstormy16_expand_iorqi3, xstormy16_expand_andqi3): New.
(xstormy16_legitimate_address_p): Allow below100 symbols.
(xstormy16_extra_constraint_p): Add 'W' for below100 operands.
(xstormy16_expand_move): Leave below100 operands as-is.
(xstormy16_encode_section_info): Encode below100 symbols.
(xstormy16_strip_name_encoding): New.
(xstormy16_print_operand): Print 'b' as shift mask.
(xstormy16_attribute_table): Add below100 attributes.
(xstormy16_handle_below100_attribute): New.
* config/stormy16/stormy16.h (EXTRA_SECTIONS): add in_bss100.
(XSTORMY16_SECTION_FUNCTION): New.
(EXTRA_SECTION_FUNCTIONS): Define using the above.
(ASM_OUTPUT_ALIGNED_DECL_COMMON, ASM_OUTPUT_ALIGNED_DECL_LOCAL): New.
(ASM_OUTPUT_SYMBOL_REF): Handle encoded symbols.
(ASM_OUTPUT_LABELREF): Define.
* config/stormy16/stormy16.md (movqi_internal): Add below100 support.
(movhi_internal): Add below100 support.
(andhi3): Add below100 support.
(iorhi3): Add below100 support.
(iorqi3, iorqi3_internal, andqi3, andqi3_internal): New.
2004-08-17 James E Wilson <wilson@specifixinc.com>
* config/mips/mips.c (gen_conditional_move): Use GET_MODE (op0) instead
......
......@@ -29,6 +29,13 @@ extern int direct_return (void);
extern int xstormy16_interrupt_function_p (void);
extern int xstormy16_epilogue_uses (int);
extern void xstormy16_function_profiler (void);
extern const char *xstormy16_strip_name_encoding (const char *name);
extern void bss100_section (void);
#if defined (TREE_CODE)
extern void xstormy16_asm_output_aligned_common (FILE *, tree, const char *,
int, int, int);
#endif
#if defined (TREE_CODE) && defined (HAVE_MACHINE_MODES)
extern CUMULATIVE_ARGS xstormy16_function_arg_advance
......@@ -56,6 +63,8 @@ extern void xstormy16_print_operand_address (FILE *, rtx);
extern void xstormy16_expand_casesi (rtx, rtx, rtx, rtx, rtx);
extern void xstormy16_output_addr_vec (FILE *, rtx, rtx);
extern void xstormy16_expand_call (rtx, rtx, rtx);
extern void xstormy16_expand_iorqi3 (rtx *);
extern void xstormy16_expand_andqi3 (rtx *);
#endif
#if defined (HAVE_MACHINE_MODES) && defined (RTX_CODE)
......@@ -79,5 +88,12 @@ extern void xstormy16_expand_arith (enum machine_mode, enum rtx_code,
extern int shift_operator (rtx, enum machine_mode);
extern const char * xstormy16_output_shift (enum machine_mode, enum rtx_code,
rtx, rtx, rtx);
extern int xstormy16_below100_symbol (rtx, enum machine_mode);
extern int xstormy16_below100_operand (rtx, enum machine_mode);
extern int xstormy16_splittable_below100_operand (rtx, enum machine_mode);
extern int xstormy16_below100_or_register (rtx, enum machine_mode);
extern int xstormy16_splittable_below100_or_register (rtx, enum machine_mode);
extern int xstormy16_onebit_set_operand (rtx, enum machine_mode);
extern int xstormy16_onebit_clr_operand (rtx, enum machine_mode);
#endif
......@@ -626,6 +626,26 @@ do { \
#undef DTORS_SECTION_ASM_OP
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\""
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\""
#define EXTRA_SECTIONS in_bss100
/* We define the function body in a separate macro so that if we ever
add another section, we can just add an entry to
EXTRA_SECTION_FUNCTIONS without making it difficult to read. It is
not used anywhere else. */
#define XSTORMY16_SECTION_FUNCTION(name, in, string, bits) \
void \
name () \
{ \
if (in_section != in) \
{ \
fprintf (asm_out_file, "\t.section %s,\"aw\",@%sbits\n", string, bits); \
in_section = in; \
} \
}
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
XSTORMY16_SECTION_FUNCTION (bss100_section, in_bss100, ".bss_below100", "no")
#define JUMP_TABLES_IN_TEXT_SECTION 1
......@@ -642,15 +662,23 @@ do { \
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '|')
#define ASM_OUTPUT_ALIGNED_DECL_COMMON(STREAM, DECL, NAME, SIZE, ALIGNMENT) \
xstormy16_asm_output_aligned_common(STREAM, DECL, NAME, SIZE, ALIGNMENT, 1)
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGNMENT) \
xstormy16_asm_output_aligned_common(STREAM, DECL, NAME, SIZE, ALIGNMENT, 0)
/* Output and Generation of Labels. */
#define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \
do { \
const char *rn = XSTR (SYMBOL, 0); \
if (rn[0] == '@' && rn[2] == '.') \
rn += 3; \
if (SYMBOL_REF_FUNCTION_P (SYMBOL)) \
ASM_OUTPUT_LABEL_REF ((STREAM), XSTR (SYMBOL, 0)); \
ASM_OUTPUT_LABEL_REF ((STREAM), rn); \
else \
assemble_name (STREAM, XSTR (SYMBOL, 0)); \
assemble_name (STREAM, rn); \
} while (0)
#define ASM_OUTPUT_LABEL_REF(STREAM, NAME) \
......@@ -660,6 +688,9 @@ do { \
fputc (')', STREAM); \
} while (0)
#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
asm_fprintf ((STREAM), "%U%s", xstormy16_strip_name_encoding (NAME));
/* Globalizing directive for a label. */
#define GLOBAL_ASM_OP "\t.globl "
......@@ -785,6 +816,11 @@ do { \
{"equality_operator", {EQ, NE }}, \
{"inequality_operator", {GE, GT, LE, LT, GEU, GTU, LEU, LTU }}, \
{"xstormy16_ineqsi_operator", {LT, GE, LTU, GEU }}, \
{"xstormy16_below100_operand", {MEM }}, \
{"xstormy16_below100_or_register", {MEM, REG }}, \
{"xstormy16_splittable_below100_or_register", {MEM, REG }}, \
{"xstormy16_onebit_clr_operand", {CONST_INT }}, \
{"xstormy16_onebit_set_operand", {CONST_INT }}, \
{"nonimmediate_nonstack_operand", {REG, MEM}},
#define CASE_VECTOR_MODE SImode
......
......@@ -2977,6 +2977,23 @@ Currently @option{-m[no-]ms-bitfields} is provided for the Microsoft Windows X86
compilers to match the native Microsoft compiler.
@end table
@subsection Xstormy16 Variable Attributes
One attribute is currently defined for xstormy16 configurations:
@code{below100}
@table @code
@item below100
@cindex @code{below100} attribute
If a variable has the @code{below100} attribute (@code{BELOW100} is
allowed also), GCC will place the variable in the first 0x100 bytes of
memory and use special opcodes to access it. Such variables will be
placed in either the @code{.bss_below100} section or the
@code{.data_below100} section.
@end table
@node Type Attributes
@section Specifying Attributes of Types
@cindex attribute of types
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment