[LLVMdev] emitting jump tables
Rafael EspĂndola
rafael.espindola at gmail.com
Wed Oct 18 12:01:34 PDT 2006
I am currently able to emit jump tables, but I cannot use then because
I cant figure out how to add its address to the constant pool.
For example, if I have the jump table
-------------------------------------
.JTI1_0:
.word .BB1_6
.word .BB1_7
.word .BB1_1
.word .BB1_2
-------------------------------------
the address ".JTI1_0" must be in a constant pool:
---------------------------------
.xyz
.word .JTI1_0
....
ldr r1, .xyz
add r0, r0, r1
ldr r0, [r0]
bx r0
---------------------------------
I intended to do something similar to LowerGlobalAddress. The problem
is that a GlobalAddressSDNode has a getGlobal method, but a
JumpTableSDNode does not. How can I get a "Constant *" with "JTI1_0"?
Thanks,
Rafael
More information about the llvm-dev
mailing list