mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-31 20:44:18 +00:00
AMDGPU: Fix incorrect simm check
Use signed division otherwise all back jumps fail the check Fixes regression introduced in r269951 Differential Revision: http://reviews.llvm.org/D20380 llvm-svn: 269972
This commit is contained in:
parent
ef2e3a7f0b
commit
ae265c03f7
@ -96,7 +96,7 @@ void AMDGPUAsmBackend::applyFixup(const MCFixup &Fixup, char *Data,
|
||||
|
||||
switch ((unsigned)Fixup.getKind()) {
|
||||
case AMDGPU::fixup_si_sopp_br: {
|
||||
int64_t BrImm = (Value - 4) / 4;
|
||||
int64_t BrImm = ((int64_t)Value - 4) / 4;
|
||||
if (!isInt<16>(BrImm))
|
||||
report_fatal_error("branch size exceeds simm16");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user