sh.h (CPP_SPEC): Add -D__NOMACSAVE__ for -mnomacsave.

* sh.h (CPP_SPEC): Add -D__NOMACSAVE__ for -mnomacsave.
	(CONDITIONAL_REGISTER_USAGE): Mac registers are call used
	for TARGET_NOMACSAVE.
	(NOMACSAVE_BIT): Define.
	(TARGET_NOMACSAVE): Define.
	(TARGET_SWITCHES): Add "nomacsave".

From-SVN: r34350
This commit is contained in:
J"orn Rennecke 2000-06-01 23:36:32 +00:00 committed by Joern Rennecke
parent 18fa855f72
commit aff2c0666a
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,12 @@
Fri Jun 2 00:22:52 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h (CPP_SPEC): Add -D__NOMACSAVE__ for -mnomacsave.
(CONDITIONAL_REGISTER_USAGE): Mac registers are call used
for TARGET_NOMACSAVE.
(NOMACSAVE_BIT): Define.
(TARGET_NOMACSAVE): Define.
(TARGET_SWITCHES): Add "nomacsave".
2000-06-02 Toshiyasu Morita <toshi.morita@sega.com>
* sh.md (untyped_call): Remove excess parameters

View File

@ -48,6 +48,7 @@ extern int code_for_indirect_jump_scratch;
%{m4-single:-D__SH4_SINGLE__} \
%{m4:-D__SH4__} \
%{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:-D__sh1__}}}}}}} \
%{mnomacsave:-D__NOMACSAVE__} \
%{mhitachi:-D__HITACHI__}"
#define CPP_PREDEFINES "-D__sh__ -Acpu(sh) -Amachine(sh)"
@ -77,7 +78,7 @@ extern int code_for_indirect_jump_scratch;
} \
} \
/* Hitachi saves and restores mac registers on call. */ \
if (TARGET_HITACHI) \
if (TARGET_HITACHI && ! TARGET_NOMACSAVE) \
{ \
call_used_regs[MACH_REG] = 0; \
call_used_regs[MACL_REG] = 0; \
@ -103,6 +104,7 @@ extern int target_flags;
#define BIGTABLE_BIT (1<<14)
#define RELAX_BIT (1<<15)
#define HITACHI_BIT (1<<22)
#define NOMACSAVE_BIT (1<<23)
#define PADSTRUCT_BIT (1<<28)
#define LITTLE_ENDIAN_BIT (1<<29)
#define IEEE_BIT (1<<30)
@ -162,6 +164,9 @@ extern int target_flags;
/* Nonzero if using Hitachi's calling convention. */
#define TARGET_HITACHI (target_flags & HITACHI_BIT)
/* Nonzero if not saving macl/mach when using -mhitachi */
#define TARGET_NOMACSAVE (target_flags & NOMACSAVE_BIT)
/* Nonzero if padding structures to a multiple of 4 bytes. This is
incompatible with Hitachi's compiler, and gives unusual structure layouts
which confuse programmers.
@ -185,6 +190,7 @@ extern int target_flags;
{"dalign", DALIGN_BIT}, \
{"fmovd", FMOVD_BIT}, \
{"hitachi", HITACHI_BIT}, \
{"nomacsave", NOMACSAVE_BIT}, \
{"ieee", IEEE_BIT}, \
{"isize", ISIZE_BIT}, \
{"l", LITTLE_ENDIAN_BIT}, \