[PATCH] D60596: Fix checks for AArch64MCExpr::VK_SABS flag

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 14:56:21 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL358788: [AArch64] Fix checks for AArch64MCExpr::VK_SABS flag. (authored by efriedma, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D60596?vs=194798&id=195923#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60596/new/

https://reviews.llvm.org/D60596

Files:
  llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp


Index: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
===================================================================
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
@@ -273,7 +273,7 @@
     if (RefKind & AArch64MCExpr::VK_NC) {
       Value &= 0xFFFF;
     }
-    else if (RefKind & AArch64MCExpr::VK_SABS) {
+    else if (AArch64MCExpr::getSymbolLoc(RefKind) == AArch64MCExpr::VK_SABS) {
       if (SignedValue > 0xFFFF || SignedValue < -0xFFFF)
         Ctx.reportError(Fixup.getLoc(), "fixup value out of range");
 
@@ -397,7 +397,7 @@
   // handle this more cleanly. This may affect the output of -show-mc-encoding.
   AArch64MCExpr::VariantKind RefKind =
     static_cast<AArch64MCExpr::VariantKind>(Target.getRefKind());
-  if (RefKind & AArch64MCExpr::VK_SABS) {
+  if (AArch64MCExpr::getSymbolLoc(RefKind) == AArch64MCExpr::VK_SABS) {
     // If the immediate is negative, generate MOVN else MOVZ.
     // (Bit 30 = 0) ==> MOVN, (Bit 30 = 1) ==> MOVZ.
     if (SignedValue < 0)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60596.195923.patch
Type: text/x-patch
Size: 1099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190419/72b02ac2/attachment.bin>


More information about the llvm-commits mailing list