[cfe-dev] PATCH: clang/LLVM - Sparc - inline ASM with floating pointer registers

Patrick Boettcher via cfe-dev cfe-dev at lists.llvm.org
Mon Mar 21 07:11:53 PDT 2016

Hi lists,

Sorry for cross-posting, but these two patches are of concern to clang
and llvm.

I'm compiling C-code which includes inline assembler which looks like
the following using the sparc-target:

static inline float fabsf(float a)
  float res;
  __asm __volatile__("fabss  %1, %0;"
                     : "=f"(res)
                     : "f"(a));
  return res;

This fails with llvm/clang - trunk/master.

I patched clang and llvm and, as I'm new to both project, I'm having
doubts that it is enough - however it works.

What would be necessary to have it included in both projects?
Is my code correct for what I want to do?
What would have been a more appropriate process to submit?

best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SPARC-Allow-usage-of-floating-point-registers-in-inl.patch
Type: text/x-patch
Size: 2196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160321/22e4030b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SPARC-allow-usage-of-floating-point-registers-in-inl.patch
Type: text/x-patch
Size: 1013 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160321/22e4030b/attachment-0001.bin>

More information about the cfe-dev mailing list