Changeset View
Changeset View
Standalone View
Standalone View
cddl/lib/libdtrace/regs_riscv.d
- This file was added.
| /* | |||||
| * SPDX-License-Identifier: CDDL 1.0 | |||||
| * | |||||
| * Copyright 2023 Christos Margiolis <christos@FreeBSD.org> | |||||
| */ | |||||
| inline int R_ZERO = 0; | |||||
| #pragma D binding "1.0" R_ZERO | |||||
| inline int R_RA = 1; | |||||
markj: Technically this should be 1.13, not 1.0. It comes from DT_VERS_STRING in libdtrace. | |||||
Done Inline ActionsShould the version in regs_x86.d be bumped as well? christos: Should the version in regs_x86.d be bumped as well? | |||||
Not Done Inline ActionsNo, the binding reflects the current libdtrace version at the time that the definitions were introduced. The x86 register bindings have been there since the beginning. markj: No, the binding reflects the current libdtrace version at the time that the definitions were… | |||||
| #pragma D binding "1.0" R_RA | |||||
| inline int R_SP = 2; | |||||
| #pragma D binding "1.0" R_SP | |||||
| inline int R_GP = 3; | |||||
| #pragma D binding "1.0" R_GP | |||||
| inline int R_TP = 4; | |||||
| #pragma D binding "1.0" R_TP | |||||
| inline int R_T0 = 5; | |||||
| #pragma D binding "1.0" R_T0 | |||||
| inline int R_T1 = 6; | |||||
| #pragma D binding "1.0" R_T1 | |||||
| inline int R_T2 = 7; | |||||
| #pragma D binding "1.0" R_T2 | |||||
| inline int R_S0 = 8; | |||||
| #pragma D binding "1.0" R_S0 | |||||
| inline int R_S1 = 9; | |||||
| #pragma D binding "1.0" R_S1 | |||||
Done Inline ActionsS0 is also the Frame Pointer. Can you add another entry giving it the alias R_FP? mhorne: S0 is also the Frame Pointer. Can you add another entry giving it the alias `R_FP`? | |||||
Done Inline ActionsYeah. I had initially added R_FP as well but I rewrote the file and forgot to add it. christos: Yeah. I had initially added R_FP as well but I rewrote the file and forgot to add it. | |||||
| inline int R_A0 = 10; | |||||
| #pragma D binding "1.0" R_A0 | |||||
| inline int R_A1 = 11; | |||||
| #pragma D binding "1.0" R_A1 | |||||
| inline int R_A2 = 12; | |||||
| #pragma D binding "1.0" R_A2 | |||||
| inline int R_A3 = 13; | |||||
| #pragma D binding "1.0" R_A3 | |||||
| inline int R_A4 = 14; | |||||
| #pragma D binding "1.0" R_A4 | |||||
| inline int R_A5 = 15; | |||||
| #pragma D binding "1.0" R_A5 | |||||
| inline int R_A6 = 16; | |||||
| #pragma D binding "1.0" R_A6 | |||||
| inline int R_A7 = 17; | |||||
| #pragma D binding "1.0" R_A7 | |||||
| inline int R_S2 = 18; | |||||
| #pragma D binding "1.0" R_S2 | |||||
| inline int R_S3 = 19; | |||||
| #pragma D binding "1.0" R_S3 | |||||
| inline int R_S4 = 20; | |||||
| #pragma D binding "1.0" R_S4 | |||||
| inline int R_S5 = 21; | |||||
| #pragma D binding "1.0" R_S5 | |||||
| inline int R_S6 = 22; | |||||
| #pragma D binding "1.0" R_S6 | |||||
| inline int R_S7 = 23; | |||||
| #pragma D binding "1.0" R_S7 | |||||
| inline int R_S8 = 24; | |||||
| #pragma D binding "1.0" R_S8 | |||||
| inline int R_S9 = 25; | |||||
| #pragma D binding "1.0" R_S9 | |||||
| inline int R_S10 = 26; | |||||
| #pragma D binding "1.0" R_S10 | |||||
| inline int R_S11 = 27; | |||||
| #pragma D binding "1.0" R_S11 | |||||
| inline int R_T3 = 28; | |||||
| #pragma D binding "1.0" R_T3 | |||||
| inline int R_T4 = 29; | |||||
| #pragma D binding "1.0" R_T4 | |||||
| inline int R_T5 = 30; | |||||
| #pragma D binding "1.0" R_T5 | |||||
| inline int R_T6 = 31; | |||||
| #pragma D binding "1.0" R_T6 | |||||
| inline int R_PC = 32; | |||||
| #pragma D binding "1.0" R_PC | |||||
Technically this should be 1.13, not 1.0. It comes from DT_VERS_STRING in libdtrace.