jrtc27 wrote:
The canonical PLT is for
```int main(void) {
return compare(&ifp);
}```
in code models where the address is computed inline (absolute or PC-relative)
rather than as an indirect load (whether from a global or a GOT entry).
I like to think of canonical PLTs as the function version
@@ -18,6 +18,6 @@
.globl _start
_start:
.data
- .word foo@PLT - .
- .word foo@PLT - . + 1
- .word foo@PLT - . - 1
+ .word %plt(foo - .)
jrtc27 wrote:
I've not looked at the implementation in detail, but thank you for taking the
time to do so, I know from
@@ -18,6 +18,6 @@
.globl _start
_start:
.data
- .word foo@PLT - .
- .word foo@PLT - . + 1
- .word foo@PLT - . - 1
+ .word %plt(foo - .)
jrtc27 wrote:
Well my overarching point would be that user-facing syntax should not be
beholden to arbitrary historic i
@@ -18,6 +18,6 @@
.globl _start
_start:
.data
- .word foo@PLT - .
- .word foo@PLT - . + 1
- .word foo@PLT - . - 1
+ .word %plt(foo - .)
jrtc27 wrote:
We have %(got_)pcrel_hi and now %gotpcrel, what's so different about this one?
https://github.com/llvm/ll
@@ -18,6 +18,6 @@
.globl _start
_start:
.data
- .word foo@PLT - .
- .word foo@PLT - . + 1
- .word foo@PLT - . - 1
+ .word %plt(foo - .)
jrtc27 wrote:
Yeah, I know, but it's pretty weird and confusing syntax. It's not really
written that way because it mak
@@ -18,6 +18,6 @@
.globl _start
_start:
.data
- .word foo@PLT - .
- .word foo@PLT - . + 1
- .word foo@PLT - . - 1
+ .word %plt(foo - .)
jrtc27 wrote:
Would `%plt(foo) - .` not be the saner syntax? PLT of an offset is a bit
nonsensical...
https://github.c
jrtc27 wrote:
As the author of the patch that seems sensible to me, and I’ve not been aware
of any regressions from it in main.
https://github.com/llvm/llvm-project/pull/113052
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
ht
https://github.com/jrtc27 created
https://github.com/llvm/llvm-project/pull/113733
Whilst in upstream LLVM iPTRAny is only ever an integer, essentially an
alias for iPTR, this is not true in CHERI LLVM, where it gets used to
mean "iPTR or cPTR", i.e. either an integer address or a capability
(wi
https://github.com/jrtc27 updated
https://github.com/llvm/llvm-project/pull/113733
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/jrtc27 updated
https://github.com/llvm/llvm-project/pull/113733
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/jrtc27 updated
https://github.com/llvm/llvm-project/pull/113732
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/jrtc27 updated
https://github.com/llvm/llvm-project/pull/113732
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/jrtc27 created
https://github.com/llvm/llvm-project/pull/113732
We've already called EnforceInteger on Types[0], and iPTRAny isn't
regarded as an integer type (note that TableGen special-cases iPTR here
to include that, though), so we cannot possibly still have an iPTRAny by
t
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -342,14 +346,63 @@ class DataLayout {
SmallVector getNonIntegralAddressSpaces() const {
SmallVector AddrSpaces;
for (const PointerSpec &PS : PointerSpecs) {
- if (PS.IsNonIntegral)
+ if (PS.HasNonIntegralRepresentation || PS.HasUnstableRepresentation)
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -3082,16 +3129,21 @@ as follows:
``A``
Specifies the address space of objects created by '``alloca``'.
Defaults to the default address space of 0.
-``p[n]::[:][:]``
+``p[][]::[:][:]``
This specifies the *size* of a pointer and its and
\erred alignm
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -342,14 +346,63 @@ class DataLayout {
SmallVector getNonIntegralAddressSpaces() const {
jrtc27 wrote:
This name seems stale given it's including unstable pointers
https://github.com/llvm/llvm-project/pull/105735
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -419,9 +420,24 @@ Error DataLayout::parsePointerSpec(StringRef Spec) {
// Address space. Optional, defaults to 0.
unsigned AddrSpace = 0;
- if (!Components[0].empty())
-if (Error Err = parseAddrSpace(Components[0], AddrSpace))
+ bool UnstableRepr = false;
+ bool
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -649,48 +649,95 @@ literal types are uniqued in recent versions of LLVM.
.. _nointptrtype:
-Non-Integral Pointer Type
--
+Non-Integral and Unstable Pointer Types
+---
-Note: non-integral pointer types are a work
@@ -361,6 +414,16 @@ class DataLayout {
return PTy && isNonIntegralPointerType(PTy);
}
+ bool shouldAvoidPtrToInt(Type *Ty) const {
+auto *PTy = dyn_cast(Ty);
+return PTy && shouldAvoidPtrToInt(PTy->getPointerAddressSpace());
jrtc27 wrote:
It s
https://github.com/jrtc27 approved this pull request.
This should be low risk. If the condition holds, it would previously
dereference an invalid iterator, and either crash immediately thanks to
assertions or use whatever junk's in memory. Now it will treat it the same as
if there's an immedia
31 matches
Mail list logo