Tool: mp_mpt2test

Overview

MicroprobeTest (mpt) to C loop tool provides a command-line interface (CLI) to convert code snippets to C + inline assembly format. Using a test definition format (Microprobe test (mpt) format), the user can specify the initial state (initialization of the registers), the variables that have to be declared and the code snippet, which might contain references to those variables, branch labels, fixed addresses, etc. Check the Microprobe test (mpt) format for further details.

Note

The microbenchmark generation policy implemented in this tool reproduces exactly the code provided. It resolves any symbolic references (references to data, or branch targets), and only if specified by the user, it also modifies memory accesses to avoid segmentation fault issues. If the --endless flag is provided, the tool wraps the code provided within an endless loop.

Note

When compitling the C code with assembly statements generated, one should force the compiler/linker to avoid any optimization that modified the generated code. In GCC, for instance, embedded assembly statements are not modified but the linker can perform modifications. To avoid that, one needs to use the -mno-relax flags at compile/link-time to avoid link time optimizations.

Basic usage

> mp_mpt2test -T TARGET -t MPT_DEFINITION_FILE -O MPT_OUTPUT_FILE

where:

Flag/Argument

Description

-T TARGET, --target TARGET

Target definition string. Check: Command line target definition scheme.

-t MPT_DEFINITION_FILE, --mpt-definition-file MPT_DEFINITION_FILE

Microprobe test definition file. Check: Microprobe test (mpt) format.

-O MPT_OUTPUT_FILE, --mpt-output-file MPT_OUTPUT_FILE

Output file name.

Full usage

mp_mpt2test.py: INFO: Processing input arguments...
usage: mp_mpt2test.py [-h] [-P SEARCH_PATH [SEARCH_PATH ...]] [-V] [-v] [-d]
                      [-c CONFIG_FILE [CONFIG_FILE ...]]
                      [-C FORCE_CONFIG_FILE]
                      [--dump-configuration-file OUTPUT_CONFIG_FILE]
                      [--dump-full-configuration-file OUTPUT_CONFIG_FILE]
                      [-A ARCHITECTURE_PATHS] [-M MICROARCHITECTURE_PATHS]
                      [-E ENVIRONMENT_PATHS] -T TARGET [--list-architectures]
                      [--list-microarchitectures] [--list-environments]
                      [--traceback] [--profile PROFILE_OUTPUT] -t
                      MPT_DEFINITION_FILE -O C_OUTPUT_FILE
                      [--fix-indirect-branches] [--fix-branch-next]
                      [--fix-memory-references] [--fix-memory-registers]
                      [--safe-bin] [--raw-bin] [--endless]

MicroprobeTest (mpt) to test tool

optional arguments:
  -h, --help            show this help message and exit
  -P SEARCH_PATH [SEARCH_PATH ...], --default_paths SEARCH_PATH [SEARCH_PATH ...]
                        Default search paths for microprobe target definitions
  -V, --version         Show Microprobe version and exit
  -v, --verbosity       Verbosity level (Values: [0,1,2,3,4]). Each time this
                        argument is specified the verbosity level is
                        increased. By default, no logging messages are shown.
                        These are the four levels available:
                        
                          -v (1): critical messages
                          -v -v (2): critical and error messages
                          -v -v -v (3): critical, error and warning messages
                          -v -v -v -v (4): critical, error, warning and info messages
                        
                        Specifying more than four verbosity flags, will
                        default to the maximum of four. If you need extra
                        information, enable the debug mode (--debug or -d
                        flags).
  -d, --debug           Enable debug mode in Microprobe framework. Lots of
                        output messages will be generated

Configuration arguments:

  Command arguments related to configuration file handling

  -c CONFIG_FILE [CONFIG_FILE ...], --configuration CONFIG_FILE [CONFIG_FILE ...]
                        Configuration file. The configuration files will be
                        readed in order of appearance. Values are reset by the
                        last configuration file in case of non-list values.
                        List values will be appended (not reset)
  -C FORCE_CONFIG_FILE, --force-configuration FORCE_CONFIG_FILE
                        Force configuration file. Use this configuration file
                        as the default start configuration. This disables any
                        system-wide, or user-provided configuration.
  --dump-configuration-file OUTPUT_CONFIG_FILE
                        Dump a configuration file with the actual
                        configuration used
  --dump-full-configuration-file OUTPUT_CONFIG_FILE
                        Dump a configuration file with the actual
                        configuration used plus all the configuration options
                        not set

Target path arguments:

  Command arguments related to target paths

  -A ARCHITECTURE_PATHS, --architecture-paths ARCHITECTURE_PATHS
                        Search path for architecture definitions. Microprobe
                        will search in these paths for architecture
                        definitions
  -M MICROARCHITECTURE_PATHS, --microarchitecture-paths MICROARCHITECTURE_PATHS
                        Search path for microarchitecture definitions.
                        Microprobe will search in these paths for
                        microarchitecture definitions
  -E ENVIRONMENT_PATHS, --environment-paths ENVIRONMENT_PATHS
                        Search path for environment definitions. Microprobe
                        will search in these paths for environment definitions

Target arguments:

  Command arguments related to target specification and queries

  -T TARGET, --target TARGET
                        Target tuple. Microprobe follows a GCC-like target
                        definition scheme, where a target is defined by a
                        tuple as following:
                        
                          <arch-name>-<uarch-name>-<env-name>
                        
                        where:
                        
                          <arch-name>: is the name of the architecture
                          <uarch-name>: is the name of the microarchitecture
                          <env-name>: is the name of the environment
                        
                        One can use --list-* options to get the list of
                        definitions available in the default search paths or
                        the paths specified by the different --*-paths options
  --list-architectures  Generate a list of architectures available in the
                        defined search paths and exit
  --list-microarchitectures
                        Generate a list of microarchitectures available in the
                        defined search paths and exit
  --list-environments   Generate a list of environments available in the
                        defined search paths and exit

Debug arguments:

  Command arguments related to debugging facilities

  --traceback           show a traceback and starts a python debugger (pdb)
                        when an error occurs. 'pdb' is an interactive python
                        shell that facilitates the debugging of errors
  --profile PROFILE_OUTPUT
                        dump profiling information into given file (see
                        'pstats' module)

Microprobe Test arguments:

  Command arguments related to Microprobe Test (mpt) generation

  -t MPT_DEFINITION_FILE, --mpt-definition-file MPT_DEFINITION_FILE
                        Microprobe test (mpt) definition file

MPT to test arguments:

  Command arguments related to MPT to test tool

  -O C_OUTPUT_FILE, --c-output-file C_OUTPUT_FILE
                        C output file name

Fixing options:

  Command arguments related to fixing options

  --fix-indirect-branches
                        Fix branches without known target
  --fix-branch-next     Force target of branches to be the next sequential
                        instruction
  --fix-memory-references
                        Ensure that registers used by instructions accessing
                        storage are initialized to valid locations
  --fix-memory-registers
                        Fix non-storage instructions touching registers used
                        for storage address computations (implies --fix-
                        memory-referenes flag)
  --safe-bin            Ignore unrecognized binary codifications (do notfail).
                        Useful when MPTs are generated by dumping directly
                        code pages, which contain padding zeros and other non-
                        code stuff)
  --raw-bin             Process all instruction entries together. They all
                        shoud be binary entries. Implies --safe-bin flag.
                        Useful when MPTs are generated by dumping directly
                        code pages, which contain padding zeros and other non-
                        code stuff)
  --endless             Wrap the code generated within an endless loop

Environment variables:

  MICROPROBETEMPLATES    Default path for microprobe templates
  MICROPROBEDEBUG        If set, enable debug
  MICROPROBEDEBUGPASSES  If set, enable debug during passes
  MICROPROBEASMHEXFMT    Assembly hexadecimal format. Options:
                         'all' -> All immediates in hex format
                         'address' -> Address immediates in hex format (default)
                         'none' -> All immediate in integer format

Fix flags

As stated above, this tool does not ensure that the memory address accessed by the assembly code access valid storage regions. For that, one has to declare the appropriate variables and initialize valid register contents. Also, it might be the case that the code still is not correct and extra modifications are required.

Going through the assembly to understand it and manually modify it to make sure it runs correctly can be a tedious task. This tool provides a set of flags that perform predefined modifications on that code with the aim to make sure that at least it will run correctly. One has to take into account that the modifications might change the performance profile of the code. So, we strongly suggest you to validate the code generated to make sure it is still valid for your needs.

In the table below, we summarize the flags that enable extra modification to the code:

Flag

Description

--fix-memory-references

Fix registers that are used to compute addresses in instruction accessing that access storage locations.

--fix-memory-registers

Fix instructions touching registers used for storage address computations. If an instruction modifies a register that is used for storage address computation, the instruction is modified to not modify such register. Instead, a register that minimizes the dependency between instructions is used. Also, load and update or store and update instructions are replaced by their very same implementation without the update. Implies –fix-memory-references flag.

--fix-indirect-branches

Fix branches without known target. Any branch with unknown target is replaced by an unconditional branch to the next instruction.

--fix-branch-next

Force target of branches to be the next sequential instruction.

Example outputs

Example 1:

Command:

> mp_mpt2test -T riscv_v22-riscv_generic-riscv64_linux_gcc -t example1.mpt -O output.c --endless

Input file example1.mpt:

 1; Microprobe Test Definition File
 2[MPT]
 3mpt_version = 0.5 ;  Format version of this MPT file.
 4
 5[REGISTERS] ; Section to specify the initial register values
 6
 7; Format: register = value. E.g.:
 8
 9; Set GR0, GR1 and GR2 register to 0, 1, 2 values respectively
10;GR0 = 0x0
11
12
13[DATA] ; Section to specify the variables
14
15; Data section default address. Variables will be placed from this address
16; if their address is not specified
17
18default_address = 0x0000000010040000
19
20; Variable Declaration
21; Format: var_name = [ "type", nelems, address, alignment, init_values ]
22; where:
23;   - "type": is a string specifying the type of elements in the variable
24;   - nelems: is the number of elements in the variable
25;   - address : is the address of the variable, if set the address will be
26;               fixed, otherwise, it will be computer by microprobe
27;   - alignment : alignment requirements of the variable. It should not
28;                 conflict with address if specified. It can be set to None
29;   - init_values : if it is a single value, all the elements will be
30;                   initialized to that value, if it is an array, elements
31;                   will be initialized to the values specified in a round-
32;                   robin fashion. Two special keywords can be specified:
33;                   RNDFP and RNDINT to initialize the elements to random FP
34;                   and random INT values
35;
36; Note that variable names ARE NOT case sensitive. I.e. VAR = Var = var
37
38count	=	[ "int64_t", 1, 0x10040000, 0x8, 3405695742 ]
39linkedlist	=	[ "uint8_t", 80, 0x10040010, 0x0, [8, 7, 6, 5, 4, 3, 2, 1, 32, 160, 32, 171, 108, 85, 0, 0, 8, 7, 6, 5, 4, 3, 2, 1, 48, 160, 32, 171, 108, 85, 0, 0, 8, 7, 6, 5, 4, 3, 2, 1, 64, 160, 32, 171, 108, 85, 0, 0, 8, 7, 6, 5, 4, 3, 2, 1, 80, 160, 32, 171, 108, 85, 0, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0] ]
40microprobe_stack	=	[ "uint8_t", 4096, None, 0x10, None ]
41
42[CODE] ; Section to specify the code
43
44; Code section default address. Code will be placed from this address
45; if the instruction address is not specified
46
47default_address = 0x000000001002fff0
48
49; The code specified after 'instructions' entry (below) is the code that will be
50; processed by microprobe. The instruction format is similar to GNU assembler
51; format, it also allows the specification of labels (NOT case sensitive) and
52; references to the declared variables. It is also possible to specify instruction
53; addresses and to do code expansion by referencing other user
54; defined entries. Check the example below to see examples of these features.
55;
56; *****************************************************************************
57; ******  Although Microprobe performs some sanity checks, it is the   ********
58; ******  responsibility of the user to define correct code.           ********
59; ******                                                               ********
60; *****************************************************************************
61
62instructions =
63  <ELF_ABI_START>:
64    JAL x1, c2mpt_function
65    JAL x1, ELF_ABI_EXIT
66  0x0000000010030000 <C2MPT_FUNCTION>:
67    LUI x12, 65600
68    ADDI x12, x12, 0
69    LD x15, 8(x12)
70    LD x14, 80(x12)
71    BEQ x15, x0, C2MPT_FUNCTION+0X24
72    LD x13, 0(x15)
73    LD x15, 8(x15)
74    ADD x14, x14, x13
75    BNE x15, x0, C2MPT_FUNCTION+0X14
76    SLLI x14, x14, 1
77    SD x14, 80(x12)
78    JALR x0, 0(x1)
79  0x0000000010030030 <MY_SUBROUTINE>:
80    SLLI x10, x10, 1
81    LUI x15, 65600
82    SD x10, 80(x15)
83    JALR x0, 0(x1)
84  <ELF_ABI_EXIT>:
85    ADDI x0, x0, 0

Output:

mp_mpt2test.py: INFO: Processing input arguments...
mp_mpt2test.py: INFO: Arguments processed!
mp_mpt2test.py: INFO: Importing target definition...
mp_mpt2test.py: INFO: Start generating '/tmp/microprobe/doc/source/examples_outputs/example_mpt2test.c'
mp_mpt2test.py: INFO: Interpreting assembly...
mp_mpt2test.py: WARNING: Instruction address not needed in 'LUI x12, 65600'
mp_mpt2test.py: WARNING: Instruction address not needed in 'SLLI x10, x10, 1'
mp_mpt2test.py: WARNING: Default data address not needed
mp_mpt2test.py: WARNING: Default code address not needed
mp_mpt2test.py: WARNING: Using endless C wrapper
mp_mpt2test.py: INFO: Creating benchmark synthesizer...
mp_mpt2test.py: INFO: Add register initialization pass
mp_mpt2test.py: INFO: Synthesizing...
mp_mpt2test.py: INFO: '/tmp/microprobe/doc/source/examples_outputs/example_mpt2test.c' generated!

Output file output.c:

  1#include <stdio.h>
  2#include <string.h>
  3#include <stdlib.h>
  4#include <stdint.h>
  5#include <unistd.h>
  6uint8_t MICROPROBE_STACK[4096]  __attribute__ ((aligned (16)));
  7uint8_t RISCV_V22_CONTEXT_VAR[600] ;
  8char RISCV_V22_SCRATCH_VAR[256]  __attribute__ ((aligned (8)));
  9int64_t COUNT  __attribute__ ((aligned (8))) = 3405695742;
 10uint8_t LINKEDLIST[80]  = {8,7,6,5,4,3,2,1,32,160,32,171,108,85,0,0,8,7,6,5,4,3,2,1,48,160,32,171,108,85,0,0,8,7,6,5,4,3,2,1,64,160,32,171,108,85,0,0,8,7,6,5,4,3,2,1,80,160,32,171,108,85,0,0,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,};
 11void usage(void)
 12{
 13printf("Usage:\n");
 14printf("  -h  Print this help\n");
 15printf("  -d  Print micro-benchmark description\n");
 16exit(-1);
 17}
 18
 19
 20void description(void)
 21{
 22int exit_code = 0;
 23
 24
 25printf("================================================================================\n");
 26printf("Microprobe framework general information:\n");
 27printf("--------------------------------------------------------------------------------\n");
 28printf("  Microprobe version: 0.5\n");
 29printf("  Copyright: Copyright 2011-2021 IBM Corporation\n");
 30printf("  License: Apache Version 2.0\n");
 31printf("  Authors: Ramon Bertran\n");
 32printf("  Maintainers: Ramon Bertran\n");
 33printf("  Email: rbertra@us.ibm.com\n");
 34printf("  Software status: Development\n");
 35printf("\n");
 36printf("Development information:\n");
 37printf("--------------------------------------------------------------------------------\n");
 38printf("  No packaged version. Use Git to find the current revision.\n");
 39printf("\n");
 40printf("================================================================================\n");
 41printf("MICRO-BENCHMARK DESCRIPTION\n");
 42printf("--------------------------------------------------------------------------------\n");
 43printf("Generation time: 06/27/24 15:15:36 EDT\n");
 44printf("Generation policy:\n");
 45printf("  Step: 0 InitializeRegistersPass   Initialize general registers to:  'None' and\n");
 46printf("                                    FP registers to 'None' and Vector register t\n");
 47printf("                                    o 'None'\n");
 48printf("  Step: 1 SimpleBuildingBlockPass   Create a basic block with '19' instructions\n");
 49printf("  Step: 2    DeclareVariablesPass   Declaring variables: ['(int64_t) COUNT', '(u\n");
 50printf("                                    int8_t) LINKEDLIST[80]', '(uint8_t) MICROPROB\n");
 51printf("                                    E_STACK[4096]']\n");
 52printf("  Step: 3   ReproduceSequencePass            Reproduce instruction sequence\n");
 53printf("\n");
 54printf("Configured target:\n");
 55printf("  Target ISA: riscv_v22\n");
 56printf("  ISA Description: RISC-V v2.2\n");
 57printf("  Target Micro-architecture: riscv_generic\n");
 58printf("  Micro-architecture Description: Generic RISC-V microarchitecture\n");
 59printf("  Target Environment: riscv64_linux_gcc\n");
 60printf("  Environment description: RISC-V architecture (64bit addressing mode), Linux operating system, GCC compiler\n");
 61printf("\n");
 62printf("Target requirements:\n");
 63printf("\n");
 64printf("Warnings (includes not checkable requirements):\n");
 65printf("  Warning  0 - Pass 000: InitializeRegistersPass did not pass the check test\n");
 66printf("  Warning  1 - Pass 002: DeclareVariablesPass did not pass the check test\n");
 67printf("  Warning  2 - Pass 003: ReproduceSequencePass did not pass the check test\n");
 68printf("\n");
 69printf("Other Information\n");
 70printf("\n");
 71
 72
 73exit(3);
 74}
 75
 76
 77void process_parameters(int argc, char **argv, char **envp)
 78{
 79if (argc == 1) {printf("Running micro-benchmark...\n"); return;}
 80if (argc > 2) {usage();}
 81if (argv[1][0] != '-') {usage();}
 82if (argv[1][1] == 'h') {usage();}
 83else if (argv[1][1] == 'd') {description();}
 84else {usage();}
 85}
 86
 87
 88int main(int argc, char **argv, char **envp)
 89{
 90process_parameters(argc, argv, envp);
 91{FILE *devrandom = fopen("/dev/urandom", "r");
 92fread(&RISCV_V22_CONTEXT_VAR, sizeof(uint8_t), 600 , devrandom);
 93fclose(devrandom);}
 94{for (int i=0;i<256;i=i+256) memcpy(&RISCV_V22_SCRATCH_VAR[i], &RISCV_V22_CONTEXT_VAR, 256);}
 95{for (int i=0;i<3600;i=i+600) memcpy(&MICROPROBE_STACK[i], &RISCV_V22_CONTEXT_VAR, 600);}
 96{for (int i=3600;i<4096;i=i+496) memcpy(&MICROPROBE_STACK[i], &RISCV_V22_CONTEXT_VAR, 496);}
 97__asm__(" RISCV_V22_CONTEXT_VAR_pcrel_1:AUIPC x31, %pcrel_hi(RISCV_V22_CONTEXT_VAR) ");
 98__asm__(" ADDI x31, x31, %pcrel_lo(RISCV_V22_CONTEXT_VAR_pcrel_1) ");
 99__asm__(" SD x0, 0x0(x31) ");
100__asm__(" SD x1, 0x8(x31) ");
101__asm__(" SD x2, 0x10(x31) ");
102__asm__(" SD x3, 0x18(x31) ");
103__asm__(" SD x4, 0x20(x31) ");
104__asm__(" SD x5, 0x28(x31) ");
105__asm__(" SD x6, 0x30(x31) ");
106__asm__(" SD x7, 0x38(x31) ");
107__asm__(" SD x8, 0x40(x31) ");
108__asm__(" SD x9, 0x48(x31) ");
109__asm__(" SD x10, 0x50(x31) ");
110__asm__(" SD x11, 0x58(x31) ");
111__asm__(" SD x12, 0x60(x31) ");
112__asm__(" SD x13, 0x68(x31) ");
113__asm__(" SD x14, 0x70(x31) ");
114__asm__(" SD x15, 0x78(x31) ");
115__asm__(" SD x16, 0x80(x31) ");
116__asm__(" SD x17, 0x88(x31) ");
117__asm__(" SD x18, 0x90(x31) ");
118__asm__(" SD x19, 0x98(x31) ");
119__asm__(" SD x20, 0xa0(x31) ");
120__asm__(" SD x21, 0xa8(x31) ");
121__asm__(" SD x22, 0xb0(x31) ");
122__asm__(" SD x23, 0xb8(x31) ");
123__asm__(" SD x24, 0xc0(x31) ");
124__asm__(" SD x25, 0xc8(x31) ");
125__asm__(" SD x26, 0xd0(x31) ");
126__asm__(" SD x27, 0xd8(x31) ");
127__asm__(" SD x28, 0xe0(x31) ");
128__asm__(" SD x29, 0xe8(x31) ");
129__asm__(" SD x30, 0xf0(x31) ");
130__asm__(" SD x31, 0xf8(x31) ");
131__asm__(" FSD f0, 0x100(x31) ");
132__asm__(" FSD f1, 0x108(x31) ");
133__asm__(" FSD f2, 0x110(x31) ");
134__asm__(" FSD f3, 0x118(x31) ");
135__asm__(" FSD f4, 0x120(x31) ");
136__asm__(" FSD f5, 0x128(x31) ");
137__asm__(" FSD f6, 0x130(x31) ");
138__asm__(" FSD f7, 0x138(x31) ");
139__asm__(" FSD f8, 0x140(x31) ");
140__asm__(" FSD f9, 0x148(x31) ");
141__asm__(" FSD f10, 0x150(x31) ");
142__asm__(" FSD f11, 0x158(x31) ");
143__asm__(" FSD f12, 0x160(x31) ");
144__asm__(" FSD f13, 0x168(x31) ");
145__asm__(" FSD f14, 0x170(x31) ");
146__asm__(" FSD f15, 0x178(x31) ");
147__asm__(" FSD f16, 0x180(x31) ");
148__asm__(" FSD f17, 0x188(x31) ");
149__asm__(" FSD f18, 0x190(x31) ");
150__asm__(" FSD f19, 0x198(x31) ");
151__asm__(" FSD f20, 0x1a0(x31) ");
152__asm__(" FSD f21, 0x1a8(x31) ");
153__asm__(" FSD f22, 0x1b0(x31) ");
154__asm__(" FSD f23, 0x1b8(x31) ");
155__asm__(" FSD f24, 0x1c0(x31) ");
156__asm__(" FSD f25, 0x1c8(x31) ");
157__asm__(" FSD f26, 0x1d0(x31) ");
158__asm__(" FSD f27, 0x1d8(x31) ");
159__asm__(" FSD f28, 0x1e0(x31) ");
160__asm__(" FSD f29, 0x1e8(x31) ");
161__asm__(" FSD f30, 0x1f0(x31) ");
162__asm__(" FSD f31, 0x1f8(x31) ");
163__asm__(".balign 64");
164while(1)
165{
166__asm__(" ELF_ABI_START:JAL x1, C2MPT_FUNCTION ");
167__asm__(" JAL x1, ELF_ABI_EXIT ");
168__asm__(" C2MPT_FUNCTION:LUI x12, 65600 ");
169__asm__(" ADDI x12, x12, 0x0 ");
170__asm__(" LD x15, 0x8(x12) ");
171__asm__(" LD x14, 0x50(x12) ");
172__asm__(" BEQ x15, x0, C2MPT_FUNCTION+0x24 ");
173__asm__(" LD x13, 0x0(x15) ");
174__asm__(" LD x15, 0x8(x15) ");
175__asm__(" ADD x14, x14, x13 ");
176__asm__(" BNE x15, x0, C2MPT_FUNCTION+0x14 ");
177__asm__(" SLLI x14, x14, 1 ");
178__asm__(" SD x14, 0x50(x12) ");
179__asm__(" JALR x0, 0x0(x1) ");
180__asm__(" MY_SUBROUTINE:SLLI x10, x10, 1 ");
181__asm__(" LUI x15, 65600 ");
182__asm__(" SD x10, 0x50(x15) ");
183__asm__(" JALR x0, 0x0(x1) ");
184__asm__(" ELF_ABI_EXIT:ADDI x0, x0, 0x0 ");
185}
186__asm__(" RISCV_V22_CONTEXT_VAR_pcrel_2:AUIPC x31, %pcrel_hi(RISCV_V22_CONTEXT_VAR) ");
187__asm__(" ADDI x31, x31, %pcrel_lo(RISCV_V22_CONTEXT_VAR_pcrel_2) ");
188__asm__(" LD x0, 0x0(x31) ");
189__asm__(" LD x1, 0x8(x31) ");
190__asm__(" LD x2, 0x10(x31) ");
191__asm__(" LD x3, 0x18(x31) ");
192__asm__(" LD x4, 0x20(x31) ");
193__asm__(" LD x5, 0x28(x31) ");
194__asm__(" LD x6, 0x30(x31) ");
195__asm__(" LD x7, 0x38(x31) ");
196__asm__(" LD x8, 0x40(x31) ");
197__asm__(" LD x9, 0x48(x31) ");
198__asm__(" LD x10, 0x50(x31) ");
199__asm__(" LD x11, 0x58(x31) ");
200__asm__(" LD x12, 0x60(x31) ");
201__asm__(" LD x13, 0x68(x31) ");
202__asm__(" LD x14, 0x70(x31) ");
203__asm__(" LD x15, 0x78(x31) ");
204__asm__(" LD x16, 0x80(x31) ");
205__asm__(" LD x17, 0x88(x31) ");
206__asm__(" LD x18, 0x90(x31) ");
207__asm__(" LD x19, 0x98(x31) ");
208__asm__(" LD x20, 0xa0(x31) ");
209__asm__(" LD x21, 0xa8(x31) ");
210__asm__(" LD x22, 0xb0(x31) ");
211__asm__(" LD x23, 0xb8(x31) ");
212__asm__(" LD x24, 0xc0(x31) ");
213__asm__(" LD x25, 0xc8(x31) ");
214__asm__(" LD x26, 0xd0(x31) ");
215__asm__(" LD x27, 0xd8(x31) ");
216__asm__(" LD x28, 0xe0(x31) ");
217__asm__(" LD x29, 0xe8(x31) ");
218__asm__(" LD x30, 0xf0(x31) ");
219__asm__(" FLD f0, 0x100(x31) ");
220__asm__(" FLD f1, 0x108(x31) ");
221__asm__(" FLD f2, 0x110(x31) ");
222__asm__(" FLD f3, 0x118(x31) ");
223__asm__(" FLD f4, 0x120(x31) ");
224__asm__(" FLD f5, 0x128(x31) ");
225__asm__(" FLD f6, 0x130(x31) ");
226__asm__(" FLD f7, 0x138(x31) ");
227__asm__(" FLD f8, 0x140(x31) ");
228__asm__(" FLD f9, 0x148(x31) ");
229__asm__(" FLD f10, 0x150(x31) ");
230__asm__(" FLD f11, 0x158(x31) ");
231__asm__(" FLD f12, 0x160(x31) ");
232__asm__(" FLD f13, 0x168(x31) ");
233__asm__(" FLD f14, 0x170(x31) ");
234__asm__(" FLD f15, 0x178(x31) ");
235__asm__(" FLD f16, 0x180(x31) ");
236__asm__(" FLD f17, 0x188(x31) ");
237__asm__(" FLD f18, 0x190(x31) ");
238__asm__(" FLD f19, 0x198(x31) ");
239__asm__(" FLD f20, 0x1a0(x31) ");
240__asm__(" FLD f21, 0x1a8(x31) ");
241__asm__(" FLD f22, 0x1b0(x31) ");
242__asm__(" FLD f23, 0x1b8(x31) ");
243__asm__(" FLD f24, 0x1c0(x31) ");
244__asm__(" FLD f25, 0x1c8(x31) ");
245__asm__(" FLD f26, 0x1d0(x31) ");
246__asm__(" FLD f27, 0x1d8(x31) ");
247__asm__(" FLD f28, 0x1e0(x31) ");
248__asm__(" FLD f29, 0x1e8(x31) ");
249__asm__(" FLD f30, 0x1f0(x31) ");
250__asm__(" FLD f31, 0x1f8(x31) ");
251__asm__(" LD x31, 0xf8(x31) ");
252
253}