[Nasm-bugs] [Bug 3392689] New: ffmpeg and dav1d projects seem to have issues with new macro parsing.

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Tue Jun 30 12:57:02 PDT 2020


https://bugzilla.nasm.us/show_bug.cgi?id=3392689

            Bug ID: 3392689
           Summary: ffmpeg and dav1d projects seem to have issues with new
                    macro parsing.
           Product: NASM
           Version: 2.15 (development)
          Hardware: All
                OS: All
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: dalecurtis at chromium.org
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Build from source archive using configure

I'm unsure if these are actually issues in nasm or the project.
/nasm -DPIC -felf64 -DARCH_X86_64 -W+error=all
-P../../third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm
-I../../third_party/ffmpeg/chromium/c onfig/ChromeOS/linux/x64/
-I../../third_party/ffmpeg/libavcodec/x86/
-I../../third_party/ffmpeg/libavutil/x86/ -I../../third_party/ffmpeg/ -I./
-I../../ -Igen/ -DPIC -MD obj/third_party/ffmpeg/ffmpeg_nasm/blo ckdsp.o.d -o
obj/third_party/ffmpeg/ffmpeg_nasm/blockdsp.o
../../third_party/ffmpeg/libavcodec/x86/blockdsp.asm                           
                                                                     
../../third_party/ffmpeg/libavcodec/x86/blockdsp.asm:51: error: dropping
trailing empty parameter in call to multi-line macro `DEFINE_ARGS_INTERNAL'
[-w+error=macro-params-legacy]                             
 ../../third_party/ffmpeg/libavutil/x86/x86inc.asm:561: ... from macro
`PROLOGUE' defined here

The line it's complaining about is this:
    DEFINE_ARGS_INTERNAL %0, %4, %5

The PROLOGUE macro is defined here:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/ffmpeg/libavutil/x86/x86inc.asm;l=550

%macro PROLOGUE 2-5+ 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
    %assign num_args %1
    %assign regs_used %2
    %assign xmm_regs_used %3
    ASSERT regs_used >= num_args
    SETUP_STACK_POINTER %4
    ASSERT regs_used <= 15
    PUSH_IF_USED 9, 10, 11, 12, 13, 14
    ALLOC_STACK %4
    LOAD_IF_USED 6, 7, 8, 9, 10, 11, 12, 13, 14
    DEFINE_ARGS_INTERNAL %0, %4, %5
%endmacro

It's called with these arguments "1, 1, 0, blocks" which seems like it should
trigger the default argument of 0 to be filled in for %5

I've filed an issue against dav1d with more specifics on there issues:
https://code.videolan.org/videolan/dav1d/-/issues/343

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list