Commit 7a846a6c by Nick Clifton Committed by Nick Clifton

Handle DFmode and DImode constant addresses.

From-SVN: r28823
parent 69277eec
1999-08-24 Nick Clifton <nickc@cygnus.com>
* configure.in: Define target_cpu_default for v850 targets.
* configure: Regenerate
* config/v850/v850.h (TARGET_CPU_generic): Define.
(GO_IF_LEGITIMATE_ADDRESS): Insist that SImode and larger constant
addresses are 4 byte aligned.
* config/v850/v850.c (print_operand): Cope with 'R' format DFmode
addresses.
Tue Aug 24 09:32:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Tue Aug 24 09:32:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* genattr.c (function_unit_desc): Constify a char*. Add prototype. * genattr.c (function_unit_desc): Constify a char*. Add prototype.
......
...@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
#include "function.h" #include "function.h"
#include "obstack.h" #include "obstack.h"
#include "toplev.h" #include "toplev.h"
#include "function.h"
#ifndef streq #ifndef streq
#define streq(a,b) (strcmp (a, b) == 0) #define streq(a,b) (strcmp (a, b) == 0)
...@@ -509,8 +510,10 @@ print_operand (file, x, code) ...@@ -509,8 +510,10 @@ print_operand (file, x, code)
fprintf (file, reg_names[REGNO (x) + 1]); fprintf (file, reg_names[REGNO (x) + 1]);
break; break;
case MEM: case MEM:
print_operand_address (file, x = XEXP (adj_offsettable_operand (x, 4), 0);
XEXP (adj_offsettable_operand (x, 4), 0)); print_operand_address (file, x);
if (GET_CODE (x) == CONST_INT)
fprintf (file, "[r0]");
break; break;
default: default:
......
...@@ -21,28 +21,36 @@ Boston, MA 02111-1307, USA. */ ...@@ -21,28 +21,36 @@ Boston, MA 02111-1307, USA. */
#include "svr4.h" /* Automatically does #undef CPP_PREDEFINES */ #include "svr4.h" /* Automatically does #undef CPP_PREDEFINES */
#undef ASM_SPEC /* These are defiend in svr4.h but we want to override them. */
#define ASM_SPEC "%{mv*:-mv%*}"
#ifndef CPP_SPEC
#define CPP_SPEC "-D__v850__"
#endif
#undef ASM_FINAL_SPEC #undef ASM_FINAL_SPEC
#undef LIB_SPEC #undef LIB_SPEC
#undef ENDFILE_SPEC #undef ENDFILE_SPEC
#undef LINK_SPEC #undef LINK_SPEC
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#undef ASM_SPEC
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-D__v851__ -D__v850"
/* Print subsidiary information on the compiler version in use. */ #define TARGET_CPU_generic 1
#ifndef TARGET_VERSION #ifndef TARGET_CPU_DEFAULT
#define TARGET_VERSION fprintf (stderr, " (NEC V850)"); #define TARGET_CPU_DEFAULT TARGET_CPU_generic
#endif #endif
#define MASK_DEFAULT MASK_V850
#define SUBTARGET_ASM_SPEC "%{!mv*:-mv850}"
#define SUBTARGET_CPP_SPEC "%{!mv*:-D__v850__}"
#define TARGET_VERSION fprintf (stderr, " (NEC V850)");
#define ASM_SPEC "%{mv*:-mv%*}"
#define CPP_SPEC "%{mv850ea:-D__v850ea__} %{mv850e:-D__v850e__} %{mv850:-D__v850__} %(subtarget_cpp_spec)"
#define EXTRA_SPECS \
{ "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \
{ "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-D__v851__ -D__v850"
/* Run-time compilation parameters selecting different hardware subsets. */ /* Run-time compilation parameters selecting different hardware subsets. */
...@@ -60,13 +68,6 @@ extern int target_flags; ...@@ -60,13 +68,6 @@ extern int target_flags;
#define MASK_BIG_SWITCH 0x00000100 #define MASK_BIG_SWITCH 0x00000100
#ifndef MASK_DEFAULT
#define MASK_DEFAULT MASK_V850
#endif
#define TARGET_V850 ((target_flags & MASK_CPU) == MASK_V850)
/* Macros used in the machine description to test the flags. */ /* Macros used in the machine description to test the flags. */
/* The GHS calling convention support doesn't really work, /* The GHS calling convention support doesn't really work,
...@@ -99,6 +100,8 @@ extern int target_flags; ...@@ -99,6 +100,8 @@ extern int target_flags;
/* Whether to call out-of-line functions to save registers or not. */ /* Whether to call out-of-line functions to save registers or not. */
#define TARGET_PROLOG_FUNCTION (target_flags & MASK_PROLOG_FUNCTION) #define TARGET_PROLOG_FUNCTION (target_flags & MASK_PROLOG_FUNCTION)
#define TARGET_V850 ((target_flags & MASK_CPU) == MASK_V850)
/* Whether to emit 2 byte per entry or 4 byte per entry switch tables. */ /* Whether to emit 2 byte per entry or 4 byte per entry switch tables. */
#define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH) #define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH)
...@@ -131,16 +134,7 @@ extern int target_flags; ...@@ -131,16 +134,7 @@ extern int target_flags;
{ "v850", -(MASK_V850 ^ MASK_CPU), "" }, \ { "v850", -(MASK_V850 ^ MASK_CPU), "" }, \
{ "big-switch", MASK_BIG_SWITCH, \ { "big-switch", MASK_BIG_SWITCH, \
"Use 4 byte entries in switch tables" },\ "Use 4 byte entries in switch tables" },\
EXTRA_SWITCHES \ { "", MASK_DEFAULT, ""}}
{ "", TARGET_DEFAULT, ""}}
#ifndef EXTRA_SWITCHES
#define EXTRA_SWITCHES
#endif
#ifndef TARGET_DEFAULT
#define TARGET_DEFAULT MASK_DEFAULT
#endif
/* Information about the various small memory areas. */ /* Information about the various small memory areas. */
struct small_memory_info { struct small_memory_info {
...@@ -301,8 +295,8 @@ extern struct small_memory_info small_memory[(int)SMALL_MEMORY_max]; ...@@ -301,8 +295,8 @@ extern struct small_memory_info small_memory[(int)SMALL_MEMORY_max];
/* Define this if move instructions will actually fail to work /* Define this if move instructions will actually fail to work
when given unaligned data. */ when given unaligned data. */
#ifndef STRICT_ALIGNMENT 1 #ifndef STRICT_ALIGNMENT
#define STRICT_ALIGNMENT 1 #define STRICT_ALIGNMENT TARGET_V850
#endif #endif
/* Define this as 1 if `char' should by default be signed; else as 0. /* Define this as 1 if `char' should by default be signed; else as 0.
...@@ -919,7 +913,8 @@ extern int current_function_anonymous_args; ...@@ -919,7 +913,8 @@ extern int current_function_anonymous_args;
do { \ do { \
if (RTX_OK_FOR_BASE_P (X)) goto ADDR; \ if (RTX_OK_FOR_BASE_P (X)) goto ADDR; \
if (CONSTANT_ADDRESS_P (X) \ if (CONSTANT_ADDRESS_P (X) \
&& (MODE == QImode || INTVAL (X) % 2 == 0)) \ && (MODE == QImode || INTVAL (X) % 2 == 0) \
&& (GET_MODE_SIZE (MODE) <= 4 || INTVAL (X) % 4 == 0)) \
goto ADDR; \ goto ADDR; \
if (GET_CODE (X) == LO_SUM \ if (GET_CODE (X) == LO_SUM \
&& GET_CODE (XEXP (X, 0)) == REG \ && GET_CODE (XEXP (X, 0)) == REG \
...@@ -1342,7 +1337,7 @@ do { char dstr[30]; \ ...@@ -1342,7 +1337,7 @@ do { char dstr[30]; \
#undef ASM_OUTPUT_LABELREF #undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE, NAME) \ #define ASM_OUTPUT_LABELREF(FILE, NAME) \
do { \ do { \
const char* real_name; \ const char * real_name; \
STRIP_NAME_ENCODING (real_name, (NAME)); \ STRIP_NAME_ENCODING (real_name, (NAME)); \
fprintf (FILE, "_%s", real_name); \ fprintf (FILE, "_%s", real_name); \
} while (0) } while (0)
......
...@@ -5668,6 +5668,7 @@ for machine in $build $host $target; do ...@@ -5668,6 +5668,7 @@ for machine in $build $host $target; do
# use_collect2=yes # use_collect2=yes
# ;; # ;;
v850-*-*) v850-*-*)
target_cpu_default="TARGET_CPU_generic"
cpu_type=v850 cpu_type=v850
tm_file="v850/v850.h" tm_file="v850/v850.h"
xm_file="v850/xm-v850.h" xm_file="v850/xm-v850.h"
......
...@@ -3370,6 +3370,7 @@ changequote([,])dnl ...@@ -3370,6 +3370,7 @@ changequote([,])dnl
# use_collect2=yes # use_collect2=yes
# ;; # ;;
v850-*-*) v850-*-*)
target_cpu_default="TARGET_CPU_generic"
cpu_type=v850 cpu_type=v850
tm_file="v850/v850.h" tm_file="v850/v850.h"
xm_file="v850/xm-v850.h" xm_file="v850/xm-v850.h"
......
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