Operations on 8-bit and 12-bit operands shuffle args into range
authorAndy Wingo <wingo@pobox.com>
Mon, 21 Apr 2014 17:28:06 +0000 (19:28 +0200)
committerAndy Wingo <wingo@pobox.com>
Mon, 21 Apr 2014 20:47:28 +0000 (22:47 +0200)
commitd4b3a36d4202d7e891a3642b9de12a8800f57b38
tree719d6697392941d5719b020612be5b3dcf8519c9
parent28e12ea0c401ea2c1aad203d7b45b2209d5e9be2
Operations on 8-bit and 12-bit operands shuffle args into range

* module/language/cps/slot-allocation.scm (allocate-slots): Avoid
  allocating locals in the range [253,255].

* module/system/vm/assembler.scm: List exports explicitly.  For
  operations with limited-range operands, export wrapper assemblers that
  handle shuffling their operands into and out of their range.
  (define-assembler): Get rid of enclosing begin.
  (shuffling-assembler, define-shuffling-assembler): New helpers to
  define shuffling wrapper assemblers.
  (emit-mov*, emit-receive*): New functions.
  (shuffle-up-args): New helper.
  (standard-prelude, opt-prelude, kw-prelude): Call shuffle-up-args
  after finishing.

* test-suite/tests/compiler.test ("limits"): Add test cases.
module/language/cps/slot-allocation.scm
module/system/vm/assembler.scm
test-suite/tests/compiler.test