From 2c37c7740e3ea7a68447b4890e062abca9b69c0f Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Wed, 21 Sep 2016 08:24:41 +0000 Subject: [PATCH] Revert "AArch64: Set shift bit of TLSLE HI12 add instruction" This reverts commit r282057 because it broke the buildbots - see e.g. http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/12063 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282058 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp | 6 ------ test/MC/AArch64/tls-add-shift.s | 12 ------------ 2 files changed, 18 deletions(-) delete mode 100644 test/MC/AArch64/tls-add-shift.s diff --git a/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp b/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp index f5564ba4f45..5a001c49fb7 100644 --- a/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp +++ b/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp @@ -263,12 +263,6 @@ AArch64MCCodeEmitter::getAddSubImmOpValue(const MCInst &MI, unsigned OpIdx, ++MCNumFixups; - // Set the shift bit of the add instruction for relocation types - // R_AARCH64_TLSLE_ADD_TPREL_HI12 and R_AARCH64_TLSLD_ADD_DTPREL_HI12. - AArch64MCExpr::VariantKind RefKind = cast(Expr)->getKind(); - if (RefKind == AArch64MCExpr::VK_TPREL_HI12 || - RefKind == AArch64MCExpr::VK_DTPREL_HI12) - ShiftVal = 12; return ShiftVal == 0 ? 0 : (1 << ShiftVal); } diff --git a/test/MC/AArch64/tls-add-shift.s b/test/MC/AArch64/tls-add-shift.s deleted file mode 100644 index 6e9cafe1b38..00000000000 --- a/test/MC/AArch64/tls-add-shift.s +++ /dev/null @@ -1,12 +0,0 @@ -// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj < %s -o - | \ -// RUN: llvm-objdump -r -d - | FileCheck %s - - // TLS add TPREL - add x2, x1, #:tprel_hi12:var -// CHECK: add x2, x1, #0, lsl #12 -// CHECK-NEXT: R_AARCH64_TLSLE_ADD_TPREL_HI12 var - - // TLS add DTPREL - add x4, x3, #:dtprel_hi12:var -// CHECK: add x4, x3, #0, lsl #12 -// CHECK-NEXT: R_AARCH64_TLSLD_ADD_DTPREL_HI12 var