Displaying 2 results from an estimated 2 matches for "srcas".
Did you mean:
  srca
  
2015 Dec 14
3
Getting TargetLowering in AsmPrinter / Lowering constant addrspacecast
Hi,
I'd like to add support for addrspacecast in initializers of global 
variables, at least for the trivial case.  The trivial case is if 
TargetLowering::isNoopAddrSpaceCast(SrcAS, DestAS) returns true.  In 
this case the MCExpr for the addrspacecast is the MCExpr of its first 
operand.
It seems hard to obtain an instance of TargetLowering in 
AsmPrinter::lowerConstant().  Other methods in this class obtain it by 
calling `MF->getSubtarget().getTargetLowering()`.  Howeve...
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...true;
+      }
+    }
+  } else if (Subtarget->isTargetDarwin()) {
+    // %gs:(192*sizeof(void*))
+    AddressSpace = 256;
+    Offset = 192 * (Subtarget->getDataLayout()->getPointerSize());
+    return true;
+  }
+  return false;
+}
+
 bool X86TargetLowering::isNoopAddrSpaceCast(unsigned SrcAS,
                                             unsigned DestAS) const {
   assert(SrcAS != DestAS && "Expected different address spaces!");
diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h
index e81a9d1..823479a 100644
--- a/lib/Target/X86/X86ISelLow...