On the review for http://reviews.llvm.org/D6808, majnemer <http://reviews.llvm.org/p/majnemer/> commented that: "Address space 1 has a special meaning in LLVM, it's identical to address space 0 except for the fact that "null" may be dereferenced. You might want to consider a different address space." This is the first I've heard of this and I can't find any documentation about it being reserved, either in general, or specifically for x86. Can anyone clarify? The only address spaces with special meanings I know of are: - 0 (the normal address space, null is not dereferencable) - 256 - TLS, GS relative addressing - 257 - FS relative addressing Philip -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150107/e662ff7f/attachment.html>
I'm not aware of any such restriction, and I know of several LLVM based systems that use address space 1 for something other than that. -Owen> On Jan 7, 2015, at 1:18 PM, Philip Reames <listmail at philipreames.com> wrote: > > On the review for http://reviews.llvm.org/D6808, majnemer commented that: > "Address space 1 has a special meaning in LLVM, it's identical to address space 0 except for the fact that "null" may be dereferenced. You might want to consider a different address space." > > This is the first I've heard of this and I can't find any documentation about it being reserved, either in general, or specifically for x86. Can anyone clarify? > > The only address spaces with special meanings I know of are: > - 0 (the normal address space, null is not dereferencable) > - 256 - TLS, GS relative addressing > - 257 - FS relative addressing > > Philip > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150107/447f1b00/attachment.html>
> On Jan 7, 2015, at 11:18 AM, Philip Reames <listmail at philipreames.com> wrote: > > On the review for http://reviews.llvm.org/D6808 <http://reviews.llvm.org/D6808>, majnemer <http://reviews.llvm.org/p/majnemer/> commented that: > "Address space 1 has a special meaning in LLVM, it's identical to address space 0 except for the fact that "null" may be dereferenced. You might want to consider a different address space." > > This is the first I've heard of this and I can't find any documentation about it being reserved, either in general, or specifically for x86. Can anyone clarify?First i’ve heard of it...> > The only address spaces with special meanings I know of are: > - 0 (the normal address space, null is not dereferencable) > - 256 - TLS, GS relative addressing > - 257 - FS relative addressingI didn’t even know 256/257 had special meanings. I thought they were only used by x86. It would be good to clarify them too just incase other targets ever wanted to use them. Thanks, Pete> > Philip > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150107/1c0c007e/attachment.html>
On 01/07/2015 11:28 AM, Pete Cooper wrote:> >> On Jan 7, 2015, at 11:18 AM, Philip Reames <listmail at philipreames.com >> <mailto:listmail at philipreames.com>> wrote: >> >> On the review for http://reviews.llvm.org/D6808, majnemer >> <http://reviews.llvm.org/p/majnemer/> commented that: >> "Address space 1 has a special meaning in LLVM, it's identical to >> address space 0 except for the fact that "null" may be dereferenced. >> You might want to consider a different address space." >> >> This is the first I've heard of this and I can't find any >> documentation about it being reserved, either in general, or >> specifically for x86. Can anyone clarify? > First i’ve heard of it... >> >> The only address spaces with special meanings I know of are: >> - 0 (the normal address space, null is not dereferencable) >> - 256 - TLS, GS relative addressing >> - 257 - FS relative addressing > I didn’t even know 256/257 had special meanings. I thought they were > only used by x86. It would be good to clarify them too just incase > other targets ever wanted to use them.Sorry, let me clarify. To my knowledge, 256/257 are only reserved on x86.> > Thanks, > Pete >> >> Philip >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150107/dac92e71/attachment.html>
I was repeating something that Nick told me a while ago, he mentioned it again on the list: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150105/251080.html Nick asked for it to get documented but it looks like there is disagreement as to whether or not it really does (or perhaps should) exist. On Wed, Jan 7, 2015 at 11:25 AM, Owen Anderson <resistor at mac.com> wrote:> I'm not aware of any such restriction, and I know of several LLVM based > systems that use address space 1 for something other than that. > > -Owen > > On Jan 7, 2015, at 1:18 PM, Philip Reames <listmail at philipreames.com> > wrote: > > On the review for http://reviews.llvm.org/D6808, majnemer > <http://reviews.llvm.org/p/majnemer/> commented that: > "Address space 1 has a special meaning in LLVM, it's identical to address > space 0 except for the fact that "null" may be dereferenced. You might want > to consider a different address space." > > This is the first I've heard of this and I can't find any documentation > about it being reserved, either in general, or specifically for x86. Can > anyone clarify? > > The only address spaces with special meanings I know of are: > - 0 (the normal address space, null is not dereferencable) > - 256 - TLS, GS relative addressing > - 257 - FS relative addressing > > Philip > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150107/92008f83/attachment.html>
> On Jan 7, 2015, at 2:25 PM, Owen Anderson <resistor at mac.com> wrote: > > I'm not aware of any such restriction, and I know of several LLVM based systems that use address space 1 for something other than that. > > -OwenYes, this would be a problem for us. We use 1 for a normal address space where 0 is invalid. However, we also have a problem where some other address spaces do want 0 to be a valid address, which just sort of don’t work correctly now. -Matt> > On Jan 7, 2015, at 1:18 PM, Philip Reames <listmail at philipreames.com <mailto:listmail at philipreames.com>> wrote: > >> On the review for http://reviews.llvm.org/D6808 <http://reviews.llvm.org/D6808>, majnemer <http://reviews.llvm.org/p/majnemer/> commented that: >> "Address space 1 has a special meaning in LLVM, it's identical to address space 0 except for the fact that "null" may be dereferenced. You might want to consider a different address space." >> >> This is the first I've heard of this and I can't find any documentation about it being reserved, either in general, or specifically for x86. Can anyone clarify? >> >> The only address spaces with special meanings I know of are: >> - 0 (the normal address space, null is not dereferencable) >> - 256 - TLS, GS relative addressing >> - 257 - FS relative addressing >> >> Philip >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev <http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150107/e2729eaa/attachment.html>
On 7 January 2015 at 11:25, Owen Anderson <resistor at mac.com> wrote:> I'm not aware of any such restriction, and I know of several LLVM based > systems that use address space 1 for something other than that. >Oof. It was discussed when the patches to add addrspace were being considered, and this is why we should've written it down. It would be nice to have an addrspace that does mean "same as addrspace(0) except that null may be dereferenceable", and to attach that to -fno-delete-null-pointer-checks. Any ideas for what that addrspace should be?> > -Owen > > On Jan 7, 2015, at 1:18 PM, Philip Reames <listmail at philipreames.com> > wrote: > > On the review for http://reviews.llvm.org/D6808, majnemer > <http://reviews.llvm.org/p/majnemer/> commented that: > "Address space 1 has a special meaning in LLVM, it's identical to address > space 0 except for the fact that "null" may be dereferenced. You might want > to consider a different address space." > > This is the first I've heard of this and I can't find any documentation > about it being reserved, either in general, or specifically for x86. Can > anyone clarify? > > The only address spaces with special meanings I know of are: > - 0 (the normal address space, null is not dereferencable) > - 256 - TLS, GS relative addressing > - 257 - FS relative addressing > > Philip > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150107/50216734/attachment.html>