fetched by one of our GETIMEM* methods.
* utils-gen.scm (-extract-chunk-specs): Always fetch full
base-insn-sized chunks.
+2005-05-16 Jim Blandy <jimb@redhat.com>
+
+ * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
+ fetched by one of our GETIMEM* methods.
+ * utils-gen.scm (-extract-chunk-specs): Always fetch full
+ base-insn-sized chunks.
+
2005-05-10 Nick Clifton <nickc@redhat.com>
* Update the address and phone number of the FSF organization in
; Return C code to fetch a value from instruction memory.
; PC-VAR is the C expression containing the address of the start of the
; instruction.
+;
+; We don't bother trying to handle bitsizes that don't have a
+; corresponding GETIMEM method. Doing so would require us to take
+; endianness into account just to ensure that the requested bits end
+; up at the proper place in the result. It's easier just to make the
+; caller ask us for something we can do directly.
+;
; ??? Aligned/unaligned support?
(define (gen-ifetch pc-var bitoffset bitsize)
(case bitsize
((8) "UQI")
((16) "UHI")
- ((24) "USI")
((32) "USI")
(else (error "bad bitsize argument to gen-ifetch" bitsize)))
" (pc, "
(reverse! result)
(loop (+ start chunk-length)
(- remaining chunk-length)
- (cons (cons start (min chunk-length remaining))
+ ; Always fetch full CHUNK-LENGTH-sized chunks here,
+ ; even if we don't actually need that many bytes.
+ ; gen-ifetch only handles "normal" fetch sizes,
+ ; and -gen-extract-word already knows how to find what
+ ; it needs if we give it too much.
+ (cons (cons start chunk-length)
result)))))
)