[<<][staapl][>>][..]
Thu Apr 9 10:34:34 CEST 2009

hygiene bug

The minimal patch I can find that breaks the test is this:


hunk ./staapl/asm/asmgen-tx.ss 92
-(define (parse-opcode-proto str)
-  (split-opcode
-   (bitstring->list str)))
+(define (parse-opcode-proto str-stx)
+  (map (match-lambda ((param . bits) (cons (datum->syntax str-stx param) bits)))
+       (split-opcode (bitstring->list (syntax->datum str-stx)))))
hunk ./staapl/asm/asmgen-tx.ss 101
-(define (binary->proto row)
-  (match row
-         ((name proto . binary)
-          (append (list name proto)
-                  (map parse-opcode-proto binary)))))
+(define (binary->proto row-stx)
+  (syntax-case row-stx ()
+    ((name proto . binary)
+     (append (list #'name #'proto)
+             (map parse-opcode-proto (syntax->list #'binary))))))
hunk ./staapl/asm/asmgen-tx.ss 108
-(check (binary->proto '(xorwf (f d a) "0001 10da ffff ffff"))
+'(check (binary->proto '(xorwf (f d a) "0001 10da ffff ffff"))
hunk ./staapl/asm/asmgen-tx.ss 178
-(define (instruction-set-tx asm! dasm! instructions)
-  (let ((protos
-         (map
-          binary->proto
-          (syntax->datum instructions))))
+(define (instruction-set-tx asm! dasm! ins-stx)
+  (let ((protos (map binary->proto (syntax->list ins-stx))))


Let's have a look at the disassembly.
The're all 'bra 'bnz 'rcall instructions.  The other code is intact.
I suspect this is in assembler composition.


tom@zzz:~/staapl/app$ make 1220-8.diff

< 000000:  d020  bra	0x42
< 000040:  d101  bra	0x244
---
> 000000:  d01f  bra	0x40
> 000040:  d0e0  bra	0x202
4,5c4,5
< 000044:  d024  bra	0x8e
< 000046:  d021  bra	0x8a
---
> 000044:  d001  bra	0x48
> 000046:  d7fd  bra	0x1042
7c7
< 00004a:  d029  bra	0x9e
---
> 00004a:  d003  bra	0x52
10c10
< 000050:  d021  bra	0x94
---
> 000050:  d7f8  bra	0x1042
14c14
< 000058:  d02f  bra	0xb8
---
> 000058:  d002  bra	0x5e
16c16
< 00005c:  d021  bra	0xa0
---




[Reply][About]
[<<][staapl][>>][..]