xstormy16: more misalignment fixes.

DJ Delorie <[email protected]>
Newsgroups gmane.comp.tools.cgen.devel,gmane.comp.emulators.sid.devel
Message-ID <[email protected]>
Yet more fixes for the xstormy16 word-alignment rules.

[cgen]
2003-05-01  DJ Delorie  <[email protected]>

	* cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
	word accesses.
	(set-alignfix-mem): Likewise.

[sid/component/cgen-cpu/xstormy16]
2003-05-01  DJ Delorie  <[email protected]>

	* xstormy16-sem.cxx: Regenerate.
	* xstormy16-write.cxx: Regenerate.

Index: cgen/cpu/xstormy16.cpu
===================================================================
RCS file: /cvs/uberbaum/./cgen/cpu/xstormy16.cpu,v
retrieving revision 1.8
diff -p -2 -r1.8 xstormy16.cpu
*** cgen/cpu/xstormy16.cpu	21 Mar 2003 06:15:55 -0000	1.8
--- cgen/cpu/xstormy16.cpu	1 May 2003 23:55:04 -0000
***************
*** 493,513 ****
  
  (define-pmacro (alignfix-mem where)
!   (if HI (and where 1)
!     (or HI
!       (and (sll (mem QI (sub where 1)) 8) #xFF00)
!       (and (mem QI where) #xFF))
!     (mem HI where)))
  
  (define-pmacro (set-alignfix-mem where what)
!   (sequence ((SI nwhere) (HI nwhat))
!     (set nwhere where)
!     (if (and nwhere 1)
!       (sequence ()
! 	(set nwhat (or HI
! 		    (and (sll what 8) #xFF00)
! 		    (and (srl what 8) #xFF)))
!         (set nwhere (sub nwhere 1)))
!       (set nwhat what))
!     (set (mem HI nwhere) what)))
  
  (dni movlmemimm
--- 493,500 ----
  
  (define-pmacro (alignfix-mem where)
!   (mem HI (and where #xFFFE)))
  
  (define-pmacro (set-alignfix-mem where what)
!   (set (mem HI (and where #xFFFE)) what))
  
  (dni movlmemimm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.