Skip to content

Commit

Permalink
[OpenMP][AArch64] Fix compile with LLVM trunk.
Browse files Browse the repository at this point in the history
The code is currently using the ambiguous instruction
"sub sp, sp, w9, lsl #4". The ARM reference manual says this isn't
valid, and it's not clear whether it's supposed to mean uxtw or uxtx.

It doesn't matter which instruction 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.

Differential Revision: https://reviews.llvm.org/D61770

llvm-svn: 360711
  • Loading branch information
efriedma-quic committed May 14, 2019
1 parent c9dd299 commit 025df3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmp/runtime/src/z_Linux_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ __tid = 8

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
Expand Down

0 comments on commit 025df3b

Please sign in to comment.