Displaying 5 results from an estimated 5 matches for "_toglobal".
Did you mean:
toglobal
2013 Aug 08
0
[LLVMdev] Address space extension
...nd readonly ssp {
%1 = bitcast i32 addrspace(256)* %foo to i32*
%2 = load i32* %1, align 4, !tbaa !0
ret i32 %2
}
Note that in loadgs2, the call to toglobal has been inlined and so the back end will just see a bitcast, which SelectionDAG treats as a no-op. The assembly we get from this is:
_toglobal: ## @toglobal
## BB#0:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
popq %rbp
ret
load: ## @load
## BB#0:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
popq %rbp
ret
.globl _loadgs
.align 4, 0x90
loadgs:...
2013 Aug 08
4
[LLVMdev] Address space extension
On Aug 7, 2013, at 7:23 PM, Michele Scandale <michele.scandale at gmail.com> wrote:
> On 08/08/2013 03:52 AM, Pete Cooper wrote:
>>> Why a backend should be responsible (meaning have knowledge) for a
>>> mapping between high level address spaces and low level address spaces?
>> Thats true. I’m thinking entirely from the persecutive of the backend
>> doing
2013 Aug 08
2
[LLVMdev] Address space extension
...2 addrspace(256)* %foo to i32*
> %2 = load i32* %1, align 4, !tbaa !0
> ret i32 %2
> }
>
> Note that in loadgs2, the call to toglobal has been inlined and so the back end will just see a bitcast, which SelectionDAG treats as a no-op. The assembly we get from this is:
>
> _toglobal: ## @toglobal
> ## BB#0:
> pushq %rbp
> movq %rsp, %rbp
> movq %rdi, %rax
> popq %rbp
> ret
> load: ## @load
> ## BB#0:
> pushq %rbp
> movq %rsp, %rbp
> movl (%rdi), %eax
> popq %rbp
> ret...
2013 Aug 08
0
[LLVMdev] Address space extension
...= load i32* %1, align 4, !tbaa !0
>> ret i32 %2
>> }
>>
>> Note that in loadgs2, the call to toglobal has been inlined and so the
>> back end will just see a bitcast, which SelectionDAG treats as a no-op.
>> The assembly we get from this is:
>>
>> _toglobal: ## @toglobal
>> ## BB#0:
>> pushq %rbp
>> movq %rsp, %rbp
>> movq %rdi, %rax
>> popq %rbp
>> ret
>> load: ## @load
>> ## BB#0:
>>...
2013 Aug 09
1
[LLVMdev] Address space extension
On Aug 8, 2013, at 3:04 AM, David Chisnall wrote:
> The correct code for this should be (I believe):
>
> _toglobal: ## @toglobal
> ## BB#0:
> pushq %rbp
> movq %rsp, %rbp
> lea %gs:(%rdi), %rax
> popq %rbp
> ret
This won't have the effect you're hoping for. LEA stands for "Load Effective Address"; it only operates on the offset part of a log...