From: Dave Brolley Date: Tue, 17 Jun 2008 18:04:42 +0000 (+0000) Subject: 2008-06-17 Dave Brolley X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=ccd6051c2ab3160ed7ca80f05506aa1ae91e0374;p=cgen.git 2008-06-17 Dave Brolley * cpu/xstormy16.cpu (h-pc): Add a set handler. (h-gr): Likewise. --- diff --git a/ChangeLog b/ChangeLog index e632f0e..aec6131 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-17 Dave Brolley + + * cpu/xstormy16.cpu (h-pc): Add a set handler. + (h-gr): Likewise. + 2007-11-13 Dave Brolley * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm. diff --git a/cpu/xstormy16.cpu b/cpu/xstormy16.cpu index e87effe..d2c7817 100644 --- a/cpu/xstormy16.cpu +++ b/cpu/xstormy16.cpu @@ -1,5 +1,5 @@ ; xstormy16 CPU core description. -*- Scheme -*- -; Copyright (C) 2001, 2002, 2003 Red Hat, Inc. +; Copyright (C) 2001, 2002, 2003, 2006 Red Hat, Inc. ; This file is part of CGEN. ; See file COPYING.CGEN for details. @@ -68,7 +68,13 @@ ; Hardware elements. -(dsh h-pc "program counter" (PC) (pc)) +(define-hardware + (name h-pc) + (comment "program counter") + (attrs PC) + (type pc) + (set (newval) (c-call "h_pc_set_handler" newval)) +) (define-keyword (name gr-names) @@ -92,7 +98,7 @@ (type register WI (16)) (indices extern-keyword gr-names) (get (index) (and #xFFFF (raw-reg h-gr index))) - (set (index newval) (set (raw-reg h-gr index) (and #xFFFF newval))) + (set (index newval) (c-call "h_gr_set_handler" index newval)) ) (define-hardware