Skip to content

Commit

Permalink
s390/nospec: prefer local labels in .set directives
Browse files Browse the repository at this point in the history
Use local labels in .set directives to avoid potential compile errors
with LTO + clang. See commit 334865b ("x86/extable: Prefer local
labels in .set directives") for further details.

Since s390 doesn't support LTO currently this doesn't fix a real bug
for now, but helps to avoid problems as soon as required pieces have
been added to llvm.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
  • Loading branch information
Heiko Carstens committed May 6, 2022
1 parent 108ab40 commit f9a3099
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/s390/include/asm/nospec-insn.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,31 @@
.endm

.macro __DECODE_R expand,reg
.set __decode_fail,1
.set .L__decode_fail,1
.irp r1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
.ifc \reg,%r\r1
\expand \r1
.set __decode_fail,0
.set .L__decode_fail,0
.endif
.endr
.if __decode_fail == 1
.if .L__decode_fail == 1
.error "__DECODE_R failed"
.endif
.endm

.macro __DECODE_RR expand,rsave,rtarget
.set __decode_fail,1
.set .L__decode_fail,1
.irp r1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
.ifc \rsave,%r\r1
.irp r2,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
.ifc \rtarget,%r\r2
\expand \r1,\r2
.set __decode_fail,0
.set .L__decode_fail,0
.endif
.endr
.endif
.endr
.if __decode_fail == 1
.if .L__decode_fail == 1
.error "__DECODE_RR failed"
.endif
.endm
Expand Down

0 comments on commit f9a3099

Please sign in to comment.