This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH - Normal mode support for H8300H and H8S
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: VijayK1 at kpit dot com
- Cc: gcc-patches at gcc dot gnu dot org, gnuh8 at gnuh8 dot org dot uk
- Date: Fri, 13 Sep 2002 12:42:10 -0400 (EDT)
- Subject: Re: PATCH - Normal mode support for H8300H and H8S
- References: <69595093233BB547BB70CF5E492B63F26E8726@sohm.kpit.com>
Hi Vijay,
> 2002-09-13 vijay khuspe <vijayk1@kpit.com>
>
> * config/h8300/h8300.c (h8300_init_once): allow -mn switch only if -mh or -ms present
> * config/h8300/h8300.c (initial_offset): offset adjusted
> * config/h8300/h8300.h (TARGET_NORMAL):new
> * config/h8300/h8300.h ( POINTER_SIZE): 16 bit pointer for normal mode
> * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P):extended support for normal mode
> * config/h8300/h8300.h (Pmode) : HI for normal mode
> * config/h8300/h8300.h (SIZE_TYPE) : unsigned int for normal mode
> * config/h8300/h8300.h (PTRDIFF_TYPE):int for normal mode
> * config/h8300/h8300.h (ASM_WORD_OP): word for normal mode
> * config/h8300/h8300.md((define_insn "tablejump_normal"): new
> * config/h8300/h8300.md(define_insn "indirect_jump_normal"): new
> * config/h8300/t-h8300 (MULTILIB_OPTIONS): passing normal mode option to directory
> * config/h8300/t-h8300 (MULTILIB_DIRNAMES): creat target dependent directory 'normal'
> * config/h8300/t-h8300 (MULTILIB_EXCEPTIONS): extended normal mode support
Can you reformat this to look like other ChangeLog entries? That is,
please do not repeat file names.
> ***************
> *** 1418,1422 ****
> if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
> offset += UNITS_PER_WORD; /* Skip saved PC */
> ! }
> return offset;
> }
> --- 1424,1432 ----
> 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;
> return offset;
> }
Please fix the formatting here. You may find the GNU coding standard helpful.
> ***************
> *** 216,220 ****
> /* Width in bits of a pointer.
> See also the macro `Pmode' defined below. */
> ! #define POINTER_SIZE (TARGET_H8300H || TARGET_H8300S ? 32 : 16)
>
> #define SHORT_TYPE_SIZE 16
> --- 223,227 ----
> /* Width in bits of a pointer.
> See also the macro `Pmode' defined below. */
> ! #define POINTER_SIZE ((TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL ? 32 : 16)
>
> #define SHORT_TYPE_SIZE 16
Please generate a patch against CVS HEAD, the development version.
POITNER_SIZE no longer exists. You may have to play with the
definition of UNITS_PER_WORD.
> ***************
> *** 842,847 ****
>
> #define EIGHTBIT_CONSTANT_ADDRESS_P(X) \
> ! (GET_CODE (X) == CONST_INT && TARGET_H8300H \
> ! && 0xffff00 <= INTVAL (X) && INTVAL (X) <= 0xffffff)
>
> /* 'U' if valid for a bset destination;
> --- 853,859 ----
>
> #define EIGHTBIT_CONSTANT_ADDRESS_P(X) \
> ! (GET_CODE (X) == CONST_INT && \
> ! ((TARGET_H8300H && 0xffff00 <= INTVAL (X) && INTVAL (X) <= 0xffffff) || \
> ! (TARGET_NORMAL && 0xffffff00 <= INTVAL (X) && INTVAL (X) <= 0xffffffff)))
>
> /* 'U' if valid for a bset destination;
You will have to rework this as a recent patch changed this part.
By the way, how did you test your patch? Did you run some code under
a normal mode on an actual target? Used the simulator that comes with
gdb?
Thanks,
Kazu Hirata