This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
h8300 normal mode support
- From: Yoshinori Sato <qzb04471 at nifty dot ne dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Mar 2002 02:57:18 +0900
- Subject: h8300 normal mode support
It is the patch which makes a -mh/-ms option correspond to the
stack frame at the normal mode of H8/300H and H8S.
When not applying a patch, the argument with which the stack was
loaded cannot be received normally.
-- patches --
*** h8300.h.org Wed Mar 27 23:49:14 2002
--- h8300.h Thu Mar 28 02:36:16 2002
*************** extern int target_flags;
*** 107,112 ****
--- 108,116 ----
alignment. */
#define TARGET_ALIGN_300 (target_flags & 8192)
+ /* Normal Mode */
+ #define TARGET_NORMAL (target_flags & 16384)
+
/* Macro to define tables used to set the flags.
This is a list in braces of pairs in braces,
each pair being { "NAME", VALUE }
*************** extern int target_flags;
*** 130,136 ****
{"rtl-dump", 2048, NULL}, \
{"h", 4096, N_("Generate H8/300H code")}, \
{"no-h", -4096, N_("Do not generate H8/300H code")}, \
{"align-300", 8192, N_("Use H8/300 alignment rules")}, \
{ "", TARGET_DEFAULT, NULL}}
#ifdef IN_LIBGCC2
--- 134,142 ----
{"rtl-dump", 2048, NULL}, \
{"h", 4096, N_("Generate H8/300H code")}, \
{"no-h", -4096, N_("Do not generate H8/300H code")}, \
{"align-300", 8192, N_("Use H8/300 alignment rules")}, \
! {"n", 16384, N_("Normal mode stack frame")}, \
! {"no-n", -16384,N_("Advanced mode stack frame")}, \
{ "", TARGET_DEFAULT, NULL}}
#ifdef IN_LIBGCC2
*** h8300.c.org Thu Mar 28 01:59:52 2002
--- h8300.c Thu Mar 28 02:01:48 2002
*************** initial_offset (from, to)
*** 1393,1398 ****
--- 1393,1400 ----
if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
offset += UNITS_PER_WORD; /* Skip saved PC */
}
+ if ((TARGET_H8300H || TARGET_H8300S) && TARGET_NORMAL)
+ offset -= 2; /* Normal mode PC is 2byte */
return offset;
}
*** t-h8300.org Wed Mar 27 23:49:43 2002
--- t-h8300 Thu Mar 28 02:08:58 2002
*** 25,32 ****
echo '#endif' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
! MULTILIB_OPTIONS = mh/ms mint32
! MULTILIB_DIRNAMES = h8300h h8300s int32
MULTILIB_EXCEPTIONS = mint32
LIBGCC = stmp-multilib
--- 25,32 ----
echo '#endif' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
! MULTILIB_OPTIONS = mh/ms mn mint32
! MULTILIB_DIRNAMES = h8300h h8300s normal int32
MULTILIB_EXCEPTIONS = mint32
LIBGCC = stmp-multilib
-- ChangeLog --
* config/h8300/h8300.h H8/300H and H8S normal mode support added
* config/h8300/h8300.c initial_offset nomal mode stack support added
* config/h8300/t-h8300 normal mode library added
--
Yoshinori Sato
<qzb04471@nifty.ne.jp>