reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
  304
  305
  306
  307
  308
  309
  310
  311
  312
  313
  314
  315
  316
  317
  318
  319
  320
  321
  322
  323
  324
  325
  326
  327
  328
  329
  330
  331
  332
  333
  334
  335
  336
  337
  338
  339
  340
  341
  342
  343
  344
  345
  346
  347
  348
  349
  350
  351
  352
  353
  354
  355
  356
  357
  358
  359
  360
  361
  362
  363
  364
  365
  366
  367
  368
  369
  370
  371
  372
  373
  374
//===-- RegisterContext_mips.h --------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef liblldb_RegisterContext_mips64_H_
#define liblldb_RegisterContext_mips64_H_

#include <cstddef>
#include <cstdint>

// eh_frame and DWARF Register numbers (eRegisterKindEHFrame &
// eRegisterKindDWARF)

enum {
  // GP Registers
  dwarf_zero_mips = 0,
  dwarf_r1_mips,
  dwarf_r2_mips,
  dwarf_r3_mips,
  dwarf_r4_mips,
  dwarf_r5_mips,
  dwarf_r6_mips,
  dwarf_r7_mips,
  dwarf_r8_mips,
  dwarf_r9_mips,
  dwarf_r10_mips,
  dwarf_r11_mips,
  dwarf_r12_mips,
  dwarf_r13_mips,
  dwarf_r14_mips,
  dwarf_r15_mips,
  dwarf_r16_mips,
  dwarf_r17_mips,
  dwarf_r18_mips,
  dwarf_r19_mips,
  dwarf_r20_mips,
  dwarf_r21_mips,
  dwarf_r22_mips,
  dwarf_r23_mips,
  dwarf_r24_mips,
  dwarf_r25_mips,
  dwarf_r26_mips,
  dwarf_r27_mips,
  dwarf_gp_mips,
  dwarf_sp_mips,
  dwarf_r30_mips,
  dwarf_ra_mips,
  dwarf_sr_mips,
  dwarf_lo_mips,
  dwarf_hi_mips,
  dwarf_bad_mips,
  dwarf_cause_mips,
  dwarf_pc_mips,
  dwarf_f0_mips,
  dwarf_f1_mips,
  dwarf_f2_mips,
  dwarf_f3_mips,
  dwarf_f4_mips,
  dwarf_f5_mips,
  dwarf_f6_mips,
  dwarf_f7_mips,
  dwarf_f8_mips,
  dwarf_f9_mips,
  dwarf_f10_mips,
  dwarf_f11_mips,
  dwarf_f12_mips,
  dwarf_f13_mips,
  dwarf_f14_mips,
  dwarf_f15_mips,
  dwarf_f16_mips,
  dwarf_f17_mips,
  dwarf_f18_mips,
  dwarf_f19_mips,
  dwarf_f20_mips,
  dwarf_f21_mips,
  dwarf_f22_mips,
  dwarf_f23_mips,
  dwarf_f24_mips,
  dwarf_f25_mips,
  dwarf_f26_mips,
  dwarf_f27_mips,
  dwarf_f28_mips,
  dwarf_f29_mips,
  dwarf_f30_mips,
  dwarf_f31_mips,
  dwarf_fcsr_mips,
  dwarf_fir_mips,
  dwarf_w0_mips,
  dwarf_w1_mips,
  dwarf_w2_mips,
  dwarf_w3_mips,
  dwarf_w4_mips,
  dwarf_w5_mips,
  dwarf_w6_mips,
  dwarf_w7_mips,
  dwarf_w8_mips,
  dwarf_w9_mips,
  dwarf_w10_mips,
  dwarf_w11_mips,
  dwarf_w12_mips,
  dwarf_w13_mips,
  dwarf_w14_mips,
  dwarf_w15_mips,
  dwarf_w16_mips,
  dwarf_w17_mips,
  dwarf_w18_mips,
  dwarf_w19_mips,
  dwarf_w20_mips,
  dwarf_w21_mips,
  dwarf_w22_mips,
  dwarf_w23_mips,
  dwarf_w24_mips,
  dwarf_w25_mips,
  dwarf_w26_mips,
  dwarf_w27_mips,
  dwarf_w28_mips,
  dwarf_w29_mips,
  dwarf_w30_mips,
  dwarf_w31_mips,
  dwarf_mcsr_mips,
  dwarf_mir_mips,
  dwarf_config5_mips,
  dwarf_ic_mips,
  dwarf_dummy_mips
};

enum {
  dwarf_zero_mips64 = 0,
  dwarf_r1_mips64,
  dwarf_r2_mips64,
  dwarf_r3_mips64,
  dwarf_r4_mips64,
  dwarf_r5_mips64,
  dwarf_r6_mips64,
  dwarf_r7_mips64,
  dwarf_r8_mips64,
  dwarf_r9_mips64,
  dwarf_r10_mips64,
  dwarf_r11_mips64,
  dwarf_r12_mips64,
  dwarf_r13_mips64,
  dwarf_r14_mips64,
  dwarf_r15_mips64,
  dwarf_r16_mips64,
  dwarf_r17_mips64,
  dwarf_r18_mips64,
  dwarf_r19_mips64,
  dwarf_r20_mips64,
  dwarf_r21_mips64,
  dwarf_r22_mips64,
  dwarf_r23_mips64,
  dwarf_r24_mips64,
  dwarf_r25_mips64,
  dwarf_r26_mips64,
  dwarf_r27_mips64,
  dwarf_gp_mips64,
  dwarf_sp_mips64,
  dwarf_r30_mips64,
  dwarf_ra_mips64,
  dwarf_sr_mips64,
  dwarf_lo_mips64,
  dwarf_hi_mips64,
  dwarf_bad_mips64,
  dwarf_cause_mips64,
  dwarf_pc_mips64,
  dwarf_f0_mips64,
  dwarf_f1_mips64,
  dwarf_f2_mips64,
  dwarf_f3_mips64,
  dwarf_f4_mips64,
  dwarf_f5_mips64,
  dwarf_f6_mips64,
  dwarf_f7_mips64,
  dwarf_f8_mips64,
  dwarf_f9_mips64,
  dwarf_f10_mips64,
  dwarf_f11_mips64,
  dwarf_f12_mips64,
  dwarf_f13_mips64,
  dwarf_f14_mips64,
  dwarf_f15_mips64,
  dwarf_f16_mips64,
  dwarf_f17_mips64,
  dwarf_f18_mips64,
  dwarf_f19_mips64,
  dwarf_f20_mips64,
  dwarf_f21_mips64,
  dwarf_f22_mips64,
  dwarf_f23_mips64,
  dwarf_f24_mips64,
  dwarf_f25_mips64,
  dwarf_f26_mips64,
  dwarf_f27_mips64,
  dwarf_f28_mips64,
  dwarf_f29_mips64,
  dwarf_f30_mips64,
  dwarf_f31_mips64,
  dwarf_fcsr_mips64,
  dwarf_fir_mips64,
  dwarf_ic_mips64,
  dwarf_dummy_mips64,
  dwarf_w0_mips64,
  dwarf_w1_mips64,
  dwarf_w2_mips64,
  dwarf_w3_mips64,
  dwarf_w4_mips64,
  dwarf_w5_mips64,
  dwarf_w6_mips64,
  dwarf_w7_mips64,
  dwarf_w8_mips64,
  dwarf_w9_mips64,
  dwarf_w10_mips64,
  dwarf_w11_mips64,
  dwarf_w12_mips64,
  dwarf_w13_mips64,
  dwarf_w14_mips64,
  dwarf_w15_mips64,
  dwarf_w16_mips64,
  dwarf_w17_mips64,
  dwarf_w18_mips64,
  dwarf_w19_mips64,
  dwarf_w20_mips64,
  dwarf_w21_mips64,
  dwarf_w22_mips64,
  dwarf_w23_mips64,
  dwarf_w24_mips64,
  dwarf_w25_mips64,
  dwarf_w26_mips64,
  dwarf_w27_mips64,
  dwarf_w28_mips64,
  dwarf_w29_mips64,
  dwarf_w30_mips64,
  dwarf_w31_mips64,
  dwarf_mcsr_mips64,
  dwarf_mir_mips64,
  dwarf_config5_mips64,
};

// GP registers
struct GPR_linux_mips {
  uint64_t zero;
  uint64_t r1;
  uint64_t r2;
  uint64_t r3;
  uint64_t r4;
  uint64_t r5;
  uint64_t r6;
  uint64_t r7;
  uint64_t r8;
  uint64_t r9;
  uint64_t r10;
  uint64_t r11;
  uint64_t r12;
  uint64_t r13;
  uint64_t r14;
  uint64_t r15;
  uint64_t r16;
  uint64_t r17;
  uint64_t r18;
  uint64_t r19;
  uint64_t r20;
  uint64_t r21;
  uint64_t r22;
  uint64_t r23;
  uint64_t r24;
  uint64_t r25;
  uint64_t r26;
  uint64_t r27;
  uint64_t gp;
  uint64_t sp;
  uint64_t r30;
  uint64_t ra;
  uint64_t mullo;
  uint64_t mulhi;
  uint64_t pc;
  uint64_t badvaddr;
  uint64_t sr;
  uint64_t cause;
  uint64_t config5;
};

struct FPR_linux_mips {
  uint64_t f0;
  uint64_t f1;
  uint64_t f2;
  uint64_t f3;
  uint64_t f4;
  uint64_t f5;
  uint64_t f6;
  uint64_t f7;
  uint64_t f8;
  uint64_t f9;
  uint64_t f10;
  uint64_t f11;
  uint64_t f12;
  uint64_t f13;
  uint64_t f14;
  uint64_t f15;
  uint64_t f16;
  uint64_t f17;
  uint64_t f18;
  uint64_t f19;
  uint64_t f20;
  uint64_t f21;
  uint64_t f22;
  uint64_t f23;
  uint64_t f24;
  uint64_t f25;
  uint64_t f26;
  uint64_t f27;
  uint64_t f28;
  uint64_t f29;
  uint64_t f30;
  uint64_t f31;
  uint32_t fcsr;
  uint32_t fir;
  uint32_t config5;
};

struct MSAReg {
  uint8_t byte[16];
};

struct MSA_linux_mips {
  MSAReg w0;
  MSAReg w1;
  MSAReg w2;
  MSAReg w3;
  MSAReg w4;
  MSAReg w5;
  MSAReg w6;
  MSAReg w7;
  MSAReg w8;
  MSAReg w9;
  MSAReg w10;
  MSAReg w11;
  MSAReg w12;
  MSAReg w13;
  MSAReg w14;
  MSAReg w15;
  MSAReg w16;
  MSAReg w17;
  MSAReg w18;
  MSAReg w19;
  MSAReg w20;
  MSAReg w21;
  MSAReg w22;
  MSAReg w23;
  MSAReg w24;
  MSAReg w25;
  MSAReg w26;
  MSAReg w27;
  MSAReg w28;
  MSAReg w29;
  MSAReg w30;
  MSAReg w31;
  uint32_t fcsr;    /* FPU control status register */
  uint32_t fir;     /* FPU implementaion revision */
  uint32_t mcsr;    /* MSA control status register */
  uint32_t mir;     /* MSA implementation revision */
  uint32_t config5; /* Config5 register */
};

struct UserArea {
  GPR_linux_mips gpr; // General purpose registers.
  FPR_linux_mips fpr; // Floating point registers.
  MSA_linux_mips msa; // MSA registers.
};

#endif // liblldb_RegisterContext_mips64_H_