Correctly handle calls to functions which are further away than 2**32 bits will
authorMisha Brukman <brukman+llvm@gmail.com>
Tue, 15 Jul 2003 19:09:43 +0000 (19:09 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Tue, 15 Jul 2003 19:09:43 +0000 (19:09 +0000)
commit07d4516f92e866ec7900146789333a819f4f06df
tree3a201e74ea63aff300576326eb7e4e593c16524d
parent859e09f06ea44b9182119fce4c75ba52baf429a6
Correctly handle calls to functions which are further away than 2**32 bits will
allow, i.e. make a sequence of instructions to enable an indirect call using
jump-and-link and 2 temporary registers (which we save and ultimately restore).

Warning: if the delay slot of a function call is used to do meaningful work and
not just a NOP, this behavior is incorrect. However, the Sparc backend does not
yet utilize the delay slots effectively, so it is not necessary to make an
overly complicated algorithm for something that's not used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7178 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SparcV9/SparcV9CodeEmitter.cpp
lib/Target/SparcV9/SparcV9CodeEmitter.h