@@ -1253,3 +1253,47 @@ ldu
125312530x00178008
12541254EOF2
12551255RUN
1256+
1257+ NAME=ppc-64 cc clobber and preserve register sets
1258+ FILE=malloc://16
1259+ ARGS=-a ppc -b 64 -e anal.arch=ppc
1260+ CMDS=<<EOF
1261+ k anal/cc/cc.ppc-64.clobber
1262+ k anal/cc/cc.ppc-64.preserve
1263+ EOF
1264+ EXPECT=<<EOF
1265+ r0,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr,ctr,xer,cr0,cr1,cr5,cr6,cr7,f0,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13
1266+ r1,r2,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28,r29,r30,r31,cr2,cr3,cr4,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30,f31
1267+ EOF
1268+ RUN
1269+
1270+ NAME=ppc-32 cc clobber and preserve register sets
1271+ FILE=malloc://16
1272+ ARGS=-a ppc -b 32 -e anal.arch=ppc
1273+ CMDS=<<EOF
1274+ k anal/cc/cc.ppc-32.clobber
1275+ k anal/cc/cc.ppc-32.preserve
1276+ EOF
1277+ EXPECT=<<EOF
1278+ r0,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr,ctr,xer,cr0,cr1,cr5,cr6,cr7,f0,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13
1279+ r1,r2,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28,r29,r30,r31,cr2,cr3,cr4,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30,f31
1280+ EOF
1281+ RUN
1282+
1283+ NAME=ppc-64 clobber kills r3 arg after call
1284+ FILE=malloc://32
1285+ ARGS=-a ppc -b 64 -e anal.arch=ppc -e cfg.bigendian=true -e anal.cc=ppc-64
1286+ CMDS=<<EOF
1287+ wx 7c641b784800000d7c641b784e8000204e800020
1288+ af @ 0
1289+ afc ppc-64 @ 0
1290+ af @ 0x10
1291+ afc ppc-64 @ 0x10
1292+ afva @ 0
1293+ afvR @ 0
1294+ EOF
1295+ EXPECT=<<EOF
1296+ arg1 0x0
1297+ arg2 0x0
1298+ EOF
1299+ RUN
0 commit comments