Lines Matching +full:8 +full:v +full:- +full:3

3  * @brief RISCV-Specific constants for ELF binaries.
6 * https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc
11 * SPDX-License-Identifier: Apache-2.0
24 * Relocation names for RISCV-specific relocations
31 #define R_RISCV_RELATIVE 3
36 #define R_RISCV_TLS_DTPREL32 8
41 /* 13-15 reserved */
73 /* 46-50 reserved */
89 /* 66-190 reserved */
91 /* 192-255 reserved */
95 * "wordclass" from RISC-V specification
112 /** @brief Generate mask for immediate in B-type RISC-V instruction
120 (R_RISCV_IMM8_GET_BIT(imm8, 9) << 29) | (R_RISCV_IMM8_GET_BIT(imm8, 8) << 28) | \
123 (R_RISCV_IMM8_GET_BIT(imm8, 3) << 10) | (R_RISCV_IMM8_GET_BIT(imm8, 2) << 9) | \
124 (R_RISCV_IMM8_GET_BIT(imm8, 1) << 8) | (R_RISCV_IMM8_GET_BIT(imm8, 11) << 7))
126 /** @brief Generate mask for immediate in J-type RISC-V instruction
134 (R_RISCV_IMM8_GET_BIT(imm8, 9) << 29) | (R_RISCV_IMM8_GET_BIT(imm8, 8) << 28) | \
137 (R_RISCV_IMM8_GET_BIT(imm8, 3) << 23) | (R_RISCV_IMM8_GET_BIT(imm8, 2) << 22) | \
144 /** @brief Generate mask for immediate in S-type RISC-V instruction
151 (R_RISCV_IMM8_GET_BIT(imm8, 9) << 29) | (R_RISCV_IMM8_GET_BIT(imm8, 8) << 28) | \
154 (R_RISCV_IMM8_GET_BIT(imm8, 3) << 10) | (R_RISCV_IMM8_GET_BIT(imm8, 2) << 9) | \
155 (R_RISCV_IMM8_GET_BIT(imm8, 1) << 8) | (R_RISCV_IMM8_GET_BIT(imm8, 0) << 7))
157 /** @brief Generate mask for immediate in compressed J-type RISC-V instruction
165 (R_RISCV_IMM8_GET_BIT(imm8, 9) << 10) | (R_RISCV_IMM8_GET_BIT(imm8, 8) << 9) | \
166 (R_RISCV_IMM8_GET_BIT(imm8, 10) << 8) | (R_RISCV_IMM8_GET_BIT(imm8, 6) << 7) | \
167 (R_RISCV_IMM8_GET_BIT(imm8, 7) << 6) | (R_RISCV_IMM8_GET_BIT(imm8, 3) << 5) | \
168 (R_RISCV_IMM8_GET_BIT(imm8, 2) << 4) | (R_RISCV_IMM8_GET_BIT(imm8, 1) << 3) | \
171 /** @brief Generate mask for immediate in compressed B-type RISC-V instruction
178 ((R_RISCV_IMM8_GET_BIT(imm8, 8) << 12) | (R_RISCV_IMM8_GET_BIT(imm8, 4) << 11) | \
179 (R_RISCV_IMM8_GET_BIT(imm8, 3) << 10) | (R_RISCV_IMM8_GET_BIT(imm8, 7) << 6) | \
181 (R_RISCV_IMM8_GET_BIT(imm8, 1) << 3) | (R_RISCV_IMM8_GET_BIT(imm8, 5) << 2))
183 /** @brief Clear immediate bits in B-type instruction.
185 * @param operand Address of RISC-V instruction, B-type
188 #define R_RISCV_CLEAR_BTYPE_IMM8(operand) ((operand) & ~R_RISCV_BTYPE_IMM8_MASK((uint32_t) -1))
190 /** @brief Overwrite immediate in B-type instruction
192 * @param operand Address of RISC-V instruction, B-type
199 /** @brief Clear immediate bits in J-type instruction.
201 * @param operand Address of RISC-V instruction, J-type
204 #define R_RISCV_CLEAR_JTYPE_IMM8(operand) ((operand) & ~R_RISCV_JTYPE_IMM8_MASK((uint32_t) -1))
206 /** @brief Overwrite immediate in J-type instruction
208 * @param operand Address of RISC-V instruction, J-type
215 /** @brief Clear immediate bits in S-type instruction.
217 * @param operand Address of RISC-V instruction, S-type
220 #define R_RISCV_CLEAR_STYPE_IMM8(operand) ((operand) & ~R_RISCV_STYPE_IMM8_MASK((uint32_t) -1))
222 /** @brief Overwrite immediate in S-type instruction
224 * @param operand Address of RISC-V instruction, S-type
231 /** @brief Clear immediate bits in compressed J-type instruction.
233 * @param operand Address of RISC-V instruction, compressed-J-type
236 #define R_RISCV_CLEAR_CJTYPE_IMM8(operand) ((operand) & ~R_RISCV_CJTYPE_IMM8_MASK((uint32_t) -1))
238 /** @brief Overwrite immediate in compressed J-type instruction
240 * @param operand Address of RISC-V instruction, compressed-J-type
247 /** @brief Clear immediate bits in compressed B-type instruction.
249 * @param operand Address of RISC-V instruction, compressed-B-type
252 #define R_RISCV_CLEAR_CBTYPE_IMM8(operand) ((operand) & ~R_RISCV_CBTYPE_IMM8_MASK((uint32_t) -1))
254 /** @brief Overwrite immediate in compressed B-type instruction
256 * @param operand Address of RISC-V instruction, compressed-B-type
263 /** @brief Clear immediate bits in U-type instruction.
265 * @param operand Address of RISC-V instruction, U-type
270 /** @brief Overwrite immediate in U-type instruction
272 * @param operand Address of RISC-V instruction, U-type
279 /** @brief Clear immediate bits in I-type instruction.
281 * @param operand Address of RISC-V instruction, I-type
286 /** @brief Overwrite immediate in I-type instruction
288 * @param operand Address of RISC-V instruction, I-type