From 9bef807b3bfa2397fb24f4f9c4df5a633a9717b3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 5 Mar 2014 17:48:22 -0800 Subject: Clean up the handling of inline asm. Make inline asm a report_fatal_error instead of an assertion failure so that it's a little friendlier, and add a test to make sure llc -march=js rejects inline asm. Also disable the PNaCl inline asm("":::"memory") lowering pass. If people are using this, it's best that we diagnose it as it likely isn't portable. There are usually better alternatives. --- test/CodeGen/JS/asm.ll | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/CodeGen/JS/asm.ll (limited to 'test/CodeGen') diff --git a/test/CodeGen/JS/asm.ll b/test/CodeGen/JS/asm.ll new file mode 100644 index 0000000000..41a30431da --- /dev/null +++ b/test/CodeGen/JS/asm.ll @@ -0,0 +1,13 @@ +; RUN: not llc -march=js < %s + +; Inline asm isn't supported (yet?). llc should report an error when it +; encounters inline asm. +; +; We could support the special case of an empty inline asm string without much +; work, but code that uses such things most likely isn't portable anyway, and +; there are usually much better alternatives. + +define void @foo() { + call void asm "", ""() + ret void +} -- cgit v1.2.3-18-g5258