Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

[X86] Extend boolean arguments to inline-asm according to getBooleanType

Authored by kparzysz on Apr 3 2019, 9:09 AM.

Diff Detail


Event Timeline

kparzysz created this revision.Apr 3 2019, 9:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2019, 9:09 AM
Herald added a subscriber: eraman. · View Herald Transcript

Note that with:

  1. ("[X86] Extend boolean arguments to

inline-asm according to getBooleanType")

  1. ("[INLINER] allow inlining of

blockaddresses if sole uses are callbrs")

  1. ("[RFC prototype] Implementation of

asm-goto support in clang")

I can compile a mainline x86 defconfig Linux kernel and boot it in QEMU.

E5ten added a subscriber: E5ten.Apr 3 2019, 9:57 AM
This revision is now accepted and ready to land.Apr 3 2019, 10:09 AM
This revision was automatically updated to reflect the committed changes.

This looks like the same bug is present in the generic code in llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp as well.


$ echo 'void f() { asm("# TEST: %0" : : "i"((_Bool)255)); }' | arm-none-eabi-gcc -S -o - -xc - | grep TEST
        # TEST: #1
$ echo 'void f() { asm("# TEST: %0" : : "i"((_Bool)255)); }' | build/bin/clang -target arm-none-eabi -S -o - -xc - | grep TEST
        @ TEST: #-1
kees added a subscriber: kees.Apr 3 2019, 11:08 AM

What other target have their own lowering code? (Or, restated, is x86 the only target not using the generic lowering code?)