Skip to content
  • Evan Cheng's avatar
    Much improved pic jumptable codegen: · 797d56ff
    Evan Cheng authored
    Then:
            call    "L1$pb"
    "L1$pb":
            popl    %eax
    		...
    LBB1_1: # entry
            imull   $4, %ecx, %ecx
            leal    LJTI1_0-"L1$pb"(%eax), %edx
            addl    LJTI1_0-"L1$pb"(%ecx,%eax), %edx
            jmpl    *%edx
    
            .align  2
            .set L1_0_set_3,LBB1_3-LJTI1_0
            .set L1_0_set_2,LBB1_2-LJTI1_0
            .set L1_0_set_5,LBB1_5-LJTI1_0
            .set L1_0_set_4,LBB1_4-LJTI1_0
    LJTI1_0:
            .long    L1_0_set_3
            .long    L1_0_set_2
    
    Now:
            call    "L1$pb"
    "L1$pb":
            popl    %eax
    		...
    LBB1_1: # entry
            addl    LJTI1_0-"L1$pb"(%eax,%ecx,4), %eax
            jmpl    *%eax
    
    		.align  2
    		.set L1_0_set_3,LBB1_3-"L1$pb"
    		.set L1_0_set_2,LBB1_2-"L1$pb"
    		.set L1_0_set_5,LBB1_5-"L1$pb"
    		.set L1_0_set_4,LBB1_4-"L1$pb"
    LJTI1_0:
            .long    L1_0_set_3
            .long    L1_0_set_2
    
    llvm-svn: 43924
    797d56ff
Loading