这里是优化等级为0时的汇编代码:
471: static __inline void imdct12 (int *x, int *out)
0x08004C30 B027 ADD sp,sp,#0x9C
0x08004C32 E8BD8FF0 POP {r4-r11,pc}
0x08004C36 0000 MOVS r0,r0
0x08004C38 EBA16ED9 SUB lr,r1,r9,LSR #27
0x08004C3C BE8B BKPT 0x8B
0x08004C3E 620D STR r5,[r1,#0x20]
0x08004C40 1A7E SUBS r6,r7,r1
0x08004C42 163A ASRS r2,r7,#24
0x08004C44 DD49 BLE 0x08004CDA
0x08004C46 5246 STRH r6,[r0,r1]
0x08004C48 2E32 CMP r6,#0x32
0x08004C4A 7E0E LDRB r6,[r1,#0x18]
472: {
473: int a0, a1, a2;
474: int x0, x1, x2, x3, x4, x5;
475:
0x08004C4C E92D4FFE PUSH {r1-r11,lr}
0x08004C50 4604 MOV r4,r0
0x08004C52 460D MOV r5,r1
476: x0 = *x; x+=3; x1 = *x; x+=3;
0x08004C54 F8D48000 LDR r8,[r4,#0x00]
0x08004C58 340C ADDS r4,r4,#0x0C
0x08004C5A 6826 LDR r6,[r4,#0x00]
0x08004C5C 340C ADDS r4,r4,#0x0C
477: x2 = *x; x+=3; x3 = *x; x+=3;
0x08004C5E F8D4B000 LDR r11,[r4,#0x00]
0x08004C62 340C ADDS r4,r4,#0x0C
0x08004C64 6827 LDR r7,[r4,#0x00]
0x08004C66 340C ADDS r4,r4,#0x0C
478: x4 = *x; x+=3; x5 = *x; x+=3;
479:
0x08004C68 F8D49000 LDR r9,[r4,#0x00]
0x08004C6C 340C ADDS r4,r4,#0x0C
0x08004C6E F8D4A000 LDR r10,[r4,#0x00]
0x08004C72 340C ADDS r4,r4,#0x0C
480: x4 -= x5;
0x08004C74 EBA9090A SUB r9,r9,r10
481: x3 -= x4;
0x08004C78 EBA70709 SUB r7,r7,r9
482: x2 -= x3;
0x08004C7C EBAB0B07 SUB r11,r11,r7
483: x3 -= x5;
0x08004C80 EBA7070A SUB r7,r7,r10
484: x1 -= x2;
0x08004C84 EBA6060B SUB r6,r6,r11
485: x0 -= x1;
0x08004C88 EBA80806 SUB r8,r8,r6
486: x1 -= x3;
487:
0x08004C8C 1BF6 SUBS r6,r6,r7
488: x0 >>= 1;
0x08004C8E EA4F0868 ASR r8,r8,#1
489: x1 >>= 1;
490:
0x08004C92 1076 ASRS r6,r6,#1
491: a0 = MULSHIFT32(c3_0, x2) << 1;
0x08004C94 4659 MOV r1,r11
0x08004C96 4828 LDR r0,[pc,#160] ; @0x08004D38
0x08004C98 F7FBFA9A BL.W xmp3_MULSHIFT32 (0x080001D0)
0x08004C9C 0040 LSLS r0,r0,#1
0x08004C9E 9002 STR r0,[sp,#0x08]
492: a1 = x0 + (x4 >> 1);
0x08004CA0 EB080069 ADD r0,r8,r9,ASR #1
0x08004CA4 9001 STR r0,[sp,#0x04]
493: a2 = x0 - x4;
0x08004CA6 EBA80009 SUB r0,r8,r9
0x08004CAA 9000 STR r0,[sp,#0x00]
494: x0 = a1 + a0;
0x08004CAC E9DD0101 LDRD r0,r1,[sp,#0x04]
0x08004CB0 EB000801 ADD r8,r0,r1
495: x2 = a2;
0x08004CB4 F8DDB000 LDR r11,[sp,#0x00]
496: x4 = a1 - a0;
497:
0x08004CB8 E9DD0101 LDRD r0,r1,[sp,#0x04]
0x08004CBC EBA00901 SUB r9,r0,r1
498: a0 = MULSHIFT32(c3_0, x3) << 1;
0x08004CC0 4639 MOV r1,r7
0x08004CC2 481D LDR r0,[pc,#116] ; @0x08004D38
0x08004CC4 F7FBFA84 BL.W xmp3_MULSHIFT32 (0x080001D0)
0x08004CC8 0040 LSLS r0,r0,#1
0x08004CCA 9002 STR r0,[sp,#0x08]
499: a1 = x1 + (x5 >> 1);
0x08004CCC EB06006A ADD r0,r6,r10,ASR #1
0x08004CD0 9001 STR r0,[sp,#0x04]
500: a2 = x1 - x5;
501:
502: /* cos window odd samples, mul by 2, eat sign bit */
0x08004CD2 EBA6000A SUB r0,r6,r10
0x08004CD6 9000 STR r0,[sp,#0x00]
503: x1 = MULSHIFT32(c6[0], a1 + a0) << 2;
0x08004CD8 E9DD2301 LDRD r2,r3,[sp,#0x04]
0x08004CDC 18D1 ADDS r1,r2,r3
0x08004CDE 4A17 LDR r2,[pc,#92] ; @0x08004D3C
0x08004CE0 6810 LDR r0,[r2,#0x00]
0x08004CE2 F7FBFA75 BL.W xmp3_MULSHIFT32 (0x080001D0)
0x08004CE6 0086 LSLS r6,r0,#2
504: x3 = MULSHIFT32(c6[1], a2) << 2;
0x08004CE8 4914 LDR r1,[pc,#80] ; @0x08004D3C
0x08004CEA 6848 LDR r0,[r1,#0x04]
0x08004CEC 9900 LDR r1,[sp,#0x00]
0x08004CEE F7FBFA6F BL.W xmp3_MULSHIFT32 (0x080001D0)
0x08004CF2 0087 LSLS r7,r0,#2
505: x5 = MULSHIFT32(c6[2], a1 - a0) << 2;
506:
0x08004CF4 E9DD2301 LDRD r2,r3,[sp,#0x04]
0x08004CF8 1AD1 SUBS r1,r2,r3
0x08004CFA 4A10 LDR r2,[pc,#64] ; @0x08004D3C
0x08004CFC 6890 LDR r0,[r2,#0x08]
0x08004CFE F7FBFA67 BL.W xmp3_MULSHIFT32 (0x080001D0)
0x08004D02 EA4F0A80 LSL r10,r0,#2
507: *out = x0 + x1; out++;
0x08004D06 EB080006 ADD r0,r8,r6
0x08004D0A 6028 STR r0,[r5,#0x00]
0x08004D0C 1D2D ADDS r5,r5,#4
508: *out = x2 + x3; out++;
0x08004D0E EB0B0007 ADD r0,r11,r7
0x08004D12 6028 STR r0,[r5,#0x00]
0x08004D14 1D2D ADDS r5,r5,#4
509: *out = x4 + x5; out++;
0x08004D16 EB09000A ADD r0,r9,r10
0x08004D1A 6028 STR r0,[r5,#0x00]
0x08004D1C 1D2D ADDS r5,r5,#4
510: *out = x4 - x5; out++;
0x08004D1E EBA9000A SUB r0,r9,r10
0x08004D22 6028 STR r0,[r5,#0x00]
0x08004D24 1D2D ADDS r5,r5,#4
511: *out = x2 - x3; out++;
0x08004D26 EBAB0007 SUB r0,r11,r7
0x08004D2A 6028 STR r0,[r5,#0x00]
0x08004D2C 1D2D ADDS r5,r5,#4
512: *out = x0 - x1;
0x08004D2E EBA80006 SUB r0,r8,r6
0x08004D32 6028 STR r0,[r5,#0x00]
513: }
0x08004D34 E8BD8FFE POP {r1-r11,pc}
0x08004D38 EBA16ED9 SUB lr,r1,r9,LSR #27
0x08004D3C 9590 STR r5,[sp,#0x240]
0x08004D3E 0800 LSRS r0,r0,#0 |