This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] New: CR16 port


On Mon, Jul 16, 2007 at 02:26:06PM +0530, Pompapathi V Gadad wrote:

> Index: doc/extend.texi
> ===================================================================
> --- doc/extend.texi	(revision 126669)
> +++ doc/extend.texi	(working copy)
> @@ -2100,11 +2100,10 @@ This attribute is ignored for R8C target
>  
>  @item interrupt
>  @cindex interrupt handler functions
> -Use this attribute on the ARM, AVR, C4x, CRX, M32C, M32R/D, m68k, MS1,
> -and Xstormy16 ports to indicate that the specified function is an
> -interrupt handler.  The compiler will generate function entry and exit
> -sequences suitable for use in an interrupt handler when this attribute
> -is present.
> +Use this attribute on the ARM, AVR, C4x, CR16, CRX, M32C, M32R/D, MS1, 
> +and Xstormy16 ports to indicate that the specified function is an interrupt 
> +handler. The compiler will generate function entry and exit sequences suitable
> +for use in an interrupt handler when this attribute is present.
>  
>  Note, interrupt handlers for the Blackfin, H8/300, H8/300H, H8S, and
>  SH processors can be specified via the @code{interrupt_handler} attribute.

   You're still modifying the m68k documentation.

> Index: config/cr16/cr16.md
[...]
> +(define_mode_attr tIsa      [(QI "b") (HI "w") (SI "d") (SF "d")])
> +(define_mode_attr tIsaLong  [                  (SI "d") (SF "d")])
> +(define_mode_attr tIsaShort [(QI "b") (HI "w")                  ])

   You should be able to use tIsa instead of tIsaLong and tIsaShort
everywhere.

> +(define_mode_attr lImmShort [(QI "4") (HI "4")                  ])
> +(define_mode_attr lImmLong  [                  (SI "6") (SF "6")])
> +(define_mode_attr lImmArith [(QI "4") (HI "4") (SI "6") (SF "6")])

   And something similiar goes here.

> +;;  Negation Instructions
> +; move 0,r sub x,r. More efficient than xor -1,x add 1,x
> +(define_expand "neg<mode>2"
> +  [(set (match_operand:CR16IM 0 "register_operand" "")
> +        (const_int 0))
> +   (parallel [(set (match_dup 0) 
> +        (minus:CR16IM (match_dup 0)
> +          (match_operand:CR16IM 1 "register_operand" "")))
> +    (clobber (reg:CC CC_REGNUM))]) 
> +  ]
> +  ""
> +  "")

   You said you would delete this expander. Did it not work?

-- 
Rask Ingemann Lambertsen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]