[LLVMdev] store addrspace qualifier

Villmow, Micah Micah.Villmow at amd.com
Wed Sep 17 13:06:08 PDT 2008


How do I access the address qualifier from the store instruction.

Given the following code:

 

define void @test_unary_op_anegate(float %x, float addrspace(11)*
%result) nounwind  {

entry:

        %neg = sub float -0.000000e+000, %x             ; <float>
[#uses=1]

        store float %neg, float addrspace(11)* %result

        ret void

}

When I attempt to generate this code, I'm aborting on.

Cannot yet select: 017E8230: ch = store 017E7DF0, 017E8098, 017E8010,
017E81A8 <0035A078:0> alignment=4

So I am doing a custom Store function.

In my LowerStore function, I get an SDValue w/ opcode of 119(store) and
4 child Operands

Operand 0 is the entry token which I assume I can ignore

Operand 1 is the source data(%neg), which I finally can handle correctly
thanks to Eli

Operand 2 is the dst location with two children, an EntryToken and
Register(%result I'm guessing)

Operand 3 is undef

 

So, how do I find out the address space? The reason being different
address spaces are accessed with different registers.

 

Thanks,

 

Micah Villmow

Systems Engineer

Advanced Technology & Performance

Advanced Micro Devices Inc.

4555 Great America Pkwy,

Santa Clara, CA. 95054

P: 408-572-6219

F: 408-572-6596

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080917/91bcec74/attachment.html>


More information about the llvm-dev mailing list