Commit 3bbc2af6 by Kazu Hirata Committed by Kazu Hirata

elf.h: Fix comment formatting.

	* config/xtensa/elf.h: Fix comment formatting.
	* config/xtensa/xtensa-protos.h: Likewise.
	* config/xtensa/xtensa.c: Likewise.
	* config/xtensa/xtensa.h: Likewise.

From-SVN: r75018
parent be886286
2003-12-24 Kazu Hirata <kazu@cs.umass.edu> 2003-12-24 Kazu Hirata <kazu@cs.umass.edu>
* config/xtensa/elf.h: Fix comment formatting.
* config/xtensa/xtensa-protos.h: Likewise.
* config/xtensa/xtensa.c: Likewise.
* config/xtensa/xtensa.h: Likewise.
2003-12-24 Kazu Hirata <kazu@cs.umass.edu>
* config/avr/avr.c: Fix comment formatting. * config/avr/avr.c: Fix comment formatting.
* config/avr/avr.md: Likewise. * config/avr/avr.md: Likewise.
......
...@@ -21,7 +21,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -21,7 +21,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define TARGET_SECTION_TYPE_FLAGS xtensa_multibss_section_type_flags #define TARGET_SECTION_TYPE_FLAGS xtensa_multibss_section_type_flags
/* Don't assume anything about the header files. */ /* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C #define NO_IMPLICIT_EXTERN_C
#undef ASM_APP_ON #undef ASM_APP_ON
......
...@@ -22,7 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -22,7 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef __XTENSA_PROTOS_H__ #ifndef __XTENSA_PROTOS_H__
#define __XTENSA_PROTOS_H__ #define __XTENSA_PROTOS_H__
/* Functions to test whether an immediate fits in a given field. */ /* Functions to test whether an immediate fits in a given field. */
extern int xtensa_simm7 (int); extern int xtensa_simm7 (int);
extern int xtensa_simm8 (int); extern int xtensa_simm8 (int);
extern int xtensa_simm8x256 (int); extern int xtensa_simm8x256 (int);
......
...@@ -600,7 +600,7 @@ move_operand (rtx op, enum machine_mode mode) ...@@ -600,7 +600,7 @@ move_operand (rtx op, enum machine_mode mode)
case SImode: case SImode:
if (TARGET_CONST16) if (TARGET_CONST16)
return CONSTANT_P (op); return CONSTANT_P (op);
/* fall through */ /* Fall through. */
case HImode: case HImode:
case QImode: case QImode:
...@@ -652,12 +652,12 @@ constantpool_address_p (rtx addr) ...@@ -652,12 +652,12 @@ constantpool_address_p (rtx addr)
{ {
rtx offset; rtx offset;
/* only handle (PLUS (SYM, OFFSET)) form */ /* Only handle (PLUS (SYM, OFFSET)) form. */
addr = XEXP (addr, 0); addr = XEXP (addr, 0);
if (GET_CODE (addr) != PLUS) if (GET_CODE (addr) != PLUS)
return FALSE; return FALSE;
/* make sure the address is word aligned */ /* Make sure the address is word aligned. */
offset = XEXP (addr, 1); offset = XEXP (addr, 1);
if ((GET_CODE (offset) != CONST_INT) if ((GET_CODE (offset) != CONST_INT)
|| ((INTVAL (offset) & 3) != 0)) || ((INTVAL (offset) & 3) != 0))
...@@ -728,7 +728,7 @@ xtensa_extend_reg (rtx dst, rtx src) ...@@ -728,7 +728,7 @@ xtensa_extend_reg (rtx dst, rtx src)
rtx temp = gen_reg_rtx (SImode); rtx temp = gen_reg_rtx (SImode);
rtx shift = GEN_INT (BITS_PER_WORD - GET_MODE_BITSIZE (GET_MODE (src))); rtx shift = GEN_INT (BITS_PER_WORD - GET_MODE_BITSIZE (GET_MODE (src)));
/* generate paradoxical subregs as needed so that the modes match */ /* Generate paradoxical subregs as needed so that the modes match. */
src = simplify_gen_subreg (SImode, src, GET_MODE (src), 0); src = simplify_gen_subreg (SImode, src, GET_MODE (src), 0);
dst = simplify_gen_subreg (SImode, dst, GET_MODE (dst), 0); dst = simplify_gen_subreg (SImode, dst, GET_MODE (dst), 0);
...@@ -1080,14 +1080,14 @@ gen_conditional_move (rtx cmp) ...@@ -1080,14 +1080,14 @@ gen_conditional_move (rtx cmp)
if (boolean_operator (cmp, VOIDmode)) if (boolean_operator (cmp, VOIDmode))
{ {
/* swap the operands to make const0 second */ /* Swap the operands to make const0 second. */
if (op0 == const0_rtx) if (op0 == const0_rtx)
{ {
op0 = op1; op0 = op1;
op1 = const0_rtx; op1 = const0_rtx;
} }
/* if not comparing against zero, emit a comparison (subtract) */ /* If not comparing against zero, emit a comparison (subtract). */
if (op1 != const0_rtx) if (op1 != const0_rtx)
{ {
op0 = expand_binop (SImode, sub_optab, op0, op1, op0 = expand_binop (SImode, sub_optab, op0, op1,
...@@ -1097,7 +1097,7 @@ gen_conditional_move (rtx cmp) ...@@ -1097,7 +1097,7 @@ gen_conditional_move (rtx cmp)
} }
else if (branch_operator (cmp, VOIDmode)) else if (branch_operator (cmp, VOIDmode))
{ {
/* swap the operands to make const0 second */ /* Swap the operands to make const0 second. */
if (op0 == const0_rtx) if (op0 == const0_rtx)
{ {
op0 = op1; op0 = op1;
...@@ -1379,26 +1379,26 @@ xtensa_expand_block_move (rtx *operands) ...@@ -1379,26 +1379,26 @@ xtensa_expand_block_move (rtx *operands)
int align = XINT (operands[3], 0); int align = XINT (operands[3], 0);
int num_pieces, move_ratio; int num_pieces, move_ratio;
/* If this is not a fixed size move, just call memcpy */ /* If this is not a fixed size move, just call memcpy. */
if (!optimize || (GET_CODE (operands[2]) != CONST_INT)) if (!optimize || (GET_CODE (operands[2]) != CONST_INT))
return 0; return 0;
/* Anything to move? */ /* Anything to move? */
if (bytes <= 0) if (bytes <= 0)
return 1; return 1;
if (align > MOVE_MAX) if (align > MOVE_MAX)
align = MOVE_MAX; align = MOVE_MAX;
/* decide whether to expand inline based on the optimization level */ /* Decide whether to expand inline based on the optimization level. */
move_ratio = 4; move_ratio = 4;
if (optimize > 2) if (optimize > 2)
move_ratio = LARGEST_MOVE_RATIO; move_ratio = LARGEST_MOVE_RATIO;
num_pieces = (bytes / align) + (bytes % align); /* close enough anyway */ num_pieces = (bytes / align) + (bytes % align); /* Close enough anyway. */
if (num_pieces >= move_ratio) if (num_pieces >= move_ratio)
return 0; return 0;
/* make sure the memory addresses are valid */ /* Make sure the memory addresses are valid. */
operands[0] = validize_mem (dest); operands[0] = validize_mem (dest);
operands[1] = validize_mem (src); operands[1] = validize_mem (src);
...@@ -1408,10 +1408,10 @@ xtensa_expand_block_move (rtx *operands) ...@@ -1408,10 +1408,10 @@ xtensa_expand_block_move (rtx *operands)
} }
/* Emit a sequence of instructions to implement a block move, trying /* Emit a sequence of instructions to implement a block move, trying
to hide load delay slots as much as possible. Load N values into to hide load delay slots as much as possible. Load N values into
temporary registers, store those N values, and repeat until the temporary registers, store those N values, and repeat until the
complete block has been moved. N=delay_slots+1 */ complete block has been moved. N=delay_slots+1. */
struct meminsnbuf struct meminsnbuf
{ {
...@@ -1467,7 +1467,7 @@ xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots) ...@@ -1467,7 +1467,7 @@ xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots)
if (bytes < item_size) if (bytes < item_size)
{ {
/* find a smaller item_size which we can load & store */ /* Find a smaller item_size which we can load & store. */
item_size = bytes; item_size = bytes;
mode = xtensa_find_mode_for_size (item_size); mode = xtensa_find_mode_for_size (item_size);
item_size = GET_MODE_SIZE (mode); item_size = GET_MODE_SIZE (mode);
...@@ -1475,7 +1475,7 @@ xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots) ...@@ -1475,7 +1475,7 @@ xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots)
stname = xtensa_st_opcodes[(int) mode]; stname = xtensa_st_opcodes[(int) mode];
} }
/* record the load instruction opcode and operands */ /* Record the load instruction opcode and operands. */
addr = plus_constant (from_addr, offset); addr = plus_constant (from_addr, offset);
mem = gen_rtx_MEM (mode, addr); mem = gen_rtx_MEM (mode, addr);
if (! memory_address_p (mode, addr)) if (! memory_address_p (mode, addr))
...@@ -1485,7 +1485,7 @@ xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots) ...@@ -1485,7 +1485,7 @@ xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots)
ldinsns[n].operands[1] = mem; ldinsns[n].operands[1] = mem;
sprintf (ldinsns[n].template, "%s\t%%0, %%1", ldname); sprintf (ldinsns[n].template, "%s\t%%0, %%1", ldname);
/* record the store instruction opcode and operands */ /* Record the store instruction opcode and operands. */
addr = plus_constant (to_addr, offset); addr = plus_constant (to_addr, offset);
mem = gen_rtx_MEM (mode, addr); mem = gen_rtx_MEM (mode, addr);
if (! memory_address_p (mode, addr)) if (! memory_address_p (mode, addr))
...@@ -1499,7 +1499,7 @@ xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots) ...@@ -1499,7 +1499,7 @@ xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots)
bytes -= item_size; bytes -= item_size;
} }
/* now output the loads followed by the stores */ /* Now output the loads followed by the stores. */
for (n = 0; n < chunk_size; n++) for (n = 0; n < chunk_size; n++)
output_asm_insn (ldinsns[n].template, ldinsns[n].operands); output_asm_insn (ldinsns[n].template, ldinsns[n].operands);
for (n = 0; n < chunk_size; n++) for (n = 0; n < chunk_size; n++)
...@@ -1517,7 +1517,7 @@ xtensa_find_mode_for_size (unsigned item_size) ...@@ -1517,7 +1517,7 @@ xtensa_find_mode_for_size (unsigned item_size)
{ {
mode = VOIDmode; mode = VOIDmode;
/* find mode closest to but not bigger than item_size */ /* Find mode closest to but not bigger than item_size. */
for (tmode = GET_CLASS_NARROWEST_MODE (MODE_INT); for (tmode = GET_CLASS_NARROWEST_MODE (MODE_INT);
tmode != VOIDmode; tmode = GET_MODE_WIDER_MODE (tmode)) tmode != VOIDmode; tmode = GET_MODE_WIDER_MODE (tmode))
if (GET_MODE_SIZE (tmode) <= item_size) if (GET_MODE_SIZE (tmode) <= item_size)
...@@ -1531,7 +1531,7 @@ xtensa_find_mode_for_size (unsigned item_size) ...@@ -1531,7 +1531,7 @@ xtensa_find_mode_for_size (unsigned item_size)
&& xtensa_st_opcodes[(int) mode]) && xtensa_st_opcodes[(int) mode])
break; break;
/* cannot load & store this mode; try something smaller */ /* Cannot load & store this mode; try something smaller. */
item_size -= 1; item_size -= 1;
} }
...@@ -1545,8 +1545,8 @@ xtensa_expand_nonlocal_goto (rtx *operands) ...@@ -1545,8 +1545,8 @@ xtensa_expand_nonlocal_goto (rtx *operands)
rtx goto_handler = operands[1]; rtx goto_handler = operands[1];
rtx containing_fp = operands[3]; rtx containing_fp = operands[3];
/* generate a call to "__xtensa_nonlocal_goto" (in libgcc); the code /* Generate a call to "__xtensa_nonlocal_goto" (in libgcc); the code
is too big to generate in-line */ is too big to generate in-line. */
if (GET_CODE (containing_fp) != REG) if (GET_CODE (containing_fp) != REG)
containing_fp = force_reg (Pmode, containing_fp); containing_fp = force_reg (Pmode, containing_fp);
...@@ -1789,7 +1789,7 @@ override_options (void) ...@@ -1789,7 +1789,7 @@ override_options (void)
if (!TARGET_BOOLEANS && TARGET_HARD_FLOAT) if (!TARGET_BOOLEANS && TARGET_HARD_FLOAT)
error ("boolean registers required for the floating-point option"); error ("boolean registers required for the floating-point option");
/* set up the tables of ld/st opcode names for block moves */ /* Set up the tables of ld/st opcode names for block moves. */
xtensa_ld_opcodes[(int) SImode] = "l32i"; xtensa_ld_opcodes[(int) SImode] = "l32i";
xtensa_ld_opcodes[(int) HImode] = "l16ui"; xtensa_ld_opcodes[(int) HImode] = "l16ui";
xtensa_ld_opcodes[(int) QImode] = "l8ui"; xtensa_ld_opcodes[(int) QImode] = "l8ui";
...@@ -2366,7 +2366,7 @@ xtensa_builtin_saveregs (void) ...@@ -2366,7 +2366,7 @@ xtensa_builtin_saveregs (void)
if (gp_left == 0) if (gp_left == 0)
return const0_rtx; return const0_rtx;
/* allocate the general-purpose register space */ /* Allocate the general-purpose register space. */
gp_regs = assign_stack_local gp_regs = assign_stack_local
(BLKmode, MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD, -1); (BLKmode, MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD, -1);
set_mem_alias_set (gp_regs, get_varargs_alias_set ()); set_mem_alias_set (gp_regs, get_varargs_alias_set ());
...@@ -2662,8 +2662,8 @@ order_regs_for_local_alloc (void) ...@@ -2662,8 +2662,8 @@ order_regs_for_local_alloc (void)
int i, num_arg_regs; int i, num_arg_regs;
int nxt = 0; int nxt = 0;
/* use the AR registers in increasing order (skipping a0 and a1) /* Use the AR registers in increasing order (skipping a0 and a1)
but save the incoming argument registers for a last resort */ but save the incoming argument registers for a last resort. */
num_arg_regs = current_function_args_info.arg_words; num_arg_regs = current_function_args_info.arg_words;
if (num_arg_regs > MAX_ARGS_IN_REGISTERS) if (num_arg_regs > MAX_ARGS_IN_REGISTERS)
num_arg_regs = MAX_ARGS_IN_REGISTERS; num_arg_regs = MAX_ARGS_IN_REGISTERS;
...@@ -2672,11 +2672,11 @@ order_regs_for_local_alloc (void) ...@@ -2672,11 +2672,11 @@ order_regs_for_local_alloc (void)
for (i = 0; i < num_arg_regs; i++) for (i = 0; i < num_arg_regs; i++)
reg_alloc_order[nxt++] = GP_ARG_FIRST + i; reg_alloc_order[nxt++] = GP_ARG_FIRST + i;
/* list the coprocessor registers in order */ /* List the coprocessor registers in order. */
for (i = 0; i < BR_REG_NUM; i++) for (i = 0; i < BR_REG_NUM; i++)
reg_alloc_order[nxt++] = BR_REG_FIRST + i; reg_alloc_order[nxt++] = BR_REG_FIRST + i;
/* list the FP registers in order for now */ /* List the FP registers in order for now. */
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
reg_alloc_order[nxt++] = FP_REG_FIRST + i; reg_alloc_order[nxt++] = FP_REG_FIRST + i;
...@@ -2821,7 +2821,7 @@ xtensa_rtx_costs (rtx x, int code, int outer_code, int *total) ...@@ -2821,7 +2821,7 @@ xtensa_rtx_costs (rtx x, int code, int outer_code, int *total)
case LSHIFTRT: case LSHIFTRT:
case ROTATE: case ROTATE:
case ROTATERT: case ROTATERT:
/* no way to tell if X is the 2nd operand so be conservative */ /* No way to tell if X is the 2nd operand so be conservative. */
default: break; default: break;
} }
if (xtensa_simm12b (INTVAL (x))) if (xtensa_simm12b (INTVAL (x)))
...@@ -2948,7 +2948,7 @@ xtensa_rtx_costs (rtx x, int code, int outer_code, int *total) ...@@ -2948,7 +2948,7 @@ xtensa_rtx_costs (rtx x, int code, int outer_code, int *total)
return true; return true;
} }
} }
/* fall through */ /* Fall through. */
case UDIV: case UDIV:
case UMOD: case UMOD:
......
...@@ -142,10 +142,10 @@ extern unsigned xtensa_current_frame_size; ...@@ -142,10 +142,10 @@ extern unsigned xtensa_current_frame_size;
in instructions that operate on numbered bit-fields. */ in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) #define BITS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0)
/* Define this if most significant byte of a word is the lowest numbered. */ /* Define this if most significant byte of a word is the lowest numbered. */
#define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0)
/* Define this if most significant word of a multiword number is the lowest. */ /* Define this if most significant word of a multiword number is the lowest. */
#define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0)
#define MAX_BITS_PER_WORD 32 #define MAX_BITS_PER_WORD 32
...@@ -271,11 +271,11 @@ extern unsigned xtensa_current_frame_size; ...@@ -271,11 +271,11 @@ extern unsigned xtensa_current_frame_size;
#define FIRST_PSEUDO_REGISTER 36 #define FIRST_PSEUDO_REGISTER 36
/* Return the stabs register number to use for REGNO. */ /* Return the stabs register number to use for REGNO. */
#define DBX_REGISTER_NUMBER(REGNO) xtensa_dbx_register_number (REGNO) #define DBX_REGISTER_NUMBER(REGNO) xtensa_dbx_register_number (REGNO)
/* 1 for registers that have pervasive standard uses /* 1 for registers that have pervasive standard uses
and are not available for the register allocator. */ and are not available for the register allocator. */
#define FIXED_REGISTERS \ #define FIXED_REGISTERS \
{ \ { \
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
...@@ -326,18 +326,18 @@ extern unsigned xtensa_current_frame_size; ...@@ -326,18 +326,18 @@ extern unsigned xtensa_current_frame_size;
giving preference to call-used registers. To minimize window giving preference to call-used registers. To minimize window
overflows for the AR registers, we want to give preference to the overflows for the AR registers, we want to give preference to the
lower-numbered AR registers. For other register files, which are lower-numbered AR registers. For other register files, which are
not windowed, we still prefer call-used registers, if there are any. */ not windowed, we still prefer call-used registers, if there are any. */
extern const char xtensa_leaf_regs[FIRST_PSEUDO_REGISTER]; extern const char xtensa_leaf_regs[FIRST_PSEUDO_REGISTER];
#define LEAF_REGISTERS xtensa_leaf_regs #define LEAF_REGISTERS xtensa_leaf_regs
/* For Xtensa, no remapping is necessary, but this macro must be /* For Xtensa, no remapping is necessary, but this macro must be
defined if LEAF_REGISTERS is defined. */ defined if LEAF_REGISTERS is defined. */
#define LEAF_REG_REMAP(REGNO) (REGNO) #define LEAF_REG_REMAP(REGNO) (REGNO)
/* this must be declared if LEAF_REGISTERS is set */ /* This must be declared if LEAF_REGISTERS is set. */
extern int leaf_function; extern int leaf_function;
/* Internal macros to classify a register number. */ /* Internal macros to classify a register number. */
/* 16 address registers + fake registers */ /* 16 address registers + fake registers */
#define GP_REG_FIRST 0 #define GP_REG_FIRST 0
...@@ -372,7 +372,7 @@ extern int leaf_function; ...@@ -372,7 +372,7 @@ extern int leaf_function;
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
/* Value is 1 if hard register REGNO can hold a value of machine-mode /* Value is 1 if hard register REGNO can hold a value of machine-mode
MODE. */ MODE. */
extern char xtensa_hard_regno_mode_ok[][FIRST_PSEUDO_REGISTER]; extern char xtensa_hard_regno_mode_ok[][FIRST_PSEUDO_REGISTER];
#define HARD_REGNO_MODE_OK(REGNO, MODE) \ #define HARD_REGNO_MODE_OK(REGNO, MODE) \
...@@ -397,7 +397,7 @@ extern char xtensa_hard_regno_mode_ok[][FIRST_PSEUDO_REGISTER]; ...@@ -397,7 +397,7 @@ extern char xtensa_hard_regno_mode_ok[][FIRST_PSEUDO_REGISTER];
/* The register number of the frame pointer register, which is used to /* The register number of the frame pointer register, which is used to
access automatic variables in the stack frame. For Xtensa, this access automatic variables in the stack frame. For Xtensa, this
register never appears in the output. It is always eliminated to register never appears in the output. It is always eliminated to
either the stack pointer or the hard frame pointer. */ either the stack pointer or the hard frame pointer. */
#define FRAME_POINTER_REGNUM (GP_REG_FIRST + 16) #define FRAME_POINTER_REGNUM (GP_REG_FIRST + 16)
/* Value should be nonzero if functions must have frame pointers. /* Value should be nonzero if functions must have frame pointers.
...@@ -518,7 +518,7 @@ extern const enum reg_class xtensa_regno_to_class[FIRST_PSEUDO_REGISTER]; ...@@ -518,7 +518,7 @@ extern const enum reg_class xtensa_regno_to_class[FIRST_PSEUDO_REGISTER];
/* SMALL_REGISTER_CLASSES is required for Xtensa, because all of the /* SMALL_REGISTER_CLASSES is required for Xtensa, because all of the
16 AR registers may be explicitly used in the RTL, as either 16 AR registers may be explicitly used in the RTL, as either
incoming or outgoing arguments. */ incoming or outgoing arguments. */
#define SMALL_REGISTER_CLASSES 1 #define SMALL_REGISTER_CLASSES 1
...@@ -599,7 +599,7 @@ extern enum reg_class xtensa_char_to_class[256]; ...@@ -599,7 +599,7 @@ extern enum reg_class xtensa_char_to_class[256];
the meantime, the constraints are checked and none match. The the meantime, the constraints are checked and none match. The
solution seems to be to simply skip the offset check here. The solution seems to be to simply skip the offset check here. The
address will be checked anyway because of the code in address will be checked anyway because of the code in
GO_IF_LEGITIMATE_ADDRESS. */ GO_IF_LEGITIMATE_ADDRESS. */
#define EXTRA_CONSTRAINT(OP, CODE) \ #define EXTRA_CONSTRAINT(OP, CODE) \
((GET_CODE (OP) != MEM) ? \ ((GET_CODE (OP) != MEM) ? \
...@@ -714,7 +714,7 @@ extern enum reg_class xtensa_char_to_class[256]; ...@@ -714,7 +714,7 @@ extern enum reg_class xtensa_char_to_class[256];
/* 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. Because we have defined assuming the value has mode MODE. Because we have defined
PROMOTE_FUNCTION_RETURN, we have to perform the same promotions as PROMOTE_FUNCTION_RETURN, we have to perform the same promotions as
PROMOTE_MODE. */ PROMOTE_MODE. */
#define XTENSA_LIBCALL_VALUE(MODE, OUTGOINGP) \ #define XTENSA_LIBCALL_VALUE(MODE, OUTGOINGP) \
gen_rtx_REG ((GET_MODE_CLASS (MODE) == MODE_INT \ gen_rtx_REG ((GET_MODE_CLASS (MODE) == MODE_INT \
&& GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
...@@ -750,7 +750,7 @@ extern enum reg_class xtensa_char_to_class[256]; ...@@ -750,7 +750,7 @@ extern enum reg_class xtensa_char_to_class[256];
be recognized by this macro. If the machine has register windows, be recognized by this macro. If the machine has register windows,
so that the caller and the called function use different registers so that the caller and the called function use different registers
for the return value, this macro should recognize only the caller's for the return value, this macro should recognize only the caller's
register numbers. */ register numbers. */
#define FUNCTION_VALUE_REGNO_P(N) \ #define FUNCTION_VALUE_REGNO_P(N) \
((N) == GP_RETURN) ((N) == GP_RETURN)
...@@ -759,7 +759,7 @@ extern enum reg_class xtensa_char_to_class[256]; ...@@ -759,7 +759,7 @@ extern enum reg_class xtensa_char_to_class[256];
does *not* include implicit arguments such as the static chain and does *not* include implicit arguments such as the static chain and
the structure-value address. On many machines, no registers can be the structure-value address. On many machines, no registers can be
used for this purpose since all function arguments are pushed on used for this purpose since all function arguments are pushed on
the stack. */ the stack. */
#define FUNCTION_ARG_REGNO_P(N) \ #define FUNCTION_ARG_REGNO_P(N) \
((N) >= GP_OUTGOING_ARG_FIRST && (N) <= GP_OUTGOING_ARG_LAST) ((N) >= GP_OUTGOING_ARG_FIRST && (N) <= GP_OUTGOING_ARG_LAST)
...@@ -767,14 +767,14 @@ extern enum reg_class xtensa_char_to_class[256]; ...@@ -767,14 +767,14 @@ extern enum reg_class xtensa_char_to_class[256];
during the scan of that argument list. This data type should during the scan of that argument list. This data type should
hold all necessary information about the function itself hold all necessary information about the function itself
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. */
typedef struct xtensa_args { typedef struct xtensa_args {
int arg_words; /* # total words the arguments take */ int arg_words; /* # total words the arguments take */
} CUMULATIVE_ARGS; } CUMULATIVE_ARGS;
/* Initialize a variable CUM of type CUMULATIVE_ARGS /* Initialize a variable CUM of type CUMULATIVE_ARGS
for a call to a function whose data type is FNTYPE. for a call to a function whose data type is FNTYPE.
For a library call, FNTYPE is 0. */ For a library call, FNTYPE is 0. */
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \ #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \
init_cumulative_args (&CUM, FNTYPE, LIBNAME) init_cumulative_args (&CUM, FNTYPE, LIBNAME)
...@@ -816,7 +816,7 @@ typedef struct xtensa_args { ...@@ -816,7 +816,7 @@ typedef struct xtensa_args {
This differs from the default in that it does not check if the padding This differs from the default in that it does not check if the padding
and mode of the type are such that a copy into a register would put it and mode of the type are such that a copy into a register would put it
into the wrong part of the register. */ into the wrong part of the register. */
#define MUST_PASS_IN_STACK(MODE, TYPE) \ #define MUST_PASS_IN_STACK(MODE, TYPE) \
((TYPE) != 0 \ ((TYPE) != 0 \
...@@ -835,7 +835,7 @@ typedef struct xtensa_args { ...@@ -835,7 +835,7 @@ typedef struct xtensa_args {
values contain window size information in the two most significant values contain window size information in the two most significant
bits; we assume that _mcount will mask off those bits. The call to bits; we assume that _mcount will mask off those bits. The call to
_mcount uses a window size of 8 to make sure that it doesn't clobber _mcount uses a window size of 8 to make sure that it doesn't clobber
any incoming argument values. */ any incoming argument values. */
#define NO_PROFILE_COUNTERS 1 #define NO_PROFILE_COUNTERS 1
...@@ -865,7 +865,7 @@ typedef struct xtensa_args { ...@@ -865,7 +865,7 @@ typedef struct xtensa_args {
from the entry instruction at the target and the current frame is from the entry instruction at the target and the current frame is
adjusted to match. The trampoline then transfers control to the adjusted to match. The trampoline then transfers control to the
instruction following the entry at the target. Note: this assumes instruction following the entry at the target. Note: this assumes
that the target begins with an entry instruction. */ that the target begins with an entry instruction. */
/* minimum frame = reg save area (4 words) plus static chain (1 word) /* minimum frame = reg save area (4 words) plus static chain (1 word)
and the total number of words must be a multiple of 128 bits */ and the total number of words must be a multiple of 128 bits */
...@@ -934,7 +934,7 @@ typedef struct xtensa_args { ...@@ -934,7 +934,7 @@ typedef struct xtensa_args {
code for a call to '__builtin_saveregs'. This code will be moved code for a call to '__builtin_saveregs'. This code will be moved
to the very beginning of the function, before any parameter access to the very beginning of the function, before any parameter access
are made. The return value of this function should be an RTX that are made. The return value of this function should be an RTX that
contains the value to use as the return of '__builtin_saveregs'. */ contains the value to use as the return of '__builtin_saveregs'. */
#define EXPAND_BUILTIN_SAVEREGS \ #define EXPAND_BUILTIN_SAVEREGS \
xtensa_builtin_saveregs xtensa_builtin_saveregs
...@@ -962,7 +962,7 @@ typedef struct xtensa_args { ...@@ -962,7 +962,7 @@ typedef struct xtensa_args {
specify whether to start from the stack pointer or frame pointer. That specify whether to start from the stack pointer or frame pointer. That
would also allow us to skip the machine->accesses_prev_frame stuff that would also allow us to skip the machine->accesses_prev_frame stuff that
we currently need to ensure that there is a frame pointer when these we currently need to ensure that there is a frame pointer when these
builtin functions are used. */ builtin functions are used. */
#define SETUP_FRAME_ADDRESSES xtensa_setup_frame_addresses #define SETUP_FRAME_ADDRESSES xtensa_setup_frame_addresses
...@@ -976,14 +976,14 @@ typedef struct xtensa_args { ...@@ -976,14 +976,14 @@ typedef struct xtensa_args {
macro is used for continuing to walk back up the stack, so it must macro is used for continuing to walk back up the stack, so it must
return the stack pointer address. Thus, there is some inconsistency return the stack pointer address. Thus, there is some inconsistency
here in that __builtin_frame_address will return the frame pointer here in that __builtin_frame_address will return the frame pointer
when count == 0 and the stack pointer when count > 0. */ when count == 0 and the stack pointer when count > 0. */
#define DYNAMIC_CHAIN_ADDRESS(frame) \ #define DYNAMIC_CHAIN_ADDRESS(frame) \
gen_rtx (PLUS, Pmode, frame, \ gen_rtx (PLUS, Pmode, frame, \
gen_rtx_CONST_INT (VOIDmode, -3 * UNITS_PER_WORD)) gen_rtx_CONST_INT (VOIDmode, -3 * UNITS_PER_WORD))
/* Define this if the return address of a particular stack frame is /* Define this if the return address of a particular stack frame is
accessed from the frame pointer of the previous stack frame. */ accessed from the frame pointer of the previous stack frame. */
#define RETURN_ADDR_IN_PREVIOUS_FRAME #define RETURN_ADDR_IN_PREVIOUS_FRAME
/* A C expression whose value is RTL representing the value of the /* A C expression whose value is RTL representing the value of the
...@@ -998,7 +998,7 @@ typedef struct xtensa_args { ...@@ -998,7 +998,7 @@ typedef struct xtensa_args {
be either a suitable hard register or a pseudo register that has be either a suitable hard register or a pseudo register that has
been allocated such a hard register. The difference between an been allocated such a hard register. The difference between an
index register and a base register is that the index register may index register and a base register is that the index register may
be scaled. */ be scaled. */
#define REGNO_OK_FOR_BASE_P(NUM) \ #define REGNO_OK_FOR_BASE_P(NUM) \
(GP_REG_P (NUM) || GP_REG_P ((unsigned) reg_renumber[NUM])) (GP_REG_P (NUM) || GP_REG_P ((unsigned) reg_renumber[NUM]))
...@@ -1012,7 +1012,7 @@ typedef struct xtensa_args { ...@@ -1012,7 +1012,7 @@ typedef struct xtensa_args {
must be controlled by `REG_OK_STRICT'. This usually requires two must be controlled by `REG_OK_STRICT'. This usually requires two
variant definitions, of which `REG_OK_STRICT' controls the one variant definitions, of which `REG_OK_STRICT' controls the one
actually used. The difference between an index register and a base actually used. The difference between an index register and a base
register is that the index register may be scaled. */ register is that the index register may be scaled. */
#ifdef REG_OK_STRICT #ifdef REG_OK_STRICT
...@@ -1091,7 +1091,7 @@ typedef struct xtensa_args { ...@@ -1091,7 +1091,7 @@ typedef struct xtensa_args {
|| (GET_CODE (X) == CONST))) || (GET_CODE (X) == CONST)))
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
#define LEGITIMATE_CONSTANT_P(X) 1 #define LEGITIMATE_CONSTANT_P(X) 1
/* A C expression that is nonzero if X is a legitimate immediate /* A C expression that is nonzero if X is a legitimate immediate
...@@ -1179,7 +1179,7 @@ typedef struct xtensa_args { ...@@ -1179,7 +1179,7 @@ typedef struct xtensa_args {
#define SHIFT_COUNT_TRUNCATED 1 #define SHIFT_COUNT_TRUNCATED 1
/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
is done just by pretending it is already truncated. */ is done just by pretending it is already truncated. */
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
/* Specify the machine mode that pointers have. /* Specify the machine mode that pointers have.
...@@ -1245,7 +1245,7 @@ typedef struct xtensa_args { ...@@ -1245,7 +1245,7 @@ typedef struct xtensa_args {
/* Control the assembler format that we output. */ /* Control the assembler format that we output. */
/* 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 \
{ \ { \
"a0", "sp", "a2", "a3", "a4", "a5", "a6", "a7", \ "a0", "sp", "a2", "a3", "a4", "a5", "a6", "a7", \
...@@ -1259,7 +1259,7 @@ typedef struct xtensa_args { ...@@ -1259,7 +1259,7 @@ typedef struct xtensa_args {
/* If defined, a C initializer for an array of structures containing a /* If defined, a C initializer for an array of structures containing a
name and a register number. This macro defines additional names name and a register number. This macro defines additional names
for hard registers, thus allowing the 'asm' option in declarations for hard registers, thus allowing the 'asm' option in declarations
to refer to registers using alternate names. */ to refer to registers using alternate names. */
#define ADDITIONAL_REGISTER_NAMES \ #define ADDITIONAL_REGISTER_NAMES \
{ \ { \
{ "a1", 1 + GP_REG_FIRST } \ { "a1", 1 + GP_REG_FIRST } \
...@@ -1302,7 +1302,7 @@ typedef struct xtensa_args { ...@@ -1302,7 +1302,7 @@ typedef struct xtensa_args {
LOCAL_LABEL_PREFIX, VALUE) LOCAL_LABEL_PREFIX, VALUE)
/* This is how to output an element of a case-vector that is relative. /* This is how to output an element of a case-vector that is relative.
This is used for pc-relative code. */ This is used for pc-relative code. */
#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \ #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
do { \ do { \
fprintf (STREAM, "%s%sL%u-%sL%u\n", integer_asm_op (4, TRUE), \ fprintf (STREAM, "%s%sL%u-%sL%u\n", integer_asm_op (4, TRUE), \
...@@ -1332,7 +1332,7 @@ typedef struct xtensa_args { ...@@ -1332,7 +1332,7 @@ typedef struct xtensa_args {
/* Define output to appear before the constant pool. If the function /* Define output to appear before the constant pool. If the function
has been assigned to a specific ELF section, or if it goes into a has been assigned to a specific ELF section, or if it goes into a
unique section, set the name of that section to be the literal unique section, set the name of that section to be the literal
prefix. */ prefix. */
#define ASM_OUTPUT_POOL_PROLOGUE(FILE, FUNNAME, FUNDECL, SIZE) \ #define ASM_OUTPUT_POOL_PROLOGUE(FILE, FUNNAME, FUNDECL, SIZE) \
do { \ do { \
tree fnsection; \ tree fnsection; \
...@@ -1367,7 +1367,7 @@ typedef struct xtensa_args { ...@@ -1367,7 +1367,7 @@ typedef struct xtensa_args {
goto JUMPTO; \ goto JUMPTO; \
} while (0) } while (0)
/* How to start an assembler comment. */ /* How to start an assembler comment. */
#define ASM_COMMENT_START "#" #define ASM_COMMENT_START "#"
/* Exception handling TODO!! */ /* Exception handling TODO!! */
......
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