267
|
1 tb main
|
|
2 # run -s -ob00.s test/basic.c
|
|
3 # run -s -ob00.s mc-parse.c
|
|
4 run -s test/code-gen-all.c
|
|
5 define regs
|
|
6 printf "pc =%08x fp =%08x r2 =%08x r3 =%08x r4= %08x r5= %08x\n",$pc,$fp,$v0,$v1,$a0,$a1
|
271
|
7 printf "r6 =%08x r7 =%08x r8 =%08x r9 =%08x r10=%08x r11=%08x\n",$a2,$a3,$t0,$t1,$t2,$t3
|
267
|
8 end
|
|
9 define fregs
|
|
10 printf "f0=%g f1=%g f2=%g f3=%g f4=%g f5=%g f6=%g\n",$f0,$f1,$f2,$f3,$f4,$f5,$f6
|
|
11 printf "f10=%g f11=%g f12=%g f13=%g f14=%g f15=%g\n",$f10,$f11,$f12,$f13,$f14,$f15
|
|
12 end
|
|
13 define allreg
|
|
14 printf "pc =%08x fp =%08x r2 =%08x r3 =%08x r4= %08x r5= %08x\n",$pc,$fp,$v0,$v1,$a0,$a1
|
|
15 printf "r6=%08x r7=%08x r8=%08x r9=%08x r10=%08x\n",$a2,$a3,$t0,$t1,$t2
|
|
16 printf "r11=%08x r12=%08x r14=%08x r15=%08x r16=%08x\n",$t3,$t4,$t5,$t6,$t7
|
|
17 printf "r17=%08x r18=%08x r19=%08x r20=%08x r21=%08x\n",$s0,$s1,$s2,$s3,$s4
|
|
18 printf "r22=%08x r23=%08x r24=%08x r25=%08x r26=%08x\n",$s5,$s6,$s7,$t8,$jp
|
|
19 printf "r27=%08x r28=%08x r29=%08x r30=%08x r31=%08x\n",$k0,$k1,$gp,$sp,$ra
|
|
20 printf "f0=%g f1=%g f2=%g f3=%g f4=%g f5=%g f6=%g\n",$f0,$f1,$f2,$f3,$f4,$f5,$f6
|
|
21 printf "f10=%g f11=%g f12=%g f13=%g f14=%g f15=%g\n",$f10,$f11,$f12,$f13,$f14,$f15
|
|
22 printf "f20=%g f21=%g f22=%g f23=%g f24=%g f25=%g\n",$f20,$f21,$f22,$f23,$f24,$f25
|
|
23 end
|
|
24 define sh
|
|
25 regs
|
|
26 x/20i $pc-36
|
|
27 end
|
|
28 define si
|
|
29 stepi
|
|
30 regs
|
|
31 x/1i $pc
|
|
32 end
|
|
33 define ni
|
|
34 nexti
|
|
35 regs
|
|
36 x/1i $pc
|
|
37 end
|
|
38 b errmsg
|