mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
15ff0835ac
Fix for PR24072: X86 instructions jrcxz/jecxz/jcxz performs short jumps if rcx/ecx/cx register is 0 The maximum relative offset for a forward short jump is 127 Bytes (0x7F). The maximum relative offset for a backward short jump is 128 Bytes (0x80). Gnu assembler warns when the distance of the jump exceeds the maximum but llvm-as does not. Patch by Konstantin Belochapka and Alexey Lapshin Differential Revision: https://reviews.llvm.org/D70652
27 lines
891 B
ArmAsm
27 lines
891 B
ArmAsm
# RUN: not llvm-mc -filetype=obj -triple=x86_64-linux-gnu %s 2>&1 | FileCheck %s
|
|
|
|
.balign 128
|
|
label00:
|
|
// CHECK: value of 253 is too large for field of 1 byte.
|
|
jecxz label01
|
|
// CHECK: value of 251 is too large for field of 1 byte.
|
|
jrcxz label01
|
|
// CHECK: value of 249 is too large for field of 1 byte.
|
|
loop label01
|
|
// CHECK: value of 247 is too large for field of 1 byte.
|
|
loope label01
|
|
// CHECK: value of 245 is too large for field of 1 byte.
|
|
loopne label01
|
|
.balign 256
|
|
label01:
|
|
// CHECK: value of -259 is too large for field of 1 byte.
|
|
jecxz label00
|
|
// CHECK: value of -261 is too large for field of 1 byte.
|
|
jrcxz label00
|
|
// CHECK: value of -263 is too large for field of 1 byte.
|
|
loop label00
|
|
// CHECK: value of -265 is too large for field of 1 byte.
|
|
loope label00
|
|
// CHECK: value of -267 is too large for field of 1 byte.
|
|
loopne label00
|