Changeset 6062


Ignore:
Timestamp:
Mar 18, 2007, 7:51:39 AM (13 years ago)
Author:
gb
Message:

%GET-BITFIELD, %SET-BITFIELD: handle little-endian target (small sample
size, but at least the x86-64 little-endian target.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/objc-gf/ccl/lib/level-2.lisp

    r5567 r6062  
    433433(defun %get-bitfield (ptr start-bit width)
    434434  (declare (fixnum start-bit width))
    435   (do* ((bit start-bit (1+ bit))
     435  (do* ((bit #+big-endian-target start-bit
     436             #+little-endian-target (the fixnum (1- (the fixnum (+ start-bit width))))
     437             #+big-endian-target (1+ bit)
     438             #+little-endian-target (1- bit))
    436439        (i 0 (1+ i))
    437440        (val 0))
     
    443446  (declare (fixnum val start width))
    444447  (do* ((v val (ash v -1))
    445         (bit (1- (+ start width)) (1- bit))
     448        (bit #+big-endian-target (1- (+ start width))
     449             #+little-endian-target start
     450             #+big-endian-target (1- bit)
     451             #+little-endian-target (1+ bit))
    446452        (i 0 (1+ i)))
    447453       ((= i width) val)
Note: See TracChangeset for help on using the changeset viewer.