[Openmp-commits] [PATCH] D61770: [OpenMP][AArch64] Fix compile with LLVM trunk.

Eli Friedman via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu May 9 17:08:21 PDT 2019


efriedma created this revision.
efriedma added reviewers: jlpeyton, AndreyChurbanov.
Herald added subscribers: jdoerfert, guansong, kristof.beyls, javed.absar.
Herald added a project: OpenMP.

The code is currently using the ambiguous instruction "sub sp, sp, w9, lsl #4". The ARM instruction manual says this isn't valid, and it's not clear whether it's supposed to mean uxtw or uxtx.  LLVM used to accept this and treat it as uxtx, but now it rejects the construct.

It doesn't matter which form of extension we use here, since the high bits of the operand are zero anyway, so I arbitrarily choose uxtw, to preserve the register name.

See https://reviews.llvm.org/D60840 for the LLVM patch.

This is my first patch to the OpenMP runtime; not sure if I'm selecting appropriate reviewers.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D61770

Files:
  runtime/src/z_Linux_asm.S


Index: runtime/src/z_Linux_asm.S
===================================================================
--- runtime/src/z_Linux_asm.S
+++ runtime/src/z_Linux_asm.S
@@ -1243,7 +1243,7 @@
 
 	orr	w9, wzr, #1
 	add	w9, w9, w3, lsr #1
-	sub	sp, sp, w9, lsl #4
+	sub	sp, sp, w9, uxtw #4
 	mov	x11, sp
 
 	mov	x8, x0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61770.198952.patch
Type: text/x-patch
Size: 308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190510/f65dcf4e/attachment-0001.bin>


More information about the Openmp-commits mailing list