(original) (raw)



From: "Ziv via llvm-dev Izhar"
To: llvm-dev@lists.llvm.org
Cc: "Michael Zuckerman"
Sent: Monday, October 31, 2016 3:53:40 AM
Subject: \[llvm-dev\] COMPILER-RT build break

Hello,

There is a problem in the compiler-rt project regarding a new change I need to make.

The change is that in extended gcc syntax, when the same register is in the input/output list and in the clobber list, there is a conflict and llvm should produce an error.

Until now, it didn’t produce an error.

In compiler-rt’s tests, there’s a test which shouldn’t generate an error but after the patch it does. Therefore, we need to correct the test (which is not correct according to extended gcc).

The review regarding the new error message is : https://reviews.llvm.org/D15075

What is the process in compiler-rt in order to accept and commit that change?

We use the same review process for compiler-rt as we use for LLVM itself. I recommend that you upload the patch to reviews.llvm.org, and make sure that you add llvm-commits as a subscriber (along with any other compiler-rt developers that seem relevant).

Thanks again,
Hal

The change which needed to be made is:

Index: lib/asan/tests/asan\_asm\_test.cc

===================================================================

--- lib/asan/tests/asan\_asm\_test.cc (revision 285517)

+++ lib/asan/tests/asan\_asm\_test.cc (working copy)

@@ -62,7 +62,7 @@

\_\_asm\_\_("rep " Movs " \\n\\t" \\

: \\

: "D"(dst), "S"(src), "c"(size) \\

- : "rsi", "rdi", "rcx", "memory"); \\

+ : "memory"); \\

}

DECLARE\_ASM\_WRITE(U8, "8", "movq", "r");

@@ -104,7 +104,7 @@

\_\_asm\_\_("rep " Movs " \\n\\t" \\

: \\

: "D"(dst), "S"(src), "c"(size) \\

- : "esi", "edi", "ecx", "memory"); \\

+ : "memory"); \\

}

} // End of anonymous namespace

The error before this change:

Current problem with the build after patch:

\[100%\] Generating ASAN\_NOINST\_TEST\_OBJECTS.asan\_noinst\_test.cc.x86\_64-with-calls.o

/home/mzuckerm/llvm23/llvm/projects/compiler-rt/lib/asan/tests/asan\_asm\_test.cc:70:1: error: asm-specifier for input or output

variable conflicts with asm clobber list

DECLARE\_ASM\_REP\_MOVS(U8, "movsq");

^

/home/mzuckerm/llvm23/llvm/projects/compiler-rt/lib/asan/tests/asan\_asm\_test.cc:65:15: note: expanded from macro

'DECLARE\_ASM\_REP\_MOVS'

: "rsi", "rdi", "rcx", "memory"); \\

^

/home/mzuckerm/llvm23/llvm/projects/compiler-rt/lib/asan/tests/asan\_asm\_test.cc:129:1: error: asm-specifier for input or output

variable conflicts with asm clobber list

DECLARE\_ASM\_REP\_MOVS(U1, "movsb");

^

/home/mzuckerm/llvm23/llvm/projects/compiler-rt/lib/asan/tests/asan\_asm\_test.cc:65:15: note: expanded from macro

'DECLARE\_ASM\_REP\_MOVS'

: "rsi", "rdi", "rcx", "memory"); \\

^

/home/mzuckerm/llvm23/llvm/projects/compiler-rt/lib/asan/tests/asan\_asm\_test.cc:130:1: error: asm-specifier for input or output

variable conflicts with asm clobber list

DECLARE\_ASM\_REP\_MOVS(U2, "movsw");

^

/home/mzuckerm/llvm23/llvm/projects/compiler-rt/lib/asan/tests/asan\_asm\_test.cc:65:15: note: expanded from macro

'DECLARE\_ASM\_REP\_MOVS'

: "rsi", "rdi", "rcx", "memory"); \\

^

/home/mzuckerm/llvm23/llvm/projects/compiler-rt/lib/asan/tests/asan\_asm\_test.cc:131:1: error: asm-specifier for input or output

variable conflicts with asm clobber list

DECLARE\_ASM\_REP\_MOVS(U4, "movsl");

^

/home/mzuckerm/llvm23/llvm/projects/compiler-rt/lib/asan/tests/asan\_asm\_test.cc:65:15: note: expanded from macro

'DECLARE\_ASM\_REP\_MOVS'

: "rsi", "rdi", "rcx", "memory"); \\

^

4 errors generated.

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
LLVM Developers mailing list
llvm-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory