OSDN Git Service

* cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
authordj <dj>
Fri, 2 May 2003 00:09:25 +0000 (00:09 +0000)
committerdj <dj>
Fri, 2 May 2003 00:09:25 +0000 (00:09 +0000)
word accesses.
(set-alignfix-mem): Likewise.

cgen/ChangeLog
cgen/cpu/xstormy16.cpu

index 7d73f3c..63b59e7 100644 (file)
@@ -1,3 +1,9 @@
+2003-05-01  DJ Delorie  <dj@redhat.com>
+
+       * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
+       word accesses.
+       (set-alignfix-mem): Likewise.
+
 2003-04-16  Dave Brolley  <brolley@redhat.com>
 
        * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
index d76d677..cc0047b 100644 (file)
 ; Move Operations
 
 (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)))
+  (mem HI (and where #xFFFE)))
 
 (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)))
+  (set (mem HI (and where #xFFFE)) what))
 
 (dni movlmemimm
      "Move immediate to low memory"