| Chris Lattner | 79fa371 | 2010-11-15 05:57:53 +0000 | [diff] [blame] | 1 | //===-- PPCFixupKinds.h - PPC Specific Fixup Entries ------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 10 | #ifndef LLVM_LIB_TARGET_POWERPC_MCTARGETDESC_PPCFIXUPKINDS_H |
| 11 | #define LLVM_LIB_TARGET_POWERPC_MCTARGETDESC_PPCFIXUPKINDS_H |
| Chris Lattner | 79fa371 | 2010-11-15 05:57:53 +0000 | [diff] [blame] | 12 | |
| 13 | #include "llvm/MC/MCFixup.h" |
| 14 | |
| Sylvestre Ledru | 37ef20d | 2013-03-17 12:40:42 +0000 | [diff] [blame] | 15 | #undef PPC |
| 16 | |
| Chris Lattner | 79fa371 | 2010-11-15 05:57:53 +0000 | [diff] [blame] | 17 | namespace llvm { |
| 18 | namespace PPC { |
| 19 | enum Fixups { |
| Rafael Espindola | 1416c2d | 2017-06-28 17:23:13 +0000 | [diff] [blame] | 20 | // 24-bit PC relative relocation for direct branches like 'b' and 'bl'. |
| Chris Lattner | 79fa371 | 2010-11-15 05:57:53 +0000 | [diff] [blame] | 21 | fixup_ppc_br24 = FirstTargetFixupKind, |
| Rafael Espindola | 1416c2d | 2017-06-28 17:23:13 +0000 | [diff] [blame] | 22 | |
| 23 | /// 14-bit PC relative relocation for conditional branches. |
| Chris Lattner | 85e3768 | 2010-11-15 06:12:22 +0000 | [diff] [blame] | 24 | fixup_ppc_brcond14, |
| Rafael Espindola | 1416c2d | 2017-06-28 17:23:13 +0000 | [diff] [blame] | 25 | |
| 26 | /// 24-bit absolute relocation for direct branches like 'ba' and 'bla'. |
| Ulrich Weigand | b6a30d1 | 2013-06-24 11:03:33 +0000 | [diff] [blame] | 27 | fixup_ppc_br24abs, |
| 28 | |
| Rafael Espindola | 1416c2d | 2017-06-28 17:23:13 +0000 | [diff] [blame] | 29 | /// 14-bit absolute relocation for conditional branches. |
| Ulrich Weigand | b6a30d1 | 2013-06-24 11:03:33 +0000 | [diff] [blame] | 30 | fixup_ppc_brcond14abs, |
| 31 | |
| Rafael Espindola | 1416c2d | 2017-06-28 17:23:13 +0000 | [diff] [blame] | 32 | /// A 16-bit fixup corresponding to lo16(_foo) or ha16(_foo) for instrs like |
| 33 | /// 'li' or 'addis'. |
| Ulrich Weigand | 6e23ac6 | 2013-05-17 12:37:21 +0000 | [diff] [blame] | 34 | fixup_ppc_half16, |
| Rafael Espindola | 1416c2d | 2017-06-28 17:23:13 +0000 | [diff] [blame] | 35 | |
| 36 | /// A 14-bit fixup corresponding to lo16(_foo) with implied 2 zero bits for |
| 37 | /// instrs like 'std'. |
| Ulrich Weigand | 6e23ac6 | 2013-05-17 12:37:21 +0000 | [diff] [blame] | 38 | fixup_ppc_half16ds, |
| Bill Schmidt | ca4a0c9 | 2012-12-04 16:18:08 +0000 | [diff] [blame] | 39 | |
| Rafael Espindola | 1416c2d | 2017-06-28 17:23:13 +0000 | [diff] [blame] | 40 | /// Not a true fixup, but ties a symbol to a call to __tls_get_addr for the |
| 41 | /// TLS general and local dynamic models, or inserts the thread-pointer |
| 42 | /// register number. |
| Bill Schmidt | 24b8dd6 | 2012-12-12 19:29:35 +0000 | [diff] [blame] | 43 | fixup_ppc_nofixup, |
| Rafael Espindola | 1416c2d | 2017-06-28 17:23:13 +0000 | [diff] [blame] | 44 | |
| Chris Lattner | 79fa371 | 2010-11-15 05:57:53 +0000 | [diff] [blame] | 45 | // Marker |
| 46 | LastTargetFixupKind, |
| 47 | NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind |
| 48 | }; |
| Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 49 | } |
| 50 | } |
| Chris Lattner | 79fa371 | 2010-11-15 05:57:53 +0000 | [diff] [blame] | 51 | |
| 52 | #endif |