/* Definitions of target machine for GNU compiler for picoChip
Copyright (C) 2001, 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Picochip Ltd. (http://www.picochip.com)
Maintained by Daniel Towner (daniel.towner@picochip.com) and
Hariharan Sandanagobalane (hariharan@picochip.com).
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not, see
. */
/* Which type of DFA scheduling to use - schedule for speed (VLIW), or
schedule for space. When scheduling for space, attempt to schedule
into stall cycles, but don't pack instructions. */
enum picochip_dfa_type
{
DFA_TYPE_NONE,
DFA_TYPE_SPACE,
DFA_TYPE_SPEED
};
extern enum picochip_dfa_type picochip_schedule_type;
/* Controlling the Compilation Driver */
/* Pass through the save-temps command option. */
#define LINK_SPEC " %{save-temps:--save-temps}"
/* This is an embedded processor, and only supports a cut-down version of
* the standard C library. */
#define LIB_SPEC "-lpicoC"
/* The start file is automatically provided by the linker. */
#define STARTFILE_SPEC ""
/* Run-time Target Specification */
/* Define some additional pre-processor macros. */
#define TARGET_CPU_CPP_BUILTINS() \
do \
{ \
builtin_define ("NO_TRAMPOLINES"); \
builtin_define ("PICOCHIP"); \
builtin_define ("__PICOCHIP__"); \
} \
while (0)
/* Translate requests for particular AEs into their respective ISA
options. Note that byte access is enabled by default. */
#define DRIVER_SELF_SPECS \
"%{mae=ANY:-mmul-type=none -mno-byte-access} %'))
#define PRINT_OPERAND_ADDRESS(STREAM,X) \
picochip_print_operand_address(STREAM,X)
/* Output of Dispatch Tables */
/* Initialise a data memory location to an absolute code label. Used
for building switch statement jump tables. Note - the format of the
label must match that of the function picochip_output_label. */
#define ASM_OUTPUT_ADDR_VEC_ELT(stream, value) \
fprintf (stream, ".initWord _L%d\n", value);
/* Assembler Commands for Alignment */
#define ASM_OUTPUT_SKIP(STREAM,BYTES) \
fprintf(STREAM, ".skip "HOST_WIDE_INT_PRINT_UNSIGNED"\n", BYTES);
#define ASM_OUTPUT_ALIGN(STREAM,POWER) \
fprintf(STREAM, ".align %u\n", 1 << POWER);
/* The elaborator doesn't output zero bytes in the text section. */
#define ASM_NO_SKIP_IN_TEXT 1
/* Controlling Debugging Information Format */
/* Macros Affecting All Debugging Formats */
#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
#define DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#define DWARF2_FRAME_INFO 1
/* Generate .file/.loc directives, so that the assembler generates the
line table. */
#define DWARF2_ASM_LINE_DEBUG_INFO 1
/* Miscellaneous Parameters */
#define CASE_VECTOR_MODE HImode
#define WORD_REGISTER_OPERATIONS
#define LOAD_EXTEND_OP(MODE) ((MODE) == QImode ? SIGN_EXTEND : ZERO_EXTEND)
#define MOVE_MAX 4
#define SHIFT_COUNT_TRUNCATED 1
#define Pmode HImode
#define FUNCTION_MODE QImode
#define TRULY_NOOP_TRUNCATION(OUTPREC,INPREC) 1
#define ASM_LONG ":TODO:.word\t"
/* Define builtins for selected special-purpose instructions. */
enum picochip_builtins
{
PICOCHIP_BUILTIN_SBC,
PICOCHIP_BUILTIN_PUT,
PICOCHIP_BUILTIN_GET,
PICOCHIP_BUILTIN_TESTPORT,
PICOCHIP_BUILTIN_COPYSW,
PICOCHIP_BUILTIN_ADDS,
PICOCHIP_BUILTIN_SUBS,
PICOCHIP_BUILTIN_BREV,
PICOCHIP_BUILTIN_BYTESWAP,
PICOCHIP_BUILTIN_GET_ARRAY,
PICOCHIP_BUILTIN_PUT_ARRAY,
PICOCHIP_BUILTIN_TESTPORT_ARRAY,
PICOCHIP_BUILTIN_ASRI,
PICOCHIP_BUILTIN_HALT
};
#define NO_DOLLAR_IN_LABEL 1
#define NO_DOT_IN_LABEL 1
/* The assembler does support LEB128, despite the auto-configure test
not detecting this. */
#define HAVE_AS_LEB128 1
/* The End */