diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-11-24 22:30:08 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-11-24 22:30:08 +0000 |
| commit | dd516799d7cb7218d568de1472a8f1804f8a488e (patch) | |
| tree | f7c6095afac6190f6b1a6623e9b58284085f0ae3 /llvm/lib/Target/PowerPC/PPC32Relocations.h | |
| parent | e49936af54f3124cf7247b247096255aab6d235d (diff) | |
| download | bcm5719-llvm-dd516799d7cb7218d568de1472a8f1804f8a488e.tar.gz bcm5719-llvm-dd516799d7cb7218d568de1472a8f1804f8a488e.zip | |
* Rename existing relocations to be more specific
* Add relocations for refernces to non-lazy darwin stubs and implement
them correctly.
With this change, we can correctly references external globals, and now
all but two UnitTests and all but 1 Regression/C tests pass.
More importantly, bugpoint-jit will start giving us useful testcases,
instead of always telling us that references to external globals don't
work :)
llvm-svn: 18222
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPC32Relocations.h')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPC32Relocations.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC32Relocations.h b/llvm/lib/Target/PowerPC/PPC32Relocations.h index 54de9a6fa29..a3eb7600438 100644 --- a/llvm/lib/Target/PowerPC/PPC32Relocations.h +++ b/llvm/lib/Target/PowerPC/PPC32Relocations.h @@ -22,15 +22,29 @@ namespace llvm { // reloc_pcrel_bx - PC relative relocation, for the b or bl instructions. reloc_pcrel_bx, - // reloc_absolute_loadhi - Absolute relocation, for the loadhi instruction + // reloc_absolute_high - Absolute relocation, for the loadhi instruction // (which is really addis). Add the high 16-bits of the specified global - // address into the immediate field of the addis. - reloc_absolute_loadhi, + // address into the low 16-bits of the instruction. + reloc_absolute_high, - // reloc_absolute_la - Absolute relocation, for the la instruction (which + // reloc_absolute_low - Absolute relocation, for the la instruction (which // is really an addi). Add the low 16-bits of teh specified global - // address into the immediate field of the addi. - reloc_absolute_la, + // address into the low 16-bits of the instruction. + reloc_absolute_low, + + // reloc_absolute_ptr_high - Absolute relocation for references to lazy + // pointer stubs. In this case, the relocated instruction should be + // relocated to point to a POINTER to the indicated global. The low-16 + // bits of the instruction are rewritten with the high 16-bits of the + // address of the pointer. + reloc_absolute_ptr_high, + + // reloc_absolute_ptr_low - Absolute relocation for references to lazy + // pointer stubs. In this case, the relocated instruction should be + // relocated to point to a POINTER to the indicated global. The low-16 + // bits of the instruction are rewritten with the low 16-bits of the + // address of the pointer. + reloc_absolute_ptr_low, }; } } |

