Created attachment 203443 [details] modules/demux/avi/libavi.c (compressed, preprocessed) /bin/sh ../libtool --tag=CC --mode=compile /usr/bin/cc -DHAVE_CONFIG_H -I. -I.. -DMODULE_STRING=\"$(p="demux/avi/libavi.lo"; p="${p##*/}"; p="${p#lib}"; p="${p%_plugin*}"; p=$(echo "$p"|sed 's/-/_/g'); p="${p%.lo}"; echo "$p")\" -D__PLUGIN__ -I./access -I./codec -I../include -I../include -I/usr/local/include -DLIBICONV_PLUG -O2 -pipe -DLIBICONV_PLUG -fno-strict-aliasing -Werror=unknown-warning-option -Werror=invalid-command-line-argument -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -fvisibility=hidden -O3 -fno-math-errno -funsafe-math-optimizations -funroll-loops -fomit-frame-pointer -fstack-protector-strong -MT demux/avi/libavi.lo -MD -MP -MF $depbase.Tpo -c -o demux/avi/libavi.lo demux/avi/libavi.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: /usr/bin/cc -DHAVE_CONFIG_H -I. -I.. -DMODULE_STRING=\"avi\" -D__PLUGIN__ -I./access -I./codec -I../include -I../include -I/usr/local/include -DLIBICONV_PLUG -O2 -pipe -DLIBICONV_PLUG -fno-strict-aliasing -Werror=unknown-warning-option -Werror=invalid-command-line-argument -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -fvisibility=hidden -O3 -fno-math-errno -funsafe-math-optimizations -funroll-loops -fomit-frame-pointer -fstack-protector-strong -MT demux/avi/libavi.lo -MD -MP -MF demux/avi/.deps/libavi.Tpo -c demux/avi/libavi.c -fPIC -DPIC -o demux/avi/.libs/libavi.o demux/avi/libavi.c:91:60: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] (char*)&p_chk->common.i_chunk_fourcc, AVI_ChunkEnd( p_father ) ); ^~~~~~~~~~~~~~~~~~~~~~~~ ../include/vlc_messages.h:85:39: note: expanded from macro 'msg_Warn' msg_Generic(p_this, VLC_MSG_WARN, __VA_ARGS__) ^~~~~~~~~~~ ../include/vlc_messages.h:79:23: note: expanded from macro 'msg_Generic' __func__, __VA_ARGS__) ^~~~~~~~~~~ # Machine code for function AVI_ChunkRead: NoPHIs, TracksLiveness Frame Objects: fi#0: size=4, align=4, at location [SP] fi#1: size=1, align=1, at location [SP] Constant Pool: cp#0: 2019847785, align=4 Function Live Ins: $r0 in %10, $r1 in %11, $r2 in %12 bb.0.entry: successors: %bb.1(0x30000000), %bb.2(0x50000000); %bb.1(37.50%), %bb.2(62.50%) liveins: $r0, $r1, $r2 %12:gpr = COPY killed $r2 %11:gpr = COPY killed $r1 %10:gpr = COPY killed $r0 %13:gpr = LDRLIT_ga_pcrel_ldr target-flags(arm-got) @__stack_chk_guard :: (load 4 from got) %14:gpr = LDRi12 %13:gpr, 0, 14, $noreg :: (volatile load 4 from @__stack_chk_guard) STRi12 %14:gpr, %stack.0.StackGuardSlot, 0, 14, $noreg :: (volatile store 4 into %stack.0.StackGuardSlot) CMPri %11:gpr, 0, 14, $noreg, implicit-def $cpsr Bcc %bb.2, 1, killed $cpsr B %bb.1 bb.1.if.then: ; predecessors: %bb.0 successors: %bb.25(0x80000000); %bb.25(100.00%) %71:gpr = LDRLIT_ga_pcrel @__func__.AVI_ChunkRead %72:gpr = LDRLIT_ga_pcrel @.str %73:gpr = LDRLIT_ga_pcrel @.str.1 ADJCALLSTACKDOWN 12, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %74:gpr = COPY $sp %75:gpr = MOVi32imm 991 STRi12 %75:gpr, %74:gpr, 0, 14, $noreg :: (store 4 into stack) STRi12 %71:gpr, %74:gpr, 4, 14, $noreg :: (store 4 into stack + 4) STRi12 %73:gpr, %74:gpr, 8, 14, $noreg :: (store 4 into stack + 8) %76:gpr = MOVi 2, 14, $noreg, $noreg %77:gpr = LDRLIT_ga_pcrel_ldr target-flags(arm-got) @vlc_module_name :: (load 4 from got) $r0 = COPY %10:gpr $r1 = COPY %76:gpr $r2 = COPY %77:gpr $r3 = COPY %72:gpr BL @vlc_Log, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26 $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r1, implicit killed $r2, implicit killed $r3, implicit-def $sp ADJCALLSTACKUP 12, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %70:gpr = MVNi 0, 14, $noreg, $noreg %84:gpr = COPY %70:gpr B %bb.25 bb.2.if.end: ; predecessors: %bb.0 successors: %bb.3(0x30000000), %bb.25(0x50000000); %bb.3(37.50%), %bb.25(62.50%) ADJCALLSTACKDOWN 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp $r0 = COPY %10:gpr $r1 = COPY %11:gpr $r2 = COPY %12:gpr BL_pred @AVI_ChunkReadCommon, 14, $noreg, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26 $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit $r0, implicit killed $r1, implicit killed $r2, implicit-def $sp, implicit-def $r0 ADJCALLSTACKUP 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %16:gpr = COPY $r0 %15:gpr = MVNi 0, 14, $noreg, $noreg CMPri %16:gpr, 0, 14, $noreg, implicit-def $cpsr %84:gpr = COPY %15:gpr Bcc %bb.25, 1, killed $cpsr B %bb.3 bb.3.if.end3: ; predecessors: %bb.2 successors: %bb.4(0x30000000), %bb.5(0x50000000); %bb.4(37.50%), %bb.5(62.50%) %0:gprnopc = LDRi12 %11:gpr, 0, 14, $noreg :: (load 4 from %ir.i_chunk_fourcc81, align 8) CMPri %0:gprnopc, 0, 14, $noreg, implicit-def $cpsr Bcc %bb.5, 1, killed $cpsr B %bb.4 bb.4.if.then4: ; predecessors: %bb.3 successors: %bb.25(0x80000000); %bb.25(100.00%) %63:gpr = LDRLIT_ga_pcrel @__func__.AVI_ChunkRead %64:gpr = LDRLIT_ga_pcrel @.str %65:gpr = LDRLIT_ga_pcrel @.str.2 ADJCALLSTACKDOWN 12, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %66:gpr = COPY $sp %67:gpr = MOVi 1000, 14, $noreg, $noreg STRi12 %67:gpr, %66:gpr, 0, 14, $noreg :: (store 4 into stack) STRi12 %63:gpr, %66:gpr, 4, 14, $noreg :: (store 4 into stack + 4) STRi12 %65:gpr, %66:gpr, 8, 14, $noreg :: (store 4 into stack + 8) %68:gpr = MOVi 2, 14, $noreg, $noreg %69:gpr = LDRLIT_ga_pcrel_ldr target-flags(arm-got) @vlc_module_name :: (load 4 from got) $r0 = COPY %10:gpr $r1 = COPY %68:gpr $r2 = COPY %69:gpr $r3 = COPY %64:gpr BL @vlc_Log, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26libtool: link: /usr/bin/egrep -e "^vlc_entry" ".libs/libdirectory_demux_plugin.exp" > ".libs/libdirectory_demux_plugin.expT" $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r1, implicit killed $r2, implicit killed $r3, implicit-def $sp ADJCALLSTACKUP 12, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %62:gpr = MOVi 254, 14, $noreg, $noreg %84:gpr = COPY %62:gpr B %bb.25 bb.5.if.end6: ; predecessors: %bb.3 successors: %bb.6(0x80000000); %bb.6(100.00%) STRi12 %12:gpr, %11:gpr, 28, 14, $noreg :: (store 4 into %ir.4) %17:gpr = MOVi 0, 14, $noreg, $noreg %19:gpr = LDRLIT_ga_pcrel @AVI_Chunk_Function %82:gprnopc = COPY %17:gpr bb.6.for.cond.i: ; predecessors: %bb.5, %bb.7 successors: %bb.8(0x02000000), %bb.7(0x7e000000); %bb.8(1.56%), %bb.7(98.44%) %1:gprnopc = COPY %82:gprnopc %2:gpr = nuw nsw ADDri %1:gprnopc, 12, 14, $noreg, $noreg CMPri %1:gprnopc, 780, 14, $noreg, implicit-def $cpsr Bcc %bb.8, 0, killed $cpsr B %bb.7 bb.7.for.cond.i: ; predecessors: %bb.6 successors: %bb.8(0x02082082), %bb.6(0x7df7df7e); %bb.8(1.59%), %bb.6(98.41%) %18:gpr = LDRrs %19:gpr, %1:gprnopc, 0, 14, $noreg :: (load 4 from %ir.uglygep7980) CMPrr %18:gpr, %0:gprnopc, 14, $noreg, implicit-def $cpsr %82:gprnopc = COPY %2:gpr Bcc %bb.6, 1, killed $cpsr B %bb.8 bb.8.AVI_ChunkFunctionFind.exit: ; predecessors: %bb.6, %bb.7 successors: %bb.12(0x40000000), %bb.9(0x40000000); %bb.12(50.00%), %bb.9(50.00%) CMPri %1:gprnopc, 780, 14, $noreg, implicit-def $cpsr Bcc %bb.12, 0, killed $cpsr B %bb.9 bb.9.if.then13: ; predecessors: %bb.8 successors: %bb.11(0x7ffff800), %bb.10(0x00000800); %bb.11(100.00%), %bb.10(0.00%) %24:gpr = LDRi12 %13:gpr, 0, 14, $noreg :: (volatile load 4 from @__stack_chk_guard) %25:gpr = LDRi12 %stack.0.StackGuardSlot, 0, 14, $noreg :: (volatile load 4 from %stack.0.StackGuardSlot) dead %26:gpr = SUBrr %24:gpr, %25:gpr, 14, $noreg, def $cpsr Bcc %bb.10, 1, killed $cpsr B %bb.11 bb.10.if.then13: ; predecessors: %bb.9, %bb.16, %bb.25 ADJCALLSTACKDOWN 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp BL &__stack_chk_fail, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26 $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit-def $sp ADJCALLSTACKUP 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp bb.11.if.then13: ; predecessors: %bb.9 %21:gpr = ADDrr %19:gpr, %2:gpr, 14, $noreg, $noreg %22:tcgpr = LDRi12 %21:gpr, -8, 14, $noreg :: (load 4 from %ir.scevgep) TCRETURNri %22:tcgpr, implicit $sp, implicit $r0, implicit killed $r1 bb.12.if.else: ; predecessors: %bb.8 successors: %bb.13(0x40000000), %bb.14(0x40000000); %bb.13(50.00%), %bb.14(50.00%) %27:gprnopc = UXTB %0:gprnopc, 0, 14, $noreg CMPri %27:gprnopc, 105, 14, $noreg, implicit-def $cpsr Bcc %bb.14, 1, killed $cpsr B %bb.13 bb.13.land.lhs.true: ; predecessors: %bb.12 successors: %bb.16(0x40000000), %bb.14(0x40000000); %bb.16(50.00%), %bb.14(50.00%) %28:gprnopc = LDRBi12 %11:gpr, 1, 14, $noreg :: (load 1 from %ir.arrayidx24) CMPri %28:gprnopc, 120, 14, $noreg, implicit-def $cpsr Bcc %bb.16, 0, killed $cpsr B %bb.14 bb.14.lor.lhs.false: ; predecessors: %bb.12, %bb.13 successors: %bb.15(0x40000000), %bb.18(0x40000000); %bb.15(50.00%), %bb.18(50.00%) %29:gprnopc = LDRBi12 %11:gpr, 2, 14, $noreg :: (load 1 from %ir.arrayidx30, align 2) CMPri %29:gprnopc, 105, 14, $noreg, implicit-def $cpsr Bcc %bb.18, 1, killed $cpsr B %bb.15 bb.15.land.lhs.true34: ; predecessors: %bb.14 successors: %bb.16(0x40000000), %bb.18(0x40000000); %bb.16(50.00%), %bb.18(50.00%) libtool: link: /usr/bin/nm demux/mpeg/.libs/es.o packetizer/.libs/dts_header.o | sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libes_plugin.exp %30:gprnopc = LDRBi12 %11:gpr, 3, 14, $noreg :: (load 1 from %ir.arrayidx37) CMPri %30:gprnopc, 120, 14, $noreg, implicit-def $cpsr Bcc %bb.18, 1, killed $cpsr B %bb.16 bb.16.if.then41: ; predecessors: %bb.13, %bb.15 successors: %bb.17(0x7ffff800), %bb.10(0x00000800); %bb.17(100.00%), %bb.10(0.00%) %57:gpr = LDRcp %const.0, 0, 14, $noreg :: (load 4 from constant-pool) STRi12 %57:gpr, %11:gpr, 0, 14, $noreg :: (store 4 into %ir.15, align 8) %59:gpr = LDRi12 %13:gpr, 0, 14, $noreg :: (volatile load 4 from @__stack_chk_guard) %60:gpr = LDRi12 %stack.0.StackGuardSlot, 0, 14, $noreg :: (volatile load 4 from %stack.0.StackGuardSlot) dead %61:gpr = SUBrr %59:gpr, %60:gpr, 14, $noreg, def $cpsr Bcc %bb.10, 1, killed $cpsr B %bb.17 bb.17.if.then41: ; predecessors: %bb.16 $r0 = COPY %10:gpr $r1 = COPY %11:gpr TCRETURNdi @AVI_ChunkRead_indx, implicit $sp, implicit killed $r0, implicit killed $r1 bb.18.if.end3.i: ; predecessors: %bb.14, %bb.15 successors: %bb.21(0x20000000), %bb.19(0x60000000); %bb.21(25.00%), %bb.19(75.00%) %32:gpr = LDRLIT_ga_pcrel @__func__.AVI_ChunkRead %33:gpr = LDRLIT_ga_pcrel @.str %34:gpr = LDRLIT_ga_pcrel @.str.3 ADJCALLSTACKDOWN 16, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %35:gpr = COPY $sp %36:gpr = MOVi 1020, 14, $noreg, $noreg STRi12 %36:gpr, %35:gpr, 0, 14, $noreg :: (store 4 into stack) STRi12 %32:gpr, %35:gpr, 4, 14, $noreg :: (store 4 into stack + 4) STRi12 %34:gpr, %35:gpr, 8, 14, $noreg :: (store 4 into stack + 8) STRi12 %11:gpr, %35:gpr, 12, 14, $noreg :: (store 4 into stack + 12) %37:gpr = MOVi 2, 14, $noreg, $noreg %38:gpr = LDRLIT_ga_pcrel_ldr target-flags(arm-got) @vlc_module_name :: (load 4 from got) $r0 = COPY %10:gpr $r1 = COPY %37:gpr $r2 = COPY %38:gpr $r3 = COPY %33:gpr BL @vlc_Log, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26 $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r1, implicit killed $r2, implicit killed $r3, implicit-def $sp ADJCALLSTACKUP 16, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %39:gpr = LDRi12 %11:gpr, 8, 14, $noreg :: (load 4 from %ir.p_chk.addr.0.idx.i, align 8) %40:gpr = LDRi12 %11:gpr, 12, 14, $noreg :: (load 4 from %ir.p_chk.addr.0.idx.i + 4) %41:gpr = LDRi12 %11:gpr, 16, 14, $noreg :: (load 4 from %ir.p_chk.addr.0.idx7.i, align 8) %42:gpr = LDRi12 %11:gpr, 20, 14, $noreg :: (load 4 from %ir.p_chk.addr.0.idx7.i + 4) %43:gprnopc = MOVi 0, 14, $noreg, $noreg STRBi12 %43:gprnopc, %stack.1.b_seekable.i, 0, 14, $noreg :: (store 1 into %ir.b_seekable.i) ADJCALLSTACKDOWN 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %44:gpr = ADDri %stack.1.b_seekable.i, 0, 14, $noreg, $noreg $r0 = COPY %10:gpr $r1 = COPY %43:gprnopc $r2 = COPY %44:gpr BL_pred @vlc_stream_Control, 14, $noreg, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26 $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r1, implicit killed $r2, implicit-def $sp, implicit-def $r0 ADJCALLSTACKUP 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %45:gpr = COPY killed $r0 %46:gpr = ADDri %39:gpr, 9, 14, $noreg, def $cpsr %47:gpr = ADCri %40:gpr, 0, 14, $noreg, $noreg, implicit killed $cpsr %48:gpr = BICri %46:gpr, 1, 14, $noreg, $noreg %3:gpr = ADDrr %48:gpr, %41:gpr, 14, $noreg, def $cpsr %4:gpr = ADCrr %47:gpr, %42:gpr, 14, $noreg, $noreg, implicit killed $cpsr CMPri %45:gpr, 0, 14, $noreg, implicit-def $cpsr Bcc %bb.21, 1, killed $cpsr B %bb.19 bb.19.if.end3.i: ; predecessors: %bb.18 successors: %bb.21(0x2aaaaaab), %bb.20(0x55555555); %bb.21(33.33%), %bb.20(66.67%) %49:gprnopc = LDRBi12 %stack.1.b_seekable.i, 0, 14, $noreg :: (dereferenceable load 1 from %ir.b_seekable.i) CMPri %49:gprnopc, 0, 14, $noreg, implicit-def $cpsr Bcc %bb.21, 0, killed $cpsr B %bb.20 bb.20.if.then.i74: ; predecessors: %bb.19 successors: %bb.24(0x80000000); %bb.24(100.00%) ADJCALLSTACKDOWN 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp $r0 = COPY %10:gpr $r2 = COPY %3:gpr $r3 = COPY %4:gpr BL @vlc_stream_Seek, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26 $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r2, implicit killed $r3, implicit-def $sp, implicit-def $r0 ADJCALLSTACKUP 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %50:gpr = COPY killed $r0 %5:gpr = COPY %50:gpr %83:gpr = COPY %5:gpr B %bb.24 bb.21.if.else.i: ; predecessors: %bb.18, %bb.19 successors: %bb.23(0x50000000), %bb.22(0x30000000); %bb.23(62.50%), %bb.22(37.50%) ADJCALLSTACKDOWN 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp $r0 = COPY %10:gpr BL @vlc_stream_Tell, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26 $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit-def $sp, implicit-def $r0, implicit-def dead $r1 ADJCALLSTACKUP 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %52:gpr = COPY killed $r0 %6:gpr = SUBrr %3:gpr, %52:gpr, 14, $noreg, $noreg CMPri %6:gpr, 0, 14, $noreg, implicit-def $cpsr Bcc %bb.23, 10, killed $cpsr bb.22: ; predecessors: %bb.21 successors: %bb.24(0x80000000); %bb.24(100.00%) %51:gpr = MVNi 0, 14, $noreg, $noreg %83:gpr = COPY %51:gpr B %bb.24 bb.23.land.rhs.i: ; predecessors: %bb.21 successors: %bb.24(0x80000000); %bb.24(100.00%) ADJCALLSTACKDOWN 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %54:gpr = MOVi 0, 14, $noreg, $noreg $r0 = COPY %10:gpr $r1 = COPY %54:gpr $r2 = COPY %6:gpr BL @vlc_stream_Read, <regmask $lr $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $q4 $q5 $q6 $q7 $r4 $r5 $r6 $r7 $r8 $r9 $r10 $r11 $s16 $s17 $s18 $s19 $s20 $s21 $s22 $s23 $s24 $s25 $s26 $s27 and 35 more...>, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r1, implicit killed $r2, implicit-def $sp, implicit-def $r0 ADJCALLSTACKUP 0, 0, 14, $noreg, implicit-def dead $sp, implicit $sp %55:gpr = COPY killed $r0 %56:gpr = SUBrr %55:gpr, %6:gpr, 14, $noreg, def $cpsr %7:gpr = COPY %56:gpr %7:gpr = MVNCCi %7:gpr(tied-def 0), 0, 1, killed $cpsr %83:gpr = COPY %7:gpr bb.24.AVI_NextChunk.exit: ; predecessors: %bb.20, %bb.23, %bb.22 successors: %bb.25(0x80000000); %bb.25(100.00%) %8:gpr = COPY %83:gpr %84:gpr = COPY %8:gpr bb.25.cleanup: ; predecessors: %bb.2, %bb.24, %bb.4, %bb.1 successors: %bb.26(0x7ffff800), %bb.10(0x00000800); %bb.26(100.00%), %bb.10(0.00%) %9:gpr = COPY %84:gpr %79:gpr = LDRi12 %13:gpr, 0, 14, $noreg :: (volatile load 4 from @__stack_chk_guard) %80:gpr = LDRi12 %stack.0.StackGuardSlot, 0, 14, $noreg :: (volatile load 4 from %stack.0.StackGuardSlot) dead %81:gpr = SUBrr %79:gpr, %80:gpr, 14, $noreg, def $cpsr Bcc %bb.10, 1, killed $cpsr B %bb.26 bb.26.cleanup: ; predecessors: %bb.25 $r0 = COPY %9:gpr BX_RET 14, $noreg, implicit killed $r0 # End machine code for function AVI_ChunkRead. *** Bad machine code: Using an undefined physical register *** - function: AVI_ChunkRead - basic block: %bb.11 if.then13 (0x804066b68) - instruction: TCRETURNri %22:tcgpr, implicit $sp, implicit $r0, implicit killed $r1 - operand 2: implicit $r0 *** Bad machine code: Using an undefined physical register *** - function: AVI_ChunkRead - basic block: %bb.11 if.then13 (0x804066b68) - instruction: TCRETURNri %22:tcgpr, implicit $sp, implicit $r0, implicit killed $r1 - operand 3: implicit killed $r1 fatal error: error in backend: Found 2 machine code errors. cc: error: clang frontend command failed with exit code 70 (use -v to see invocation) FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on LLVM 8.0.0) Target: armv6-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /usr/bin
Created attachment 203444 [details] command line args (for clang 8)
Only -CURRENT appears to be affected but not due to Clang update. http://www.ipv6proxy.net/go.php?u=http://beefy15.nyi.freebsd.org/data/latest-per-pkg/vlc/3.0.6_9,4/112armv6-quarterly.log (clang 6.0.0) http://www.ipv6proxy.net/go.php?u=http://beefy15.nyi.freebsd.org/data/latest-per-pkg/vlc3/3.0.6,4/120armv6-quarterly.log (clang 6.0.1) http://beefy8.nyi.freebsd.org/data/latest-per-pkg/vlc/3.0.6_1%2C4/head-armv6-default.log (clang 7.0.1) http://beefy8.nyi.freebsd.org/data/latest-per-pkg/vlc3/3.0.4%2C4/head-armv6-default.log (clang 6.0.1)
Removing -fstack-protector-strong helps.
Yeah, I've tried it with clang trunk versions down to r300000 and it always crashes in a similar manner. This is a new bug, I'm reducing it for upstream submission.
Filed upstream bug: https://bugs.llvm.org/show_bug.cgi?id=41417
A commit references this bug: Author: dim Date: Wed May 8 05:45:00 UTC 2019 New revision: 347243 URL: https://svnweb.freebsd.org/changeset/base/347243 Log: Pull in r360099 from upstream llvm trunk (by Eli Friedman): [ARM] Glue register copies to tail calls. This generally follows what other targets do. I don't completely understand why the special case for tail calls existed in the first place; even when the code was committed in r105413, call lowering didn't work in the way described in the comments. Stack protector lowering breaks if the register copies are not glued to a tail call: we have to insert the stack protector check before the tail call, and we choose the location based on the assumption that all physical register dependencies of a tail call are adjacent to the tail call. (See FindSplitPointForStackProtector.) This is sort of fragile, but I don't see any reason to break that assumption. I'm guessing nobody has seen this before just because it's hard to convince the scheduler to actually schedule the code in a way that breaks; even without the glue, the only computation that could actually be scheduled after the register copies is the computation of the call address, and the scheduler usually prefers to schedule that before the copies anyway. Fixes https://bugs.llvm.org/show_bug.cgi?id=41417 Differential Revision: https://reviews.llvm.org/D60427 This should fix several instances of "Bad machine code: Using an undefined physical register", when compiling ports such as multimedia/vlc, audio/alsa-lib and devel/avro-c for armv6, with -fstack-protector-strong. Reported by: jbeich PR: 237074, 237783, 237784 MFC after: 3 days Changes: head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
*** Bug 237783 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: dim Date: Sat May 11 09:57:00 UTC 2019 New revision: 347486 URL: https://svnweb.freebsd.org/changeset/base/347486 Log: MFC r347243: Pull in r360099 from upstream llvm trunk (by Eli Friedman): [ARM] Glue register copies to tail calls. This generally follows what other targets do. I don't completely understand why the special case for tail calls existed in the first place; even when the code was committed in r105413, call lowering didn't work in the way described in the comments. Stack protector lowering breaks if the register copies are not glued to a tail call: we have to insert the stack protector check before the tail call, and we choose the location based on the assumption that all physical register dependencies of a tail call are adjacent to the tail call. (See FindSplitPointForStackProtector.) This is sort of fragile, but I don't see any reason to break that assumption. I'm guessing nobody has seen this before just because it's hard to convince the scheduler to actually schedule the code in a way that breaks; even without the glue, the only computation that could actually be scheduled after the register copies is the computation of the call address, and the scheduler usually prefers to schedule that before the copies anyway. Fixes https://bugs.llvm.org/show_bug.cgi?id=41417 Differential Revision: https://reviews.llvm.org/D60427 This should fix several instances of "Bad machine code: Using an undefined physical register", when compiling ports such as multimedia/vlc, audio/alsa-lib and devel/avro-c for armv6, with -fstack-protector-strong. Reported by: jbeich PR: 237074, 237783, 237784 Changes: _U stable/11/ stable/11/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp _U stable/12/ stable/12/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp