[llvm-bugs] [Bug 37542] New: [X86] mstackrealign takes up extra register

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 21 09:06:53 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37542

            Bug ID: 37542
           Summary: [X86] mstackrealign takes up extra register
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: pirama at google.com
                CC: llvm-bugs at lists.llvm.org

Filing issue https://github.com/android-ndk/ndk/issues/693 reported against the
Android NDK.

-mstackrealign causes the register allocator to run out of registers for inline
assembly.  Is this expected?  Here's a smaller reproducer produced with
CReduce:

$ cat > test.c
#define a(b, c, d, f, e, h, g, j, i, byte, end, l, k, n, m) ""
# 1 "" 3
p, o, q, r, s, t;
u() {
  __asm__(a(, , , , , , , , , , , , , , ) a(, , , , , , , , , , , , , , )
          : "=&q"(r), "+m"(o), "+&r"(t), "=&r"(q), "+&r"(t), "=&r"(s)
          : "m"(p));
}

$ clang "-cc1" "-triple" "i686-none-linux-android" "-emit-obj" "-mstackrealign"
"-x" "c" test.c
:3:11: error: inline assembly requires more registers than available
  __asm__(a(, , , , , , , , , , , , , , ) a(, , , , , , , , , , , , , , )
          ^
h264_cabac-21c918.c:1:61: note: expanded from macro 'a'
#define a(b, c, d, f, e, h, g, j, i, byte, end, l, k, n, m) ""
                                                            ^
1 error generated.

$ clang "-cc1" "-triple" "i686-none-linux-android" "-emit-obj" "-x" "c" test.c
<no error>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180521/cba7a796/attachment.html>


More information about the llvm-bugs mailing list