15ffd83dbSDimitry Andric //===-- ABISysV_arm.cpp ---------------------------------------------------===//
25ffd83dbSDimitry Andric //
35ffd83dbSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45ffd83dbSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
55ffd83dbSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
65ffd83dbSDimitry Andric //
75ffd83dbSDimitry Andric //===----------------------------------------------------------------------===//
85ffd83dbSDimitry Andric
95ffd83dbSDimitry Andric #include "ABISysV_arm.h"
105ffd83dbSDimitry Andric
11bdd1243dSDimitry Andric #include <optional>
125ffd83dbSDimitry Andric #include <vector>
135ffd83dbSDimitry Andric
145ffd83dbSDimitry Andric #include "llvm/ADT/STLExtras.h"
15*06c3fb27SDimitry Andric #include "llvm/TargetParser/Triple.h"
165ffd83dbSDimitry Andric
175ffd83dbSDimitry Andric #include "lldb/Core/Module.h"
185ffd83dbSDimitry Andric #include "lldb/Core/PluginManager.h"
195ffd83dbSDimitry Andric #include "lldb/Core/Value.h"
205ffd83dbSDimitry Andric #include "lldb/Core/ValueObjectConstResult.h"
215ffd83dbSDimitry Andric #include "lldb/Symbol/UnwindPlan.h"
225ffd83dbSDimitry Andric #include "lldb/Target/Process.h"
235ffd83dbSDimitry Andric #include "lldb/Target/RegisterContext.h"
245ffd83dbSDimitry Andric #include "lldb/Target/Target.h"
255ffd83dbSDimitry Andric #include "lldb/Target/Thread.h"
265ffd83dbSDimitry Andric #include "lldb/Utility/ConstString.h"
275ffd83dbSDimitry Andric #include "lldb/Utility/RegisterValue.h"
285ffd83dbSDimitry Andric #include "lldb/Utility/Scalar.h"
295ffd83dbSDimitry Andric #include "lldb/Utility/Status.h"
305ffd83dbSDimitry Andric
315ffd83dbSDimitry Andric #include "Plugins/Process/Utility/ARMDefines.h"
325ffd83dbSDimitry Andric #include "Utility/ARM_DWARF_Registers.h"
335ffd83dbSDimitry Andric #include "Utility/ARM_ehframe_Registers.h"
345ffd83dbSDimitry Andric
355ffd83dbSDimitry Andric using namespace lldb;
365ffd83dbSDimitry Andric using namespace lldb_private;
375ffd83dbSDimitry Andric
385ffd83dbSDimitry Andric LLDB_PLUGIN_DEFINE(ABISysV_arm)
395ffd83dbSDimitry Andric
40e8d8bef9SDimitry Andric static const RegisterInfo g_register_infos[] = {
415ffd83dbSDimitry Andric // NAME ALT SZ OFF ENCODING FORMAT EH_FRAME
425ffd83dbSDimitry Andric // DWARF GENERIC PROCESS PLUGIN
435ffd83dbSDimitry Andric // LLDB NATIVE VALUE REGS INVALIDATE REGS
445ffd83dbSDimitry Andric // ========== ======= == === ============= ============
455ffd83dbSDimitry Andric // ======================= =================== ===========================
465ffd83dbSDimitry Andric // ======================= ====================== ==========
475ffd83dbSDimitry Andric // ===============
485ffd83dbSDimitry Andric {"r0",
49349cc55cSDimitry Andric nullptr,
505ffd83dbSDimitry Andric 4,
515ffd83dbSDimitry Andric 0,
525ffd83dbSDimitry Andric eEncodingUint,
535ffd83dbSDimitry Andric eFormatHex,
545ffd83dbSDimitry Andric {ehframe_r0, dwarf_r0, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM,
555ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
565ffd83dbSDimitry Andric nullptr,
575ffd83dbSDimitry Andric nullptr,
58*06c3fb27SDimitry Andric nullptr,
59349cc55cSDimitry Andric },
605ffd83dbSDimitry Andric {"r1",
61349cc55cSDimitry Andric nullptr,
625ffd83dbSDimitry Andric 4,
635ffd83dbSDimitry Andric 0,
645ffd83dbSDimitry Andric eEncodingUint,
655ffd83dbSDimitry Andric eFormatHex,
665ffd83dbSDimitry Andric {ehframe_r1, dwarf_r1, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM,
675ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
685ffd83dbSDimitry Andric nullptr,
695ffd83dbSDimitry Andric nullptr,
70*06c3fb27SDimitry Andric nullptr,
71349cc55cSDimitry Andric },
725ffd83dbSDimitry Andric {"r2",
73349cc55cSDimitry Andric nullptr,
745ffd83dbSDimitry Andric 4,
755ffd83dbSDimitry Andric 0,
765ffd83dbSDimitry Andric eEncodingUint,
775ffd83dbSDimitry Andric eFormatHex,
785ffd83dbSDimitry Andric {ehframe_r2, dwarf_r2, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM,
795ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
805ffd83dbSDimitry Andric nullptr,
815ffd83dbSDimitry Andric nullptr,
82*06c3fb27SDimitry Andric nullptr,
83349cc55cSDimitry Andric },
845ffd83dbSDimitry Andric {"r3",
85349cc55cSDimitry Andric nullptr,
865ffd83dbSDimitry Andric 4,
875ffd83dbSDimitry Andric 0,
885ffd83dbSDimitry Andric eEncodingUint,
895ffd83dbSDimitry Andric eFormatHex,
905ffd83dbSDimitry Andric {ehframe_r3, dwarf_r3, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM,
915ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
925ffd83dbSDimitry Andric nullptr,
935ffd83dbSDimitry Andric nullptr,
94*06c3fb27SDimitry Andric nullptr,
95349cc55cSDimitry Andric },
965ffd83dbSDimitry Andric {"r4",
975ffd83dbSDimitry Andric nullptr,
985ffd83dbSDimitry Andric 4,
995ffd83dbSDimitry Andric 0,
1005ffd83dbSDimitry Andric eEncodingUint,
1015ffd83dbSDimitry Andric eFormatHex,
1025ffd83dbSDimitry Andric {ehframe_r4, dwarf_r4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
1035ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
1045ffd83dbSDimitry Andric nullptr,
1055ffd83dbSDimitry Andric nullptr,
106*06c3fb27SDimitry Andric nullptr,
107349cc55cSDimitry Andric },
1085ffd83dbSDimitry Andric {"r5",
1095ffd83dbSDimitry Andric nullptr,
1105ffd83dbSDimitry Andric 4,
1115ffd83dbSDimitry Andric 0,
1125ffd83dbSDimitry Andric eEncodingUint,
1135ffd83dbSDimitry Andric eFormatHex,
1145ffd83dbSDimitry Andric {ehframe_r5, dwarf_r5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
1155ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
1165ffd83dbSDimitry Andric nullptr,
1175ffd83dbSDimitry Andric nullptr,
118*06c3fb27SDimitry Andric nullptr,
119349cc55cSDimitry Andric },
1205ffd83dbSDimitry Andric {"r6",
1215ffd83dbSDimitry Andric nullptr,
1225ffd83dbSDimitry Andric 4,
1235ffd83dbSDimitry Andric 0,
1245ffd83dbSDimitry Andric eEncodingUint,
1255ffd83dbSDimitry Andric eFormatHex,
1265ffd83dbSDimitry Andric {ehframe_r6, dwarf_r6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
1275ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
1285ffd83dbSDimitry Andric nullptr,
1295ffd83dbSDimitry Andric nullptr,
130*06c3fb27SDimitry Andric nullptr,
131349cc55cSDimitry Andric },
1325ffd83dbSDimitry Andric {"r7",
1335ffd83dbSDimitry Andric nullptr,
1345ffd83dbSDimitry Andric 4,
1355ffd83dbSDimitry Andric 0,
1365ffd83dbSDimitry Andric eEncodingUint,
1375ffd83dbSDimitry Andric eFormatHex,
1385ffd83dbSDimitry Andric {ehframe_r7, dwarf_r7, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM,
1395ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
1405ffd83dbSDimitry Andric nullptr,
1415ffd83dbSDimitry Andric nullptr,
142*06c3fb27SDimitry Andric nullptr,
143349cc55cSDimitry Andric },
1445ffd83dbSDimitry Andric {"r8",
1455ffd83dbSDimitry Andric nullptr,
1465ffd83dbSDimitry Andric 4,
1475ffd83dbSDimitry Andric 0,
1485ffd83dbSDimitry Andric eEncodingUint,
1495ffd83dbSDimitry Andric eFormatHex,
1505ffd83dbSDimitry Andric {ehframe_r8, dwarf_r8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
1515ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
1525ffd83dbSDimitry Andric nullptr,
1535ffd83dbSDimitry Andric nullptr,
154*06c3fb27SDimitry Andric nullptr,
155349cc55cSDimitry Andric },
1565ffd83dbSDimitry Andric {"r9",
1575ffd83dbSDimitry Andric nullptr,
1585ffd83dbSDimitry Andric 4,
1595ffd83dbSDimitry Andric 0,
1605ffd83dbSDimitry Andric eEncodingUint,
1615ffd83dbSDimitry Andric eFormatHex,
1625ffd83dbSDimitry Andric {ehframe_r9, dwarf_r9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
1635ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
1645ffd83dbSDimitry Andric nullptr,
1655ffd83dbSDimitry Andric nullptr,
166*06c3fb27SDimitry Andric nullptr,
167349cc55cSDimitry Andric },
1685ffd83dbSDimitry Andric {"r10",
1695ffd83dbSDimitry Andric nullptr,
1705ffd83dbSDimitry Andric 4,
1715ffd83dbSDimitry Andric 0,
1725ffd83dbSDimitry Andric eEncodingUint,
1735ffd83dbSDimitry Andric eFormatHex,
1745ffd83dbSDimitry Andric {ehframe_r10, dwarf_r10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
1755ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
1765ffd83dbSDimitry Andric nullptr,
1775ffd83dbSDimitry Andric nullptr,
178*06c3fb27SDimitry Andric nullptr,
179349cc55cSDimitry Andric },
1805ffd83dbSDimitry Andric {"r11",
1815ffd83dbSDimitry Andric nullptr,
1825ffd83dbSDimitry Andric 4,
1835ffd83dbSDimitry Andric 0,
1845ffd83dbSDimitry Andric eEncodingUint,
1855ffd83dbSDimitry Andric eFormatHex,
1865ffd83dbSDimitry Andric {ehframe_r11, dwarf_r11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
1875ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
1885ffd83dbSDimitry Andric nullptr,
1895ffd83dbSDimitry Andric nullptr,
190*06c3fb27SDimitry Andric nullptr,
191349cc55cSDimitry Andric },
1925ffd83dbSDimitry Andric {"r12",
1935ffd83dbSDimitry Andric nullptr,
1945ffd83dbSDimitry Andric 4,
1955ffd83dbSDimitry Andric 0,
1965ffd83dbSDimitry Andric eEncodingUint,
1975ffd83dbSDimitry Andric eFormatHex,
1985ffd83dbSDimitry Andric {ehframe_r12, dwarf_r12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
1995ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2005ffd83dbSDimitry Andric nullptr,
2015ffd83dbSDimitry Andric nullptr,
202*06c3fb27SDimitry Andric nullptr,
203349cc55cSDimitry Andric },
2045ffd83dbSDimitry Andric {"sp",
2055ffd83dbSDimitry Andric "r13",
2065ffd83dbSDimitry Andric 4,
2075ffd83dbSDimitry Andric 0,
2085ffd83dbSDimitry Andric eEncodingUint,
2095ffd83dbSDimitry Andric eFormatHex,
2105ffd83dbSDimitry Andric {ehframe_sp, dwarf_sp, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM,
2115ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2125ffd83dbSDimitry Andric nullptr,
2135ffd83dbSDimitry Andric nullptr,
214*06c3fb27SDimitry Andric nullptr,
215349cc55cSDimitry Andric },
2165ffd83dbSDimitry Andric {"lr",
2175ffd83dbSDimitry Andric "r14",
2185ffd83dbSDimitry Andric 4,
2195ffd83dbSDimitry Andric 0,
2205ffd83dbSDimitry Andric eEncodingUint,
2215ffd83dbSDimitry Andric eFormatHex,
2225ffd83dbSDimitry Andric {ehframe_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA, LLDB_INVALID_REGNUM,
2235ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2245ffd83dbSDimitry Andric nullptr,
2255ffd83dbSDimitry Andric nullptr,
226*06c3fb27SDimitry Andric nullptr,
227349cc55cSDimitry Andric },
2285ffd83dbSDimitry Andric {"pc",
2295ffd83dbSDimitry Andric "r15",
2305ffd83dbSDimitry Andric 4,
2315ffd83dbSDimitry Andric 0,
2325ffd83dbSDimitry Andric eEncodingUint,
2335ffd83dbSDimitry Andric eFormatHex,
2345ffd83dbSDimitry Andric {ehframe_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM,
2355ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2365ffd83dbSDimitry Andric nullptr,
2375ffd83dbSDimitry Andric nullptr,
238*06c3fb27SDimitry Andric nullptr,
239349cc55cSDimitry Andric },
2405ffd83dbSDimitry Andric {"cpsr",
2415ffd83dbSDimitry Andric "psr",
2425ffd83dbSDimitry Andric 4,
2435ffd83dbSDimitry Andric 0,
2445ffd83dbSDimitry Andric eEncodingUint,
2455ffd83dbSDimitry Andric eFormatHex,
2465ffd83dbSDimitry Andric {ehframe_cpsr, dwarf_cpsr, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM,
2475ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2485ffd83dbSDimitry Andric nullptr,
2495ffd83dbSDimitry Andric nullptr,
250*06c3fb27SDimitry Andric nullptr,
251349cc55cSDimitry Andric },
2525ffd83dbSDimitry Andric {"s0",
2535ffd83dbSDimitry Andric nullptr,
2545ffd83dbSDimitry Andric 4,
2555ffd83dbSDimitry Andric 0,
2565ffd83dbSDimitry Andric eEncodingIEEE754,
2575ffd83dbSDimitry Andric eFormatFloat,
2585ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
2595ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2605ffd83dbSDimitry Andric nullptr,
2615ffd83dbSDimitry Andric nullptr,
262*06c3fb27SDimitry Andric nullptr,
263349cc55cSDimitry Andric },
2645ffd83dbSDimitry Andric {"s1",
2655ffd83dbSDimitry Andric nullptr,
2665ffd83dbSDimitry Andric 4,
2675ffd83dbSDimitry Andric 0,
2685ffd83dbSDimitry Andric eEncodingIEEE754,
2695ffd83dbSDimitry Andric eFormatFloat,
2705ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
2715ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2725ffd83dbSDimitry Andric nullptr,
2735ffd83dbSDimitry Andric nullptr,
274*06c3fb27SDimitry Andric nullptr,
275349cc55cSDimitry Andric },
2765ffd83dbSDimitry Andric {"s2",
2775ffd83dbSDimitry Andric nullptr,
2785ffd83dbSDimitry Andric 4,
2795ffd83dbSDimitry Andric 0,
2805ffd83dbSDimitry Andric eEncodingIEEE754,
2815ffd83dbSDimitry Andric eFormatFloat,
2825ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
2835ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2845ffd83dbSDimitry Andric nullptr,
2855ffd83dbSDimitry Andric nullptr,
286*06c3fb27SDimitry Andric nullptr,
287349cc55cSDimitry Andric },
2885ffd83dbSDimitry Andric {"s3",
2895ffd83dbSDimitry Andric nullptr,
2905ffd83dbSDimitry Andric 4,
2915ffd83dbSDimitry Andric 0,
2925ffd83dbSDimitry Andric eEncodingIEEE754,
2935ffd83dbSDimitry Andric eFormatFloat,
2945ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
2955ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
2965ffd83dbSDimitry Andric nullptr,
2975ffd83dbSDimitry Andric nullptr,
298*06c3fb27SDimitry Andric nullptr,
299349cc55cSDimitry Andric },
3005ffd83dbSDimitry Andric {"s4",
3015ffd83dbSDimitry Andric nullptr,
3025ffd83dbSDimitry Andric 4,
3035ffd83dbSDimitry Andric 0,
3045ffd83dbSDimitry Andric eEncodingIEEE754,
3055ffd83dbSDimitry Andric eFormatFloat,
3065ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
3075ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
3085ffd83dbSDimitry Andric nullptr,
3095ffd83dbSDimitry Andric nullptr,
310*06c3fb27SDimitry Andric nullptr,
311349cc55cSDimitry Andric },
3125ffd83dbSDimitry Andric {"s5",
3135ffd83dbSDimitry Andric nullptr,
3145ffd83dbSDimitry Andric 4,
3155ffd83dbSDimitry Andric 0,
3165ffd83dbSDimitry Andric eEncodingIEEE754,
3175ffd83dbSDimitry Andric eFormatFloat,
3185ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
3195ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
3205ffd83dbSDimitry Andric nullptr,
3215ffd83dbSDimitry Andric nullptr,
322*06c3fb27SDimitry Andric nullptr,
323349cc55cSDimitry Andric },
3245ffd83dbSDimitry Andric {"s6",
3255ffd83dbSDimitry Andric nullptr,
3265ffd83dbSDimitry Andric 4,
3275ffd83dbSDimitry Andric 0,
3285ffd83dbSDimitry Andric eEncodingIEEE754,
3295ffd83dbSDimitry Andric eFormatFloat,
3305ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
3315ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
3325ffd83dbSDimitry Andric nullptr,
3335ffd83dbSDimitry Andric nullptr,
334*06c3fb27SDimitry Andric nullptr,
335349cc55cSDimitry Andric },
3365ffd83dbSDimitry Andric {"s7",
3375ffd83dbSDimitry Andric nullptr,
3385ffd83dbSDimitry Andric 4,
3395ffd83dbSDimitry Andric 0,
3405ffd83dbSDimitry Andric eEncodingIEEE754,
3415ffd83dbSDimitry Andric eFormatFloat,
3425ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
3435ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
3445ffd83dbSDimitry Andric nullptr,
3455ffd83dbSDimitry Andric nullptr,
346*06c3fb27SDimitry Andric nullptr,
347349cc55cSDimitry Andric },
3485ffd83dbSDimitry Andric {"s8",
3495ffd83dbSDimitry Andric nullptr,
3505ffd83dbSDimitry Andric 4,
3515ffd83dbSDimitry Andric 0,
3525ffd83dbSDimitry Andric eEncodingIEEE754,
3535ffd83dbSDimitry Andric eFormatFloat,
3545ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
3555ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
3565ffd83dbSDimitry Andric nullptr,
3575ffd83dbSDimitry Andric nullptr,
358*06c3fb27SDimitry Andric nullptr,
359349cc55cSDimitry Andric },
3605ffd83dbSDimitry Andric {"s9",
3615ffd83dbSDimitry Andric nullptr,
3625ffd83dbSDimitry Andric 4,
3635ffd83dbSDimitry Andric 0,
3645ffd83dbSDimitry Andric eEncodingIEEE754,
3655ffd83dbSDimitry Andric eFormatFloat,
3665ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
3675ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
3685ffd83dbSDimitry Andric nullptr,
3695ffd83dbSDimitry Andric nullptr,
370*06c3fb27SDimitry Andric nullptr,
371349cc55cSDimitry Andric },
3725ffd83dbSDimitry Andric {"s10",
3735ffd83dbSDimitry Andric nullptr,
3745ffd83dbSDimitry Andric 4,
3755ffd83dbSDimitry Andric 0,
3765ffd83dbSDimitry Andric eEncodingIEEE754,
3775ffd83dbSDimitry Andric eFormatFloat,
3785ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
3795ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
3805ffd83dbSDimitry Andric nullptr,
3815ffd83dbSDimitry Andric nullptr,
382*06c3fb27SDimitry Andric nullptr,
383349cc55cSDimitry Andric },
3845ffd83dbSDimitry Andric {"s11",
3855ffd83dbSDimitry Andric nullptr,
3865ffd83dbSDimitry Andric 4,
3875ffd83dbSDimitry Andric 0,
3885ffd83dbSDimitry Andric eEncodingIEEE754,
3895ffd83dbSDimitry Andric eFormatFloat,
3905ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
3915ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
3925ffd83dbSDimitry Andric nullptr,
3935ffd83dbSDimitry Andric nullptr,
394*06c3fb27SDimitry Andric nullptr,
395349cc55cSDimitry Andric },
3965ffd83dbSDimitry Andric {"s12",
3975ffd83dbSDimitry Andric nullptr,
3985ffd83dbSDimitry Andric 4,
3995ffd83dbSDimitry Andric 0,
4005ffd83dbSDimitry Andric eEncodingIEEE754,
4015ffd83dbSDimitry Andric eFormatFloat,
4025ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4035ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
4045ffd83dbSDimitry Andric nullptr,
4055ffd83dbSDimitry Andric nullptr,
406*06c3fb27SDimitry Andric nullptr,
407349cc55cSDimitry Andric },
4085ffd83dbSDimitry Andric {"s13",
4095ffd83dbSDimitry Andric nullptr,
4105ffd83dbSDimitry Andric 4,
4115ffd83dbSDimitry Andric 0,
4125ffd83dbSDimitry Andric eEncodingIEEE754,
4135ffd83dbSDimitry Andric eFormatFloat,
4145ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4155ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
4165ffd83dbSDimitry Andric nullptr,
4175ffd83dbSDimitry Andric nullptr,
418*06c3fb27SDimitry Andric nullptr,
419349cc55cSDimitry Andric },
4205ffd83dbSDimitry Andric {"s14",
4215ffd83dbSDimitry Andric nullptr,
4225ffd83dbSDimitry Andric 4,
4235ffd83dbSDimitry Andric 0,
4245ffd83dbSDimitry Andric eEncodingIEEE754,
4255ffd83dbSDimitry Andric eFormatFloat,
4265ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4275ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
4285ffd83dbSDimitry Andric nullptr,
4295ffd83dbSDimitry Andric nullptr,
430*06c3fb27SDimitry Andric nullptr,
431349cc55cSDimitry Andric },
4325ffd83dbSDimitry Andric {"s15",
4335ffd83dbSDimitry Andric nullptr,
4345ffd83dbSDimitry Andric 4,
4355ffd83dbSDimitry Andric 0,
4365ffd83dbSDimitry Andric eEncodingIEEE754,
4375ffd83dbSDimitry Andric eFormatFloat,
4385ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4395ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
4405ffd83dbSDimitry Andric nullptr,
4415ffd83dbSDimitry Andric nullptr,
442*06c3fb27SDimitry Andric nullptr,
443349cc55cSDimitry Andric },
4445ffd83dbSDimitry Andric {"s16",
4455ffd83dbSDimitry Andric nullptr,
4465ffd83dbSDimitry Andric 4,
4475ffd83dbSDimitry Andric 0,
4485ffd83dbSDimitry Andric eEncodingIEEE754,
4495ffd83dbSDimitry Andric eFormatFloat,
4505ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4515ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
4525ffd83dbSDimitry Andric nullptr,
4535ffd83dbSDimitry Andric nullptr,
454*06c3fb27SDimitry Andric nullptr,
455349cc55cSDimitry Andric },
4565ffd83dbSDimitry Andric {"s17",
4575ffd83dbSDimitry Andric nullptr,
4585ffd83dbSDimitry Andric 4,
4595ffd83dbSDimitry Andric 0,
4605ffd83dbSDimitry Andric eEncodingIEEE754,
4615ffd83dbSDimitry Andric eFormatFloat,
4625ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4635ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
4645ffd83dbSDimitry Andric nullptr,
4655ffd83dbSDimitry Andric nullptr,
466*06c3fb27SDimitry Andric nullptr,
467349cc55cSDimitry Andric },
4685ffd83dbSDimitry Andric {"s18",
4695ffd83dbSDimitry Andric nullptr,
4705ffd83dbSDimitry Andric 4,
4715ffd83dbSDimitry Andric 0,
4725ffd83dbSDimitry Andric eEncodingIEEE754,
4735ffd83dbSDimitry Andric eFormatFloat,
4745ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4755ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
4765ffd83dbSDimitry Andric nullptr,
4775ffd83dbSDimitry Andric nullptr,
478*06c3fb27SDimitry Andric nullptr,
479349cc55cSDimitry Andric },
4805ffd83dbSDimitry Andric {"s19",
4815ffd83dbSDimitry Andric nullptr,
4825ffd83dbSDimitry Andric 4,
4835ffd83dbSDimitry Andric 0,
4845ffd83dbSDimitry Andric eEncodingIEEE754,
4855ffd83dbSDimitry Andric eFormatFloat,
4865ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4875ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
4885ffd83dbSDimitry Andric nullptr,
4895ffd83dbSDimitry Andric nullptr,
490*06c3fb27SDimitry Andric nullptr,
491349cc55cSDimitry Andric },
4925ffd83dbSDimitry Andric {"s20",
4935ffd83dbSDimitry Andric nullptr,
4945ffd83dbSDimitry Andric 4,
4955ffd83dbSDimitry Andric 0,
4965ffd83dbSDimitry Andric eEncodingIEEE754,
4975ffd83dbSDimitry Andric eFormatFloat,
4985ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
4995ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5005ffd83dbSDimitry Andric nullptr,
5015ffd83dbSDimitry Andric nullptr,
502*06c3fb27SDimitry Andric nullptr,
503349cc55cSDimitry Andric },
5045ffd83dbSDimitry Andric {"s21",
5055ffd83dbSDimitry Andric nullptr,
5065ffd83dbSDimitry Andric 4,
5075ffd83dbSDimitry Andric 0,
5085ffd83dbSDimitry Andric eEncodingIEEE754,
5095ffd83dbSDimitry Andric eFormatFloat,
5105ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
5115ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5125ffd83dbSDimitry Andric nullptr,
5135ffd83dbSDimitry Andric nullptr,
514*06c3fb27SDimitry Andric nullptr,
515349cc55cSDimitry Andric },
5165ffd83dbSDimitry Andric {"s22",
5175ffd83dbSDimitry Andric nullptr,
5185ffd83dbSDimitry Andric 4,
5195ffd83dbSDimitry Andric 0,
5205ffd83dbSDimitry Andric eEncodingIEEE754,
5215ffd83dbSDimitry Andric eFormatFloat,
5225ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
5235ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5245ffd83dbSDimitry Andric nullptr,
5255ffd83dbSDimitry Andric nullptr,
526*06c3fb27SDimitry Andric nullptr,
527349cc55cSDimitry Andric },
5285ffd83dbSDimitry Andric {"s23",
5295ffd83dbSDimitry Andric nullptr,
5305ffd83dbSDimitry Andric 4,
5315ffd83dbSDimitry Andric 0,
5325ffd83dbSDimitry Andric eEncodingIEEE754,
5335ffd83dbSDimitry Andric eFormatFloat,
5345ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
5355ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5365ffd83dbSDimitry Andric nullptr,
5375ffd83dbSDimitry Andric nullptr,
538*06c3fb27SDimitry Andric nullptr,
539349cc55cSDimitry Andric },
5405ffd83dbSDimitry Andric {"s24",
5415ffd83dbSDimitry Andric nullptr,
5425ffd83dbSDimitry Andric 4,
5435ffd83dbSDimitry Andric 0,
5445ffd83dbSDimitry Andric eEncodingIEEE754,
5455ffd83dbSDimitry Andric eFormatFloat,
5465ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
5475ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5485ffd83dbSDimitry Andric nullptr,
5495ffd83dbSDimitry Andric nullptr,
550*06c3fb27SDimitry Andric nullptr,
551349cc55cSDimitry Andric },
5525ffd83dbSDimitry Andric {"s25",
5535ffd83dbSDimitry Andric nullptr,
5545ffd83dbSDimitry Andric 4,
5555ffd83dbSDimitry Andric 0,
5565ffd83dbSDimitry Andric eEncodingIEEE754,
5575ffd83dbSDimitry Andric eFormatFloat,
5585ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
5595ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5605ffd83dbSDimitry Andric nullptr,
5615ffd83dbSDimitry Andric nullptr,
562*06c3fb27SDimitry Andric nullptr,
563349cc55cSDimitry Andric },
5645ffd83dbSDimitry Andric {"s26",
5655ffd83dbSDimitry Andric nullptr,
5665ffd83dbSDimitry Andric 4,
5675ffd83dbSDimitry Andric 0,
5685ffd83dbSDimitry Andric eEncodingIEEE754,
5695ffd83dbSDimitry Andric eFormatFloat,
5705ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
5715ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5725ffd83dbSDimitry Andric nullptr,
5735ffd83dbSDimitry Andric nullptr,
574*06c3fb27SDimitry Andric nullptr,
575349cc55cSDimitry Andric },
5765ffd83dbSDimitry Andric {"s27",
5775ffd83dbSDimitry Andric nullptr,
5785ffd83dbSDimitry Andric 4,
5795ffd83dbSDimitry Andric 0,
5805ffd83dbSDimitry Andric eEncodingIEEE754,
5815ffd83dbSDimitry Andric eFormatFloat,
5825ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
5835ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5845ffd83dbSDimitry Andric nullptr,
5855ffd83dbSDimitry Andric nullptr,
586*06c3fb27SDimitry Andric nullptr,
587349cc55cSDimitry Andric },
5885ffd83dbSDimitry Andric {"s28",
5895ffd83dbSDimitry Andric nullptr,
5905ffd83dbSDimitry Andric 4,
5915ffd83dbSDimitry Andric 0,
5925ffd83dbSDimitry Andric eEncodingIEEE754,
5935ffd83dbSDimitry Andric eFormatFloat,
5945ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
5955ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
5965ffd83dbSDimitry Andric nullptr,
5975ffd83dbSDimitry Andric nullptr,
598*06c3fb27SDimitry Andric nullptr,
599349cc55cSDimitry Andric },
6005ffd83dbSDimitry Andric {"s29",
6015ffd83dbSDimitry Andric nullptr,
6025ffd83dbSDimitry Andric 4,
6035ffd83dbSDimitry Andric 0,
6045ffd83dbSDimitry Andric eEncodingIEEE754,
6055ffd83dbSDimitry Andric eFormatFloat,
6065ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
6075ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
6085ffd83dbSDimitry Andric nullptr,
6095ffd83dbSDimitry Andric nullptr,
610*06c3fb27SDimitry Andric nullptr,
611349cc55cSDimitry Andric },
6125ffd83dbSDimitry Andric {"s30",
6135ffd83dbSDimitry Andric nullptr,
6145ffd83dbSDimitry Andric 4,
6155ffd83dbSDimitry Andric 0,
6165ffd83dbSDimitry Andric eEncodingIEEE754,
6175ffd83dbSDimitry Andric eFormatFloat,
6185ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
6195ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
6205ffd83dbSDimitry Andric nullptr,
6215ffd83dbSDimitry Andric nullptr,
622*06c3fb27SDimitry Andric nullptr,
623349cc55cSDimitry Andric },
6245ffd83dbSDimitry Andric {"s31",
6255ffd83dbSDimitry Andric nullptr,
6265ffd83dbSDimitry Andric 4,
6275ffd83dbSDimitry Andric 0,
6285ffd83dbSDimitry Andric eEncodingIEEE754,
6295ffd83dbSDimitry Andric eFormatFloat,
6305ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_s31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
6315ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
6325ffd83dbSDimitry Andric nullptr,
6335ffd83dbSDimitry Andric nullptr,
634*06c3fb27SDimitry Andric nullptr,
635349cc55cSDimitry Andric },
6365ffd83dbSDimitry Andric {"fpscr",
6375ffd83dbSDimitry Andric nullptr,
6385ffd83dbSDimitry Andric 4,
6395ffd83dbSDimitry Andric 0,
6405ffd83dbSDimitry Andric eEncodingUint,
6415ffd83dbSDimitry Andric eFormatHex,
6425ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
6435ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
6445ffd83dbSDimitry Andric nullptr,
6455ffd83dbSDimitry Andric nullptr,
646*06c3fb27SDimitry Andric nullptr,
647349cc55cSDimitry Andric },
6485ffd83dbSDimitry Andric {"d0",
6495ffd83dbSDimitry Andric nullptr,
6505ffd83dbSDimitry Andric 8,
6515ffd83dbSDimitry Andric 0,
6525ffd83dbSDimitry Andric eEncodingIEEE754,
6535ffd83dbSDimitry Andric eFormatFloat,
6545ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
6555ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
6565ffd83dbSDimitry Andric nullptr,
6575ffd83dbSDimitry Andric nullptr,
658*06c3fb27SDimitry Andric nullptr,
659349cc55cSDimitry Andric },
6605ffd83dbSDimitry Andric {"d1",
6615ffd83dbSDimitry Andric nullptr,
6625ffd83dbSDimitry Andric 8,
6635ffd83dbSDimitry Andric 0,
6645ffd83dbSDimitry Andric eEncodingIEEE754,
6655ffd83dbSDimitry Andric eFormatFloat,
6665ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
6675ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
6685ffd83dbSDimitry Andric nullptr,
6695ffd83dbSDimitry Andric nullptr,
670*06c3fb27SDimitry Andric nullptr,
671349cc55cSDimitry Andric },
6725ffd83dbSDimitry Andric {"d2",
6735ffd83dbSDimitry Andric nullptr,
6745ffd83dbSDimitry Andric 8,
6755ffd83dbSDimitry Andric 0,
6765ffd83dbSDimitry Andric eEncodingIEEE754,
6775ffd83dbSDimitry Andric eFormatFloat,
6785ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
6795ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
6805ffd83dbSDimitry Andric nullptr,
6815ffd83dbSDimitry Andric nullptr,
682*06c3fb27SDimitry Andric nullptr,
683349cc55cSDimitry Andric },
6845ffd83dbSDimitry Andric {"d3",
6855ffd83dbSDimitry Andric nullptr,
6865ffd83dbSDimitry Andric 8,
6875ffd83dbSDimitry Andric 0,
6885ffd83dbSDimitry Andric eEncodingIEEE754,
6895ffd83dbSDimitry Andric eFormatFloat,
6905ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
6915ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
6925ffd83dbSDimitry Andric nullptr,
6935ffd83dbSDimitry Andric nullptr,
694*06c3fb27SDimitry Andric nullptr,
695349cc55cSDimitry Andric },
6965ffd83dbSDimitry Andric {"d4",
6975ffd83dbSDimitry Andric nullptr,
6985ffd83dbSDimitry Andric 8,
6995ffd83dbSDimitry Andric 0,
7005ffd83dbSDimitry Andric eEncodingIEEE754,
7015ffd83dbSDimitry Andric eFormatFloat,
7025ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7035ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
7045ffd83dbSDimitry Andric nullptr,
7055ffd83dbSDimitry Andric nullptr,
706*06c3fb27SDimitry Andric nullptr,
707349cc55cSDimitry Andric },
7085ffd83dbSDimitry Andric {"d5",
7095ffd83dbSDimitry Andric nullptr,
7105ffd83dbSDimitry Andric 8,
7115ffd83dbSDimitry Andric 0,
7125ffd83dbSDimitry Andric eEncodingIEEE754,
7135ffd83dbSDimitry Andric eFormatFloat,
7145ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7155ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
7165ffd83dbSDimitry Andric nullptr,
7175ffd83dbSDimitry Andric nullptr,
718*06c3fb27SDimitry Andric nullptr,
719349cc55cSDimitry Andric },
7205ffd83dbSDimitry Andric {"d6",
7215ffd83dbSDimitry Andric nullptr,
7225ffd83dbSDimitry Andric 8,
7235ffd83dbSDimitry Andric 0,
7245ffd83dbSDimitry Andric eEncodingIEEE754,
7255ffd83dbSDimitry Andric eFormatFloat,
7265ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7275ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
7285ffd83dbSDimitry Andric nullptr,
7295ffd83dbSDimitry Andric nullptr,
730*06c3fb27SDimitry Andric nullptr,
731349cc55cSDimitry Andric },
7325ffd83dbSDimitry Andric {"d7",
7335ffd83dbSDimitry Andric nullptr,
7345ffd83dbSDimitry Andric 8,
7355ffd83dbSDimitry Andric 0,
7365ffd83dbSDimitry Andric eEncodingIEEE754,
7375ffd83dbSDimitry Andric eFormatFloat,
7385ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7395ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
7405ffd83dbSDimitry Andric nullptr,
7415ffd83dbSDimitry Andric nullptr,
742*06c3fb27SDimitry Andric nullptr,
743349cc55cSDimitry Andric },
7445ffd83dbSDimitry Andric {"d8",
7455ffd83dbSDimitry Andric nullptr,
7465ffd83dbSDimitry Andric 8,
7475ffd83dbSDimitry Andric 0,
7485ffd83dbSDimitry Andric eEncodingIEEE754,
7495ffd83dbSDimitry Andric eFormatFloat,
7505ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7515ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
7525ffd83dbSDimitry Andric nullptr,
7535ffd83dbSDimitry Andric nullptr,
754*06c3fb27SDimitry Andric nullptr,
755349cc55cSDimitry Andric },
7565ffd83dbSDimitry Andric {"d9",
7575ffd83dbSDimitry Andric nullptr,
7585ffd83dbSDimitry Andric 8,
7595ffd83dbSDimitry Andric 0,
7605ffd83dbSDimitry Andric eEncodingIEEE754,
7615ffd83dbSDimitry Andric eFormatFloat,
7625ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7635ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
7645ffd83dbSDimitry Andric nullptr,
7655ffd83dbSDimitry Andric nullptr,
766*06c3fb27SDimitry Andric nullptr,
767349cc55cSDimitry Andric },
7685ffd83dbSDimitry Andric {"d10",
7695ffd83dbSDimitry Andric nullptr,
7705ffd83dbSDimitry Andric 8,
7715ffd83dbSDimitry Andric 0,
7725ffd83dbSDimitry Andric eEncodingIEEE754,
7735ffd83dbSDimitry Andric eFormatFloat,
7745ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7755ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
7765ffd83dbSDimitry Andric nullptr,
7775ffd83dbSDimitry Andric nullptr,
778*06c3fb27SDimitry Andric nullptr,
779349cc55cSDimitry Andric },
7805ffd83dbSDimitry Andric {"d11",
7815ffd83dbSDimitry Andric nullptr,
7825ffd83dbSDimitry Andric 8,
7835ffd83dbSDimitry Andric 0,
7845ffd83dbSDimitry Andric eEncodingIEEE754,
7855ffd83dbSDimitry Andric eFormatFloat,
7865ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7875ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
7885ffd83dbSDimitry Andric nullptr,
7895ffd83dbSDimitry Andric nullptr,
790*06c3fb27SDimitry Andric nullptr,
791349cc55cSDimitry Andric },
7925ffd83dbSDimitry Andric {"d12",
7935ffd83dbSDimitry Andric nullptr,
7945ffd83dbSDimitry Andric 8,
7955ffd83dbSDimitry Andric 0,
7965ffd83dbSDimitry Andric eEncodingIEEE754,
7975ffd83dbSDimitry Andric eFormatFloat,
7985ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
7995ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8005ffd83dbSDimitry Andric nullptr,
8015ffd83dbSDimitry Andric nullptr,
802*06c3fb27SDimitry Andric nullptr,
803349cc55cSDimitry Andric },
8045ffd83dbSDimitry Andric {"d13",
8055ffd83dbSDimitry Andric nullptr,
8065ffd83dbSDimitry Andric 8,
8075ffd83dbSDimitry Andric 0,
8085ffd83dbSDimitry Andric eEncodingIEEE754,
8095ffd83dbSDimitry Andric eFormatFloat,
8105ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
8115ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8125ffd83dbSDimitry Andric nullptr,
8135ffd83dbSDimitry Andric nullptr,
814*06c3fb27SDimitry Andric nullptr,
815349cc55cSDimitry Andric },
8165ffd83dbSDimitry Andric {"d14",
8175ffd83dbSDimitry Andric nullptr,
8185ffd83dbSDimitry Andric 8,
8195ffd83dbSDimitry Andric 0,
8205ffd83dbSDimitry Andric eEncodingIEEE754,
8215ffd83dbSDimitry Andric eFormatFloat,
8225ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
8235ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8245ffd83dbSDimitry Andric nullptr,
8255ffd83dbSDimitry Andric nullptr,
826*06c3fb27SDimitry Andric nullptr,
827349cc55cSDimitry Andric },
8285ffd83dbSDimitry Andric {"d15",
8295ffd83dbSDimitry Andric nullptr,
8305ffd83dbSDimitry Andric 8,
8315ffd83dbSDimitry Andric 0,
8325ffd83dbSDimitry Andric eEncodingIEEE754,
8335ffd83dbSDimitry Andric eFormatFloat,
8345ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
8355ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8365ffd83dbSDimitry Andric nullptr,
8375ffd83dbSDimitry Andric nullptr,
838*06c3fb27SDimitry Andric nullptr,
839349cc55cSDimitry Andric },
8405ffd83dbSDimitry Andric {"d16",
8415ffd83dbSDimitry Andric nullptr,
8425ffd83dbSDimitry Andric 8,
8435ffd83dbSDimitry Andric 0,
8445ffd83dbSDimitry Andric eEncodingIEEE754,
8455ffd83dbSDimitry Andric eFormatFloat,
8465ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
8475ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8485ffd83dbSDimitry Andric nullptr,
8495ffd83dbSDimitry Andric nullptr,
850*06c3fb27SDimitry Andric nullptr,
851349cc55cSDimitry Andric },
8525ffd83dbSDimitry Andric {"d17",
8535ffd83dbSDimitry Andric nullptr,
8545ffd83dbSDimitry Andric 8,
8555ffd83dbSDimitry Andric 0,
8565ffd83dbSDimitry Andric eEncodingIEEE754,
8575ffd83dbSDimitry Andric eFormatFloat,
8585ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
8595ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8605ffd83dbSDimitry Andric nullptr,
8615ffd83dbSDimitry Andric nullptr,
862*06c3fb27SDimitry Andric nullptr,
863349cc55cSDimitry Andric },
8645ffd83dbSDimitry Andric {"d18",
8655ffd83dbSDimitry Andric nullptr,
8665ffd83dbSDimitry Andric 8,
8675ffd83dbSDimitry Andric 0,
8685ffd83dbSDimitry Andric eEncodingIEEE754,
8695ffd83dbSDimitry Andric eFormatFloat,
8705ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
8715ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8725ffd83dbSDimitry Andric nullptr,
8735ffd83dbSDimitry Andric nullptr,
874*06c3fb27SDimitry Andric nullptr,
875349cc55cSDimitry Andric },
8765ffd83dbSDimitry Andric {"d19",
8775ffd83dbSDimitry Andric nullptr,
8785ffd83dbSDimitry Andric 8,
8795ffd83dbSDimitry Andric 0,
8805ffd83dbSDimitry Andric eEncodingIEEE754,
8815ffd83dbSDimitry Andric eFormatFloat,
8825ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
8835ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8845ffd83dbSDimitry Andric nullptr,
8855ffd83dbSDimitry Andric nullptr,
886*06c3fb27SDimitry Andric nullptr,
887349cc55cSDimitry Andric },
8885ffd83dbSDimitry Andric {"d20",
8895ffd83dbSDimitry Andric nullptr,
8905ffd83dbSDimitry Andric 8,
8915ffd83dbSDimitry Andric 0,
8925ffd83dbSDimitry Andric eEncodingIEEE754,
8935ffd83dbSDimitry Andric eFormatFloat,
8945ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
8955ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
8965ffd83dbSDimitry Andric nullptr,
8975ffd83dbSDimitry Andric nullptr,
898*06c3fb27SDimitry Andric nullptr,
899349cc55cSDimitry Andric },
9005ffd83dbSDimitry Andric {"d21",
9015ffd83dbSDimitry Andric nullptr,
9025ffd83dbSDimitry Andric 8,
9035ffd83dbSDimitry Andric 0,
9045ffd83dbSDimitry Andric eEncodingIEEE754,
9055ffd83dbSDimitry Andric eFormatFloat,
9065ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
9075ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
9085ffd83dbSDimitry Andric nullptr,
9095ffd83dbSDimitry Andric nullptr,
910*06c3fb27SDimitry Andric nullptr,
911349cc55cSDimitry Andric },
9125ffd83dbSDimitry Andric {"d22",
9135ffd83dbSDimitry Andric nullptr,
9145ffd83dbSDimitry Andric 8,
9155ffd83dbSDimitry Andric 0,
9165ffd83dbSDimitry Andric eEncodingIEEE754,
9175ffd83dbSDimitry Andric eFormatFloat,
9185ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
9195ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
9205ffd83dbSDimitry Andric nullptr,
9215ffd83dbSDimitry Andric nullptr,
922*06c3fb27SDimitry Andric nullptr,
923349cc55cSDimitry Andric },
9245ffd83dbSDimitry Andric {"d23",
9255ffd83dbSDimitry Andric nullptr,
9265ffd83dbSDimitry Andric 8,
9275ffd83dbSDimitry Andric 0,
9285ffd83dbSDimitry Andric eEncodingIEEE754,
9295ffd83dbSDimitry Andric eFormatFloat,
9305ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
9315ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
9325ffd83dbSDimitry Andric nullptr,
9335ffd83dbSDimitry Andric nullptr,
934*06c3fb27SDimitry Andric nullptr,
935349cc55cSDimitry Andric },
9365ffd83dbSDimitry Andric {"d24",
9375ffd83dbSDimitry Andric nullptr,
9385ffd83dbSDimitry Andric 8,
9395ffd83dbSDimitry Andric 0,
9405ffd83dbSDimitry Andric eEncodingIEEE754,
9415ffd83dbSDimitry Andric eFormatFloat,
9425ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
9435ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
9445ffd83dbSDimitry Andric nullptr,
9455ffd83dbSDimitry Andric nullptr,
946*06c3fb27SDimitry Andric nullptr,
947349cc55cSDimitry Andric },
9485ffd83dbSDimitry Andric {"d25",
9495ffd83dbSDimitry Andric nullptr,
9505ffd83dbSDimitry Andric 8,
9515ffd83dbSDimitry Andric 0,
9525ffd83dbSDimitry Andric eEncodingIEEE754,
9535ffd83dbSDimitry Andric eFormatFloat,
9545ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
9555ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
9565ffd83dbSDimitry Andric nullptr,
9575ffd83dbSDimitry Andric nullptr,
958*06c3fb27SDimitry Andric nullptr,
959349cc55cSDimitry Andric },
9605ffd83dbSDimitry Andric {"d26",
9615ffd83dbSDimitry Andric nullptr,
9625ffd83dbSDimitry Andric 8,
9635ffd83dbSDimitry Andric 0,
9645ffd83dbSDimitry Andric eEncodingIEEE754,
9655ffd83dbSDimitry Andric eFormatFloat,
9665ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
9675ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
9685ffd83dbSDimitry Andric nullptr,
9695ffd83dbSDimitry Andric nullptr,
970*06c3fb27SDimitry Andric nullptr,
971349cc55cSDimitry Andric },
9725ffd83dbSDimitry Andric {"d27",
9735ffd83dbSDimitry Andric nullptr,
9745ffd83dbSDimitry Andric 8,
9755ffd83dbSDimitry Andric 0,
9765ffd83dbSDimitry Andric eEncodingIEEE754,
9775ffd83dbSDimitry Andric eFormatFloat,
9785ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
9795ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
9805ffd83dbSDimitry Andric nullptr,
9815ffd83dbSDimitry Andric nullptr,
982*06c3fb27SDimitry Andric nullptr,
983349cc55cSDimitry Andric },
9845ffd83dbSDimitry Andric {"d28",
9855ffd83dbSDimitry Andric nullptr,
9865ffd83dbSDimitry Andric 8,
9875ffd83dbSDimitry Andric 0,
9885ffd83dbSDimitry Andric eEncodingIEEE754,
9895ffd83dbSDimitry Andric eFormatFloat,
9905ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
9915ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
9925ffd83dbSDimitry Andric nullptr,
9935ffd83dbSDimitry Andric nullptr,
994*06c3fb27SDimitry Andric nullptr,
995349cc55cSDimitry Andric },
9965ffd83dbSDimitry Andric {"d29",
9975ffd83dbSDimitry Andric nullptr,
9985ffd83dbSDimitry Andric 8,
9995ffd83dbSDimitry Andric 0,
10005ffd83dbSDimitry Andric eEncodingIEEE754,
10015ffd83dbSDimitry Andric eFormatFloat,
10025ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
10035ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
10045ffd83dbSDimitry Andric nullptr,
10055ffd83dbSDimitry Andric nullptr,
1006*06c3fb27SDimitry Andric nullptr,
1007349cc55cSDimitry Andric },
10085ffd83dbSDimitry Andric {"d30",
10095ffd83dbSDimitry Andric nullptr,
10105ffd83dbSDimitry Andric 8,
10115ffd83dbSDimitry Andric 0,
10125ffd83dbSDimitry Andric eEncodingIEEE754,
10135ffd83dbSDimitry Andric eFormatFloat,
10145ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
10155ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
10165ffd83dbSDimitry Andric nullptr,
10175ffd83dbSDimitry Andric nullptr,
1018*06c3fb27SDimitry Andric nullptr,
1019349cc55cSDimitry Andric },
10205ffd83dbSDimitry Andric {"d31",
10215ffd83dbSDimitry Andric nullptr,
10225ffd83dbSDimitry Andric 8,
10235ffd83dbSDimitry Andric 0,
10245ffd83dbSDimitry Andric eEncodingIEEE754,
10255ffd83dbSDimitry Andric eFormatFloat,
10265ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_d31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
10275ffd83dbSDimitry Andric LLDB_INVALID_REGNUM},
10285ffd83dbSDimitry Andric nullptr,
10295ffd83dbSDimitry Andric nullptr,
1030*06c3fb27SDimitry Andric nullptr,
1031349cc55cSDimitry Andric },
10325ffd83dbSDimitry Andric {"r8_usr",
10335ffd83dbSDimitry Andric nullptr,
10345ffd83dbSDimitry Andric 4,
10355ffd83dbSDimitry Andric 0,
10365ffd83dbSDimitry Andric eEncodingUint,
10375ffd83dbSDimitry Andric eFormatHex,
10385ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r8_usr, LLDB_INVALID_REGNUM,
10395ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
10405ffd83dbSDimitry Andric nullptr,
10415ffd83dbSDimitry Andric nullptr,
1042*06c3fb27SDimitry Andric nullptr,
1043349cc55cSDimitry Andric },
10445ffd83dbSDimitry Andric {"r9_usr",
10455ffd83dbSDimitry Andric nullptr,
10465ffd83dbSDimitry Andric 4,
10475ffd83dbSDimitry Andric 0,
10485ffd83dbSDimitry Andric eEncodingUint,
10495ffd83dbSDimitry Andric eFormatHex,
10505ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r9_usr, LLDB_INVALID_REGNUM,
10515ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
10525ffd83dbSDimitry Andric nullptr,
10535ffd83dbSDimitry Andric nullptr,
1054*06c3fb27SDimitry Andric nullptr,
1055349cc55cSDimitry Andric },
10565ffd83dbSDimitry Andric {"r10_usr",
10575ffd83dbSDimitry Andric nullptr,
10585ffd83dbSDimitry Andric 4,
10595ffd83dbSDimitry Andric 0,
10605ffd83dbSDimitry Andric eEncodingUint,
10615ffd83dbSDimitry Andric eFormatHex,
10625ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r10_usr, LLDB_INVALID_REGNUM,
10635ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
10645ffd83dbSDimitry Andric nullptr,
10655ffd83dbSDimitry Andric nullptr,
1066*06c3fb27SDimitry Andric nullptr,
1067349cc55cSDimitry Andric },
10685ffd83dbSDimitry Andric {"r11_usr",
10695ffd83dbSDimitry Andric nullptr,
10705ffd83dbSDimitry Andric 4,
10715ffd83dbSDimitry Andric 0,
10725ffd83dbSDimitry Andric eEncodingUint,
10735ffd83dbSDimitry Andric eFormatHex,
10745ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r11_usr, LLDB_INVALID_REGNUM,
10755ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
10765ffd83dbSDimitry Andric nullptr,
10775ffd83dbSDimitry Andric nullptr,
1078*06c3fb27SDimitry Andric nullptr,
1079349cc55cSDimitry Andric },
10805ffd83dbSDimitry Andric {"r12_usr",
10815ffd83dbSDimitry Andric nullptr,
10825ffd83dbSDimitry Andric 4,
10835ffd83dbSDimitry Andric 0,
10845ffd83dbSDimitry Andric eEncodingUint,
10855ffd83dbSDimitry Andric eFormatHex,
10865ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r12_usr, LLDB_INVALID_REGNUM,
10875ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
10885ffd83dbSDimitry Andric nullptr,
10895ffd83dbSDimitry Andric nullptr,
1090*06c3fb27SDimitry Andric nullptr,
1091349cc55cSDimitry Andric },
10925ffd83dbSDimitry Andric {"r13_usr",
10935ffd83dbSDimitry Andric "sp_usr",
10945ffd83dbSDimitry Andric 4,
10955ffd83dbSDimitry Andric 0,
10965ffd83dbSDimitry Andric eEncodingUint,
10975ffd83dbSDimitry Andric eFormatHex,
10985ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r13_usr, LLDB_INVALID_REGNUM,
10995ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11005ffd83dbSDimitry Andric nullptr,
11015ffd83dbSDimitry Andric nullptr,
1102*06c3fb27SDimitry Andric nullptr,
1103349cc55cSDimitry Andric },
11045ffd83dbSDimitry Andric {"r14_usr",
11055ffd83dbSDimitry Andric "lr_usr",
11065ffd83dbSDimitry Andric 4,
11075ffd83dbSDimitry Andric 0,
11085ffd83dbSDimitry Andric eEncodingUint,
11095ffd83dbSDimitry Andric eFormatHex,
11105ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r14_usr, LLDB_INVALID_REGNUM,
11115ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11125ffd83dbSDimitry Andric nullptr,
11135ffd83dbSDimitry Andric nullptr,
1114*06c3fb27SDimitry Andric nullptr,
1115349cc55cSDimitry Andric },
11165ffd83dbSDimitry Andric {"r8_fiq",
11175ffd83dbSDimitry Andric nullptr,
11185ffd83dbSDimitry Andric 4,
11195ffd83dbSDimitry Andric 0,
11205ffd83dbSDimitry Andric eEncodingUint,
11215ffd83dbSDimitry Andric eFormatHex,
11225ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r8_fiq, LLDB_INVALID_REGNUM,
11235ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11245ffd83dbSDimitry Andric nullptr,
11255ffd83dbSDimitry Andric nullptr,
1126*06c3fb27SDimitry Andric nullptr,
1127349cc55cSDimitry Andric },
11285ffd83dbSDimitry Andric {"r9_fiq",
11295ffd83dbSDimitry Andric nullptr,
11305ffd83dbSDimitry Andric 4,
11315ffd83dbSDimitry Andric 0,
11325ffd83dbSDimitry Andric eEncodingUint,
11335ffd83dbSDimitry Andric eFormatHex,
11345ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r9_fiq, LLDB_INVALID_REGNUM,
11355ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11365ffd83dbSDimitry Andric nullptr,
11375ffd83dbSDimitry Andric nullptr,
1138*06c3fb27SDimitry Andric nullptr,
1139349cc55cSDimitry Andric },
11405ffd83dbSDimitry Andric {"r10_fiq",
11415ffd83dbSDimitry Andric nullptr,
11425ffd83dbSDimitry Andric 4,
11435ffd83dbSDimitry Andric 0,
11445ffd83dbSDimitry Andric eEncodingUint,
11455ffd83dbSDimitry Andric eFormatHex,
11465ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r10_fiq, LLDB_INVALID_REGNUM,
11475ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11485ffd83dbSDimitry Andric nullptr,
11495ffd83dbSDimitry Andric nullptr,
1150*06c3fb27SDimitry Andric nullptr,
1151349cc55cSDimitry Andric },
11525ffd83dbSDimitry Andric {"r11_fiq",
11535ffd83dbSDimitry Andric nullptr,
11545ffd83dbSDimitry Andric 4,
11555ffd83dbSDimitry Andric 0,
11565ffd83dbSDimitry Andric eEncodingUint,
11575ffd83dbSDimitry Andric eFormatHex,
11585ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r11_fiq, LLDB_INVALID_REGNUM,
11595ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11605ffd83dbSDimitry Andric nullptr,
11615ffd83dbSDimitry Andric nullptr,
1162*06c3fb27SDimitry Andric nullptr,
1163349cc55cSDimitry Andric },
11645ffd83dbSDimitry Andric {"r12_fiq",
11655ffd83dbSDimitry Andric nullptr,
11665ffd83dbSDimitry Andric 4,
11675ffd83dbSDimitry Andric 0,
11685ffd83dbSDimitry Andric eEncodingUint,
11695ffd83dbSDimitry Andric eFormatHex,
11705ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r12_fiq, LLDB_INVALID_REGNUM,
11715ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11725ffd83dbSDimitry Andric nullptr,
11735ffd83dbSDimitry Andric nullptr,
1174*06c3fb27SDimitry Andric nullptr,
1175349cc55cSDimitry Andric },
11765ffd83dbSDimitry Andric {"r13_fiq",
11775ffd83dbSDimitry Andric "sp_fiq",
11785ffd83dbSDimitry Andric 4,
11795ffd83dbSDimitry Andric 0,
11805ffd83dbSDimitry Andric eEncodingUint,
11815ffd83dbSDimitry Andric eFormatHex,
11825ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r13_fiq, LLDB_INVALID_REGNUM,
11835ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11845ffd83dbSDimitry Andric nullptr,
11855ffd83dbSDimitry Andric nullptr,
1186*06c3fb27SDimitry Andric nullptr,
1187349cc55cSDimitry Andric },
11885ffd83dbSDimitry Andric {"r14_fiq",
11895ffd83dbSDimitry Andric "lr_fiq",
11905ffd83dbSDimitry Andric 4,
11915ffd83dbSDimitry Andric 0,
11925ffd83dbSDimitry Andric eEncodingUint,
11935ffd83dbSDimitry Andric eFormatHex,
11945ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r14_fiq, LLDB_INVALID_REGNUM,
11955ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
11965ffd83dbSDimitry Andric nullptr,
11975ffd83dbSDimitry Andric nullptr,
1198*06c3fb27SDimitry Andric nullptr,
1199349cc55cSDimitry Andric },
12005ffd83dbSDimitry Andric {"r13_irq",
12015ffd83dbSDimitry Andric "sp_irq",
12025ffd83dbSDimitry Andric 4,
12035ffd83dbSDimitry Andric 0,
12045ffd83dbSDimitry Andric eEncodingUint,
12055ffd83dbSDimitry Andric eFormatHex,
12065ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r13_irq, LLDB_INVALID_REGNUM,
12075ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
12085ffd83dbSDimitry Andric nullptr,
12095ffd83dbSDimitry Andric nullptr,
1210*06c3fb27SDimitry Andric nullptr,
1211349cc55cSDimitry Andric },
12125ffd83dbSDimitry Andric {"r14_irq",
12135ffd83dbSDimitry Andric "lr_irq",
12145ffd83dbSDimitry Andric 4,
12155ffd83dbSDimitry Andric 0,
12165ffd83dbSDimitry Andric eEncodingUint,
12175ffd83dbSDimitry Andric eFormatHex,
12185ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r14_irq, LLDB_INVALID_REGNUM,
12195ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
12205ffd83dbSDimitry Andric nullptr,
12215ffd83dbSDimitry Andric nullptr,
1222*06c3fb27SDimitry Andric nullptr,
1223349cc55cSDimitry Andric },
12245ffd83dbSDimitry Andric {"r13_abt",
12255ffd83dbSDimitry Andric "sp_abt",
12265ffd83dbSDimitry Andric 4,
12275ffd83dbSDimitry Andric 0,
12285ffd83dbSDimitry Andric eEncodingUint,
12295ffd83dbSDimitry Andric eFormatHex,
12305ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r13_abt, LLDB_INVALID_REGNUM,
12315ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
12325ffd83dbSDimitry Andric nullptr,
12335ffd83dbSDimitry Andric nullptr,
1234*06c3fb27SDimitry Andric nullptr,
1235349cc55cSDimitry Andric },
12365ffd83dbSDimitry Andric {"r14_abt",
12375ffd83dbSDimitry Andric "lr_abt",
12385ffd83dbSDimitry Andric 4,
12395ffd83dbSDimitry Andric 0,
12405ffd83dbSDimitry Andric eEncodingUint,
12415ffd83dbSDimitry Andric eFormatHex,
12425ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r14_abt, LLDB_INVALID_REGNUM,
12435ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
12445ffd83dbSDimitry Andric nullptr,
12455ffd83dbSDimitry Andric nullptr,
1246*06c3fb27SDimitry Andric nullptr,
1247349cc55cSDimitry Andric },
12485ffd83dbSDimitry Andric {"r13_und",
12495ffd83dbSDimitry Andric "sp_und",
12505ffd83dbSDimitry Andric 4,
12515ffd83dbSDimitry Andric 0,
12525ffd83dbSDimitry Andric eEncodingUint,
12535ffd83dbSDimitry Andric eFormatHex,
12545ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r13_und, LLDB_INVALID_REGNUM,
12555ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
12565ffd83dbSDimitry Andric nullptr,
12575ffd83dbSDimitry Andric nullptr,
1258*06c3fb27SDimitry Andric nullptr,
1259349cc55cSDimitry Andric },
12605ffd83dbSDimitry Andric {"r14_und",
12615ffd83dbSDimitry Andric "lr_und",
12625ffd83dbSDimitry Andric 4,
12635ffd83dbSDimitry Andric 0,
12645ffd83dbSDimitry Andric eEncodingUint,
12655ffd83dbSDimitry Andric eFormatHex,
12665ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r14_und, LLDB_INVALID_REGNUM,
12675ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
12685ffd83dbSDimitry Andric nullptr,
12695ffd83dbSDimitry Andric nullptr,
1270*06c3fb27SDimitry Andric nullptr,
1271*06c3fb27SDimitry Andric
1272349cc55cSDimitry Andric },
12735ffd83dbSDimitry Andric {"r13_svc",
12745ffd83dbSDimitry Andric "sp_svc",
12755ffd83dbSDimitry Andric 4,
12765ffd83dbSDimitry Andric 0,
12775ffd83dbSDimitry Andric eEncodingUint,
12785ffd83dbSDimitry Andric eFormatHex,
12795ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r13_svc, LLDB_INVALID_REGNUM,
12805ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
12815ffd83dbSDimitry Andric nullptr,
12825ffd83dbSDimitry Andric nullptr,
1283*06c3fb27SDimitry Andric nullptr,
1284349cc55cSDimitry Andric },
12855ffd83dbSDimitry Andric {"r14_svc",
12865ffd83dbSDimitry Andric "lr_svc",
12875ffd83dbSDimitry Andric 4,
12885ffd83dbSDimitry Andric 0,
12895ffd83dbSDimitry Andric eEncodingUint,
12905ffd83dbSDimitry Andric eFormatHex,
12915ffd83dbSDimitry Andric {LLDB_INVALID_REGNUM, dwarf_r14_svc, LLDB_INVALID_REGNUM,
12925ffd83dbSDimitry Andric LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
12935ffd83dbSDimitry Andric nullptr,
12945ffd83dbSDimitry Andric nullptr,
1295*06c3fb27SDimitry Andric nullptr,
1296349cc55cSDimitry Andric }};
12975ffd83dbSDimitry Andric
1298bdd1243dSDimitry Andric static const uint32_t k_num_register_infos = std::size(g_register_infos);
12995ffd83dbSDimitry Andric
13005ffd83dbSDimitry Andric const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t & count)13015ffd83dbSDimitry Andric ABISysV_arm::GetRegisterInfoArray(uint32_t &count) {
13025ffd83dbSDimitry Andric count = k_num_register_infos;
13035ffd83dbSDimitry Andric return g_register_infos;
13045ffd83dbSDimitry Andric }
13055ffd83dbSDimitry Andric
GetRedZoneSize() const13065ffd83dbSDimitry Andric size_t ABISysV_arm::GetRedZoneSize() const { return 0; }
13075ffd83dbSDimitry Andric
13085ffd83dbSDimitry Andric // Static Functions
13095ffd83dbSDimitry Andric
13105ffd83dbSDimitry Andric ABISP
CreateInstance(lldb::ProcessSP process_sp,const ArchSpec & arch)13115ffd83dbSDimitry Andric ABISysV_arm::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
13125ffd83dbSDimitry Andric const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
13135ffd83dbSDimitry Andric const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();
13145ffd83dbSDimitry Andric
13155ffd83dbSDimitry Andric if (vendor_type != llvm::Triple::Apple) {
13165ffd83dbSDimitry Andric if ((arch_type == llvm::Triple::arm) ||
13175ffd83dbSDimitry Andric (arch_type == llvm::Triple::thumb)) {
13185ffd83dbSDimitry Andric return ABISP(
13195ffd83dbSDimitry Andric new ABISysV_arm(std::move(process_sp), MakeMCRegisterInfo(arch)));
13205ffd83dbSDimitry Andric }
13215ffd83dbSDimitry Andric }
13225ffd83dbSDimitry Andric
13235ffd83dbSDimitry Andric return ABISP();
13245ffd83dbSDimitry Andric }
13255ffd83dbSDimitry Andric
PrepareTrivialCall(Thread & thread,addr_t sp,addr_t function_addr,addr_t return_addr,llvm::ArrayRef<addr_t> args) const13265ffd83dbSDimitry Andric bool ABISysV_arm::PrepareTrivialCall(Thread &thread, addr_t sp,
13275ffd83dbSDimitry Andric addr_t function_addr, addr_t return_addr,
13285ffd83dbSDimitry Andric llvm::ArrayRef<addr_t> args) const {
13295ffd83dbSDimitry Andric RegisterContext *reg_ctx = thread.GetRegisterContext().get();
13305ffd83dbSDimitry Andric if (!reg_ctx)
13315ffd83dbSDimitry Andric return false;
13325ffd83dbSDimitry Andric
13335ffd83dbSDimitry Andric const uint32_t pc_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
13345ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
13355ffd83dbSDimitry Andric const uint32_t sp_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
13365ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
13375ffd83dbSDimitry Andric const uint32_t ra_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
13385ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
13395ffd83dbSDimitry Andric
13405ffd83dbSDimitry Andric RegisterValue reg_value;
13415ffd83dbSDimitry Andric
13425ffd83dbSDimitry Andric const uint8_t reg_names[] = {
13435ffd83dbSDimitry Andric LLDB_REGNUM_GENERIC_ARG1, LLDB_REGNUM_GENERIC_ARG2,
13445ffd83dbSDimitry Andric LLDB_REGNUM_GENERIC_ARG3, LLDB_REGNUM_GENERIC_ARG4};
13455ffd83dbSDimitry Andric
13465ffd83dbSDimitry Andric llvm::ArrayRef<addr_t>::iterator ai = args.begin(), ae = args.end();
13475ffd83dbSDimitry Andric
1348bdd1243dSDimitry Andric for (size_t i = 0; i < std::size(reg_names); ++i) {
13495ffd83dbSDimitry Andric if (ai == ae)
13505ffd83dbSDimitry Andric break;
13515ffd83dbSDimitry Andric
13525ffd83dbSDimitry Andric reg_value.SetUInt32(*ai);
13535ffd83dbSDimitry Andric if (!reg_ctx->WriteRegister(
13545ffd83dbSDimitry Andric reg_ctx->GetRegisterInfo(eRegisterKindGeneric, reg_names[i]),
13555ffd83dbSDimitry Andric reg_value))
13565ffd83dbSDimitry Andric return false;
13575ffd83dbSDimitry Andric
13585ffd83dbSDimitry Andric ++ai;
13595ffd83dbSDimitry Andric }
13605ffd83dbSDimitry Andric
13615ffd83dbSDimitry Andric if (ai != ae) {
13625ffd83dbSDimitry Andric // Spill onto the stack
13635ffd83dbSDimitry Andric size_t num_stack_regs = ae - ai;
13645ffd83dbSDimitry Andric
13655ffd83dbSDimitry Andric sp -= (num_stack_regs * 4);
13665ffd83dbSDimitry Andric // Keep the stack 8 byte aligned, not that we need to
13675ffd83dbSDimitry Andric sp &= ~(8ull - 1ull);
13685ffd83dbSDimitry Andric
13695ffd83dbSDimitry Andric // just using arg1 to get the right size
13705ffd83dbSDimitry Andric const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
13715ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
13725ffd83dbSDimitry Andric
13735ffd83dbSDimitry Andric addr_t arg_pos = sp;
13745ffd83dbSDimitry Andric
13755ffd83dbSDimitry Andric for (; ai != ae; ++ai) {
13765ffd83dbSDimitry Andric reg_value.SetUInt32(*ai);
13775ffd83dbSDimitry Andric if (reg_ctx
13785ffd83dbSDimitry Andric ->WriteRegisterValueToMemory(reg_info, arg_pos,
13795ffd83dbSDimitry Andric reg_info->byte_size, reg_value)
13805ffd83dbSDimitry Andric .Fail())
13815ffd83dbSDimitry Andric return false;
13825ffd83dbSDimitry Andric arg_pos += reg_info->byte_size;
13835ffd83dbSDimitry Andric }
13845ffd83dbSDimitry Andric }
13855ffd83dbSDimitry Andric
13865ffd83dbSDimitry Andric TargetSP target_sp(thread.CalculateTarget());
13875ffd83dbSDimitry Andric Address so_addr;
13885ffd83dbSDimitry Andric
13895ffd83dbSDimitry Andric // Figure out if our return address is ARM or Thumb by using the
13905ffd83dbSDimitry Andric // Address::GetCallableLoadAddress(Target*) which will figure out the ARM
13915ffd83dbSDimitry Andric // thumb-ness and set the correct address bits for us.
13925ffd83dbSDimitry Andric so_addr.SetLoadAddress(return_addr, target_sp.get());
13935ffd83dbSDimitry Andric return_addr = so_addr.GetCallableLoadAddress(target_sp.get());
13945ffd83dbSDimitry Andric
13955ffd83dbSDimitry Andric // Set "lr" to the return address
13965ffd83dbSDimitry Andric if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_num, return_addr))
13975ffd83dbSDimitry Andric return false;
13985ffd83dbSDimitry Andric
13995ffd83dbSDimitry Andric // Set "sp" to the requested value
14005ffd83dbSDimitry Andric if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_num, sp))
14015ffd83dbSDimitry Andric return false;
14025ffd83dbSDimitry Andric
14035ffd83dbSDimitry Andric // If bit zero or 1 is set, this must be a thumb function, no need to figure
14045ffd83dbSDimitry Andric // this out from the symbols.
14055ffd83dbSDimitry Andric so_addr.SetLoadAddress(function_addr, target_sp.get());
14065ffd83dbSDimitry Andric function_addr = so_addr.GetCallableLoadAddress(target_sp.get());
14075ffd83dbSDimitry Andric
14085ffd83dbSDimitry Andric const RegisterInfo *cpsr_reg_info =
14095ffd83dbSDimitry Andric reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FLAGS);
14105ffd83dbSDimitry Andric const uint32_t curr_cpsr = reg_ctx->ReadRegisterAsUnsigned(cpsr_reg_info, 0);
14115ffd83dbSDimitry Andric
14125ffd83dbSDimitry Andric // Make a new CPSR and mask out any Thumb IT (if/then) bits
14135ffd83dbSDimitry Andric uint32_t new_cpsr = curr_cpsr & ~MASK_CPSR_IT_MASK;
14145ffd83dbSDimitry Andric // If bit zero or 1 is set, this must be thumb...
14155ffd83dbSDimitry Andric if (function_addr & 1ull)
14165ffd83dbSDimitry Andric new_cpsr |= MASK_CPSR_T; // Set T bit in CPSR
14175ffd83dbSDimitry Andric else
14185ffd83dbSDimitry Andric new_cpsr &= ~MASK_CPSR_T; // Clear T bit in CPSR
14195ffd83dbSDimitry Andric
14205ffd83dbSDimitry Andric if (new_cpsr != curr_cpsr) {
14215ffd83dbSDimitry Andric if (!reg_ctx->WriteRegisterFromUnsigned(cpsr_reg_info, new_cpsr))
14225ffd83dbSDimitry Andric return false;
14235ffd83dbSDimitry Andric }
14245ffd83dbSDimitry Andric
14255ffd83dbSDimitry Andric function_addr &=
14265ffd83dbSDimitry Andric ~1ull; // clear bit zero since the CPSR will take care of the mode for us
14275ffd83dbSDimitry Andric
14285ffd83dbSDimitry Andric // Set "pc" to the address requested
14295ffd83dbSDimitry Andric return reg_ctx->WriteRegisterFromUnsigned(pc_reg_num, function_addr);
14305ffd83dbSDimitry Andric }
14315ffd83dbSDimitry Andric
GetArgumentValues(Thread & thread,ValueList & values) const14325ffd83dbSDimitry Andric bool ABISysV_arm::GetArgumentValues(Thread &thread, ValueList &values) const {
14335ffd83dbSDimitry Andric uint32_t num_values = values.GetSize();
14345ffd83dbSDimitry Andric
14355ffd83dbSDimitry Andric ExecutionContext exe_ctx(thread.shared_from_this());
14365ffd83dbSDimitry Andric // For now, assume that the types in the AST values come from the Target's
14375ffd83dbSDimitry Andric // scratch AST.
14385ffd83dbSDimitry Andric
14395ffd83dbSDimitry Andric // Extract the register context so we can read arguments from registers
14405ffd83dbSDimitry Andric
14415ffd83dbSDimitry Andric RegisterContext *reg_ctx = thread.GetRegisterContext().get();
14425ffd83dbSDimitry Andric
14435ffd83dbSDimitry Andric if (!reg_ctx)
14445ffd83dbSDimitry Andric return false;
14455ffd83dbSDimitry Andric
14465ffd83dbSDimitry Andric addr_t sp = 0;
14475ffd83dbSDimitry Andric
14485ffd83dbSDimitry Andric for (uint32_t value_idx = 0; value_idx < num_values; ++value_idx) {
14495ffd83dbSDimitry Andric // We currently only support extracting values with Clang QualTypes. Do we
14505ffd83dbSDimitry Andric // care about others?
14515ffd83dbSDimitry Andric Value *value = values.GetValueAtIndex(value_idx);
14525ffd83dbSDimitry Andric
14535ffd83dbSDimitry Andric if (!value)
14545ffd83dbSDimitry Andric return false;
14555ffd83dbSDimitry Andric
14565ffd83dbSDimitry Andric CompilerType compiler_type = value->GetCompilerType();
14575ffd83dbSDimitry Andric if (compiler_type) {
14585ffd83dbSDimitry Andric bool is_signed = false;
14595ffd83dbSDimitry Andric size_t bit_width = 0;
14605ffd83dbSDimitry Andric if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
14615ffd83dbSDimitry Andric compiler_type.IsPointerOrReferenceType()) {
1462bdd1243dSDimitry Andric if (std::optional<uint64_t> size = compiler_type.GetBitSize(&thread))
14635ffd83dbSDimitry Andric bit_width = *size;
14645ffd83dbSDimitry Andric } else {
14655ffd83dbSDimitry Andric // We only handle integer, pointer and reference types currently...
14665ffd83dbSDimitry Andric return false;
14675ffd83dbSDimitry Andric }
14685ffd83dbSDimitry Andric
14695ffd83dbSDimitry Andric if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) {
14705ffd83dbSDimitry Andric if (value_idx < 4) {
14715ffd83dbSDimitry Andric // Arguments 1-4 are in r0-r3...
14725ffd83dbSDimitry Andric const RegisterInfo *arg_reg_info = nullptr;
14735ffd83dbSDimitry Andric arg_reg_info = reg_ctx->GetRegisterInfo(
14745ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + value_idx);
14755ffd83dbSDimitry Andric if (arg_reg_info) {
14765ffd83dbSDimitry Andric RegisterValue reg_value;
14775ffd83dbSDimitry Andric
14785ffd83dbSDimitry Andric if (reg_ctx->ReadRegister(arg_reg_info, reg_value)) {
14795ffd83dbSDimitry Andric if (is_signed)
14805ffd83dbSDimitry Andric reg_value.SignExtend(bit_width);
14815ffd83dbSDimitry Andric if (!reg_value.GetScalarValue(value->GetScalar()))
14825ffd83dbSDimitry Andric return false;
14835ffd83dbSDimitry Andric continue;
14845ffd83dbSDimitry Andric }
14855ffd83dbSDimitry Andric }
14865ffd83dbSDimitry Andric return false;
14875ffd83dbSDimitry Andric } else {
14885ffd83dbSDimitry Andric if (sp == 0) {
14895ffd83dbSDimitry Andric // Read the stack pointer if it already hasn't been read
14905ffd83dbSDimitry Andric sp = reg_ctx->GetSP(0);
14915ffd83dbSDimitry Andric if (sp == 0)
14925ffd83dbSDimitry Andric return false;
14935ffd83dbSDimitry Andric }
14945ffd83dbSDimitry Andric
14955ffd83dbSDimitry Andric // Arguments 5 on up are on the stack
14965ffd83dbSDimitry Andric const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8;
14975ffd83dbSDimitry Andric Status error;
14985ffd83dbSDimitry Andric if (!exe_ctx.GetProcessRef().ReadScalarIntegerFromMemory(
14995ffd83dbSDimitry Andric sp, arg_byte_size, is_signed, value->GetScalar(), error))
15005ffd83dbSDimitry Andric return false;
15015ffd83dbSDimitry Andric
15025ffd83dbSDimitry Andric sp += arg_byte_size;
15035ffd83dbSDimitry Andric }
15045ffd83dbSDimitry Andric }
15055ffd83dbSDimitry Andric }
15065ffd83dbSDimitry Andric }
15075ffd83dbSDimitry Andric return true;
15085ffd83dbSDimitry Andric }
15095ffd83dbSDimitry Andric
GetReturnValuePassedInMemory(Thread & thread,RegisterContext * reg_ctx,size_t byte_size,Value & value)15105ffd83dbSDimitry Andric static bool GetReturnValuePassedInMemory(Thread &thread,
15115ffd83dbSDimitry Andric RegisterContext *reg_ctx,
15125ffd83dbSDimitry Andric size_t byte_size, Value &value) {
15135ffd83dbSDimitry Andric Status error;
15145ffd83dbSDimitry Andric DataBufferHeap buffer(byte_size, 0);
15155ffd83dbSDimitry Andric
15165ffd83dbSDimitry Andric const RegisterInfo *r0_reg_info =
15175ffd83dbSDimitry Andric reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
15185ffd83dbSDimitry Andric uint32_t address =
15195ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
15205ffd83dbSDimitry Andric thread.GetProcess()->ReadMemory(address, buffer.GetBytes(),
15215ffd83dbSDimitry Andric buffer.GetByteSize(), error);
15225ffd83dbSDimitry Andric
15235ffd83dbSDimitry Andric if (error.Fail())
15245ffd83dbSDimitry Andric return false;
15255ffd83dbSDimitry Andric
15265ffd83dbSDimitry Andric value.SetBytes(buffer.GetBytes(), buffer.GetByteSize());
15275ffd83dbSDimitry Andric return true;
15285ffd83dbSDimitry Andric }
15295ffd83dbSDimitry Andric
IsArmHardFloat(Thread & thread) const15305ffd83dbSDimitry Andric bool ABISysV_arm::IsArmHardFloat(Thread &thread) const {
15315ffd83dbSDimitry Andric ProcessSP process_sp(thread.GetProcess());
15325ffd83dbSDimitry Andric if (process_sp) {
15335ffd83dbSDimitry Andric const ArchSpec &arch(process_sp->GetTarget().GetArchitecture());
15345ffd83dbSDimitry Andric
15355ffd83dbSDimitry Andric return (arch.GetFlags() & ArchSpec::eARM_abi_hard_float) != 0;
15365ffd83dbSDimitry Andric }
15375ffd83dbSDimitry Andric
15385ffd83dbSDimitry Andric return false;
15395ffd83dbSDimitry Andric }
15405ffd83dbSDimitry Andric
GetReturnValueObjectImpl(Thread & thread,lldb_private::CompilerType & compiler_type) const15415ffd83dbSDimitry Andric ValueObjectSP ABISysV_arm::GetReturnValueObjectImpl(
15425ffd83dbSDimitry Andric Thread &thread, lldb_private::CompilerType &compiler_type) const {
15435ffd83dbSDimitry Andric Value value;
15445ffd83dbSDimitry Andric ValueObjectSP return_valobj_sp;
15455ffd83dbSDimitry Andric
15465ffd83dbSDimitry Andric if (!compiler_type)
15475ffd83dbSDimitry Andric return return_valobj_sp;
15485ffd83dbSDimitry Andric
15495ffd83dbSDimitry Andric // value.SetContext (Value::eContextTypeClangType,
15505ffd83dbSDimitry Andric // compiler_type.GetOpaqueQualType());
15515ffd83dbSDimitry Andric value.SetCompilerType(compiler_type);
15525ffd83dbSDimitry Andric
15535ffd83dbSDimitry Andric RegisterContext *reg_ctx = thread.GetRegisterContext().get();
15545ffd83dbSDimitry Andric if (!reg_ctx)
15555ffd83dbSDimitry Andric return return_valobj_sp;
15565ffd83dbSDimitry Andric
15575ffd83dbSDimitry Andric bool is_signed;
15585ffd83dbSDimitry Andric bool is_complex;
15595ffd83dbSDimitry Andric uint32_t float_count;
15605ffd83dbSDimitry Andric bool is_vfp_candidate = false;
15615ffd83dbSDimitry Andric uint8_t vfp_count = 0;
15625ffd83dbSDimitry Andric uint8_t vfp_byte_size = 0;
15635ffd83dbSDimitry Andric
15645ffd83dbSDimitry Andric // Get the pointer to the first stack argument so we have a place to start
15655ffd83dbSDimitry Andric // when reading data
15665ffd83dbSDimitry Andric
15675ffd83dbSDimitry Andric const RegisterInfo *r0_reg_info =
15685ffd83dbSDimitry Andric reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
1569bdd1243dSDimitry Andric std::optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread);
1570bdd1243dSDimitry Andric std::optional<uint64_t> byte_size = compiler_type.GetByteSize(&thread);
15715ffd83dbSDimitry Andric if (!bit_width || !byte_size)
15725ffd83dbSDimitry Andric return return_valobj_sp;
15735ffd83dbSDimitry Andric
15745ffd83dbSDimitry Andric if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
15755ffd83dbSDimitry Andric switch (*bit_width) {
15765ffd83dbSDimitry Andric default:
15775ffd83dbSDimitry Andric return return_valobj_sp;
15785ffd83dbSDimitry Andric case 64: {
15795ffd83dbSDimitry Andric const RegisterInfo *r1_reg_info = reg_ctx->GetRegisterInfo(
15805ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
15815ffd83dbSDimitry Andric uint64_t raw_value;
15825ffd83dbSDimitry Andric raw_value = reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
15835ffd83dbSDimitry Andric raw_value |= ((uint64_t)(reg_ctx->ReadRegisterAsUnsigned(r1_reg_info, 0) &
15845ffd83dbSDimitry Andric UINT32_MAX))
15855ffd83dbSDimitry Andric << 32;
15865ffd83dbSDimitry Andric if (is_signed)
15875ffd83dbSDimitry Andric value.GetScalar() = (int64_t)raw_value;
15885ffd83dbSDimitry Andric else
15895ffd83dbSDimitry Andric value.GetScalar() = (uint64_t)raw_value;
15905ffd83dbSDimitry Andric } break;
15915ffd83dbSDimitry Andric case 32:
15925ffd83dbSDimitry Andric if (is_signed)
15935ffd83dbSDimitry Andric value.GetScalar() = (int32_t)(
15945ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX);
15955ffd83dbSDimitry Andric else
15965ffd83dbSDimitry Andric value.GetScalar() = (uint32_t)(
15975ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX);
15985ffd83dbSDimitry Andric break;
15995ffd83dbSDimitry Andric case 16:
16005ffd83dbSDimitry Andric if (is_signed)
16015ffd83dbSDimitry Andric value.GetScalar() = (int16_t)(
16025ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT16_MAX);
16035ffd83dbSDimitry Andric else
16045ffd83dbSDimitry Andric value.GetScalar() = (uint16_t)(
16055ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT16_MAX);
16065ffd83dbSDimitry Andric break;
16075ffd83dbSDimitry Andric case 8:
16085ffd83dbSDimitry Andric if (is_signed)
16095ffd83dbSDimitry Andric value.GetScalar() = (int8_t)(
16105ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT8_MAX);
16115ffd83dbSDimitry Andric else
16125ffd83dbSDimitry Andric value.GetScalar() = (uint8_t)(
16135ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT8_MAX);
16145ffd83dbSDimitry Andric break;
16155ffd83dbSDimitry Andric }
16165ffd83dbSDimitry Andric } else if (compiler_type.IsPointerType()) {
16175ffd83dbSDimitry Andric uint32_t ptr =
16185ffd83dbSDimitry Andric thread.GetRegisterContext()->ReadRegisterAsUnsigned(r0_reg_info, 0) &
16195ffd83dbSDimitry Andric UINT32_MAX;
16205ffd83dbSDimitry Andric value.GetScalar() = ptr;
1621fe6060f1SDimitry Andric } else if (compiler_type.IsVectorType()) {
16225ffd83dbSDimitry Andric if (IsArmHardFloat(thread) && (*byte_size == 8 || *byte_size == 16)) {
16235ffd83dbSDimitry Andric is_vfp_candidate = true;
16245ffd83dbSDimitry Andric vfp_byte_size = 8;
16255ffd83dbSDimitry Andric vfp_count = (*byte_size == 8 ? 1 : 2);
16265ffd83dbSDimitry Andric } else if (*byte_size <= 16) {
16275ffd83dbSDimitry Andric DataBufferHeap buffer(16, 0);
16285ffd83dbSDimitry Andric uint32_t *buffer_ptr = (uint32_t *)buffer.GetBytes();
16295ffd83dbSDimitry Andric
16305ffd83dbSDimitry Andric for (uint32_t i = 0; 4 * i < *byte_size; ++i) {
16315ffd83dbSDimitry Andric const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
16325ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + i);
16335ffd83dbSDimitry Andric buffer_ptr[i] =
16345ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(reg_info, 0) & UINT32_MAX;
16355ffd83dbSDimitry Andric }
16365ffd83dbSDimitry Andric value.SetBytes(buffer.GetBytes(), *byte_size);
16375ffd83dbSDimitry Andric } else {
16385ffd83dbSDimitry Andric if (!GetReturnValuePassedInMemory(thread, reg_ctx, *byte_size, value))
16395ffd83dbSDimitry Andric return return_valobj_sp;
16405ffd83dbSDimitry Andric }
16415ffd83dbSDimitry Andric } else if (compiler_type.IsFloatingPointType(float_count, is_complex)) {
16425ffd83dbSDimitry Andric if (float_count == 1 && !is_complex) {
16435ffd83dbSDimitry Andric switch (*bit_width) {
16445ffd83dbSDimitry Andric default:
16455ffd83dbSDimitry Andric return return_valobj_sp;
16465ffd83dbSDimitry Andric case 64: {
1647bdd1243dSDimitry Andric static_assert(sizeof(double) == sizeof(uint64_t));
16485ffd83dbSDimitry Andric
16495ffd83dbSDimitry Andric if (IsArmHardFloat(thread)) {
16505ffd83dbSDimitry Andric RegisterValue reg_value;
16515ffd83dbSDimitry Andric const RegisterInfo *d0_reg_info =
16525ffd83dbSDimitry Andric reg_ctx->GetRegisterInfoByName("d0", 0);
16535ffd83dbSDimitry Andric reg_ctx->ReadRegister(d0_reg_info, reg_value);
16545ffd83dbSDimitry Andric value.GetScalar() = reg_value.GetAsDouble();
16555ffd83dbSDimitry Andric } else {
16565ffd83dbSDimitry Andric uint64_t raw_value;
16575ffd83dbSDimitry Andric const RegisterInfo *r1_reg_info = reg_ctx->GetRegisterInfo(
16585ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
16595ffd83dbSDimitry Andric raw_value =
16605ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
16615ffd83dbSDimitry Andric raw_value |=
16625ffd83dbSDimitry Andric ((uint64_t)(reg_ctx->ReadRegisterAsUnsigned(r1_reg_info, 0) &
16635ffd83dbSDimitry Andric UINT32_MAX))
16645ffd83dbSDimitry Andric << 32;
16655ffd83dbSDimitry Andric value.GetScalar() = *reinterpret_cast<double *>(&raw_value);
16665ffd83dbSDimitry Andric }
16675ffd83dbSDimitry Andric break;
16685ffd83dbSDimitry Andric }
16695ffd83dbSDimitry Andric case 16: // Half precision returned after a conversion to single precision
16705ffd83dbSDimitry Andric case 32: {
1671bdd1243dSDimitry Andric static_assert(sizeof(float) == sizeof(uint32_t));
16725ffd83dbSDimitry Andric
16735ffd83dbSDimitry Andric if (IsArmHardFloat(thread)) {
16745ffd83dbSDimitry Andric RegisterValue reg_value;
16755ffd83dbSDimitry Andric const RegisterInfo *s0_reg_info =
16765ffd83dbSDimitry Andric reg_ctx->GetRegisterInfoByName("s0", 0);
16775ffd83dbSDimitry Andric reg_ctx->ReadRegister(s0_reg_info, reg_value);
16785ffd83dbSDimitry Andric value.GetScalar() = reg_value.GetAsFloat();
16795ffd83dbSDimitry Andric } else {
16805ffd83dbSDimitry Andric uint32_t raw_value;
16815ffd83dbSDimitry Andric raw_value =
16825ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
16835ffd83dbSDimitry Andric value.GetScalar() = *reinterpret_cast<float *>(&raw_value);
16845ffd83dbSDimitry Andric }
16855ffd83dbSDimitry Andric break;
16865ffd83dbSDimitry Andric }
16875ffd83dbSDimitry Andric }
16885ffd83dbSDimitry Andric } else if (is_complex && float_count == 2) {
16895ffd83dbSDimitry Andric if (IsArmHardFloat(thread)) {
16905ffd83dbSDimitry Andric is_vfp_candidate = true;
16915ffd83dbSDimitry Andric vfp_byte_size = *byte_size / 2;
16925ffd83dbSDimitry Andric vfp_count = 2;
16935ffd83dbSDimitry Andric } else if (!GetReturnValuePassedInMemory(thread, reg_ctx, *bit_width / 8,
16945ffd83dbSDimitry Andric value))
16955ffd83dbSDimitry Andric return return_valobj_sp;
16965ffd83dbSDimitry Andric } else
16975ffd83dbSDimitry Andric // not handled yet
16985ffd83dbSDimitry Andric return return_valobj_sp;
16995ffd83dbSDimitry Andric } else if (compiler_type.IsAggregateType()) {
17005ffd83dbSDimitry Andric if (IsArmHardFloat(thread)) {
17015ffd83dbSDimitry Andric CompilerType base_type;
17025ffd83dbSDimitry Andric const uint32_t homogeneous_count =
17035ffd83dbSDimitry Andric compiler_type.IsHomogeneousAggregate(&base_type);
17045ffd83dbSDimitry Andric
17055ffd83dbSDimitry Andric if (homogeneous_count > 0 && homogeneous_count <= 4) {
1706bdd1243dSDimitry Andric std::optional<uint64_t> base_byte_size = base_type.GetByteSize(&thread);
1707fe6060f1SDimitry Andric if (base_type.IsVectorType()) {
17085ffd83dbSDimitry Andric if (base_byte_size &&
17095ffd83dbSDimitry Andric (*base_byte_size == 8 || *base_byte_size == 16)) {
17105ffd83dbSDimitry Andric is_vfp_candidate = true;
17115ffd83dbSDimitry Andric vfp_byte_size = 8;
17125ffd83dbSDimitry Andric vfp_count = (*base_byte_size == 8 ? homogeneous_count
17135ffd83dbSDimitry Andric : homogeneous_count * 2);
17145ffd83dbSDimitry Andric }
17155ffd83dbSDimitry Andric } else if (base_type.IsFloatingPointType(float_count, is_complex)) {
17165ffd83dbSDimitry Andric if (float_count == 1 && !is_complex) {
17175ffd83dbSDimitry Andric is_vfp_candidate = true;
17185ffd83dbSDimitry Andric if (base_byte_size)
17195ffd83dbSDimitry Andric vfp_byte_size = *base_byte_size;
17205ffd83dbSDimitry Andric vfp_count = homogeneous_count;
17215ffd83dbSDimitry Andric }
17225ffd83dbSDimitry Andric }
17235ffd83dbSDimitry Andric } else if (homogeneous_count == 0) {
17245ffd83dbSDimitry Andric const uint32_t num_children = compiler_type.GetNumFields();
17255ffd83dbSDimitry Andric
17265ffd83dbSDimitry Andric if (num_children > 0 && num_children <= 2) {
17275ffd83dbSDimitry Andric uint32_t index = 0;
17285ffd83dbSDimitry Andric for (index = 0; index < num_children; index++) {
17295ffd83dbSDimitry Andric std::string name;
17305ffd83dbSDimitry Andric base_type = compiler_type.GetFieldAtIndex(index, name, nullptr,
17315ffd83dbSDimitry Andric nullptr, nullptr);
17325ffd83dbSDimitry Andric
17335ffd83dbSDimitry Andric if (base_type.IsFloatingPointType(float_count, is_complex)) {
1734bdd1243dSDimitry Andric std::optional<uint64_t> base_byte_size =
1735e8d8bef9SDimitry Andric base_type.GetByteSize(&thread);
17365ffd83dbSDimitry Andric if (float_count == 2 && is_complex) {
17375ffd83dbSDimitry Andric if (index != 0 && base_byte_size &&
17385ffd83dbSDimitry Andric vfp_byte_size != *base_byte_size)
17395ffd83dbSDimitry Andric break;
17405ffd83dbSDimitry Andric else if (base_byte_size)
17415ffd83dbSDimitry Andric vfp_byte_size = *base_byte_size;
17425ffd83dbSDimitry Andric } else
17435ffd83dbSDimitry Andric break;
17445ffd83dbSDimitry Andric } else
17455ffd83dbSDimitry Andric break;
17465ffd83dbSDimitry Andric }
17475ffd83dbSDimitry Andric
17485ffd83dbSDimitry Andric if (index == num_children) {
17495ffd83dbSDimitry Andric is_vfp_candidate = true;
17505ffd83dbSDimitry Andric vfp_byte_size = (vfp_byte_size >> 1);
17515ffd83dbSDimitry Andric vfp_count = (num_children << 1);
17525ffd83dbSDimitry Andric }
17535ffd83dbSDimitry Andric }
17545ffd83dbSDimitry Andric }
17555ffd83dbSDimitry Andric }
17565ffd83dbSDimitry Andric
17575ffd83dbSDimitry Andric if (*byte_size <= 4) {
17585ffd83dbSDimitry Andric RegisterValue r0_reg_value;
17595ffd83dbSDimitry Andric uint32_t raw_value =
17605ffd83dbSDimitry Andric reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
17615ffd83dbSDimitry Andric value.SetBytes(&raw_value, *byte_size);
17625ffd83dbSDimitry Andric } else if (!is_vfp_candidate) {
17635ffd83dbSDimitry Andric if (!GetReturnValuePassedInMemory(thread, reg_ctx, *byte_size, value))
17645ffd83dbSDimitry Andric return return_valobj_sp;
17655ffd83dbSDimitry Andric }
17665ffd83dbSDimitry Andric } else {
17675ffd83dbSDimitry Andric // not handled yet
17685ffd83dbSDimitry Andric return return_valobj_sp;
17695ffd83dbSDimitry Andric }
17705ffd83dbSDimitry Andric
17715ffd83dbSDimitry Andric if (is_vfp_candidate) {
17725ffd83dbSDimitry Andric ProcessSP process_sp(thread.GetProcess());
17735ffd83dbSDimitry Andric ByteOrder byte_order = process_sp->GetByteOrder();
17745ffd83dbSDimitry Andric
177581ad6265SDimitry Andric WritableDataBufferSP data_sp(new DataBufferHeap(*byte_size, 0));
17765ffd83dbSDimitry Andric uint32_t data_offset = 0;
17775ffd83dbSDimitry Andric
17785ffd83dbSDimitry Andric for (uint32_t reg_index = 0; reg_index < vfp_count; reg_index++) {
17795ffd83dbSDimitry Andric uint32_t regnum = 0;
17805ffd83dbSDimitry Andric
17815ffd83dbSDimitry Andric if (vfp_byte_size == 4)
17825ffd83dbSDimitry Andric regnum = dwarf_s0 + reg_index;
17835ffd83dbSDimitry Andric else if (vfp_byte_size == 8)
17845ffd83dbSDimitry Andric regnum = dwarf_d0 + reg_index;
17855ffd83dbSDimitry Andric else
17865ffd83dbSDimitry Andric break;
17875ffd83dbSDimitry Andric
17885ffd83dbSDimitry Andric const RegisterInfo *reg_info =
17895ffd83dbSDimitry Andric reg_ctx->GetRegisterInfo(eRegisterKindDWARF, regnum);
17905ffd83dbSDimitry Andric if (reg_info == nullptr)
17915ffd83dbSDimitry Andric break;
17925ffd83dbSDimitry Andric
17935ffd83dbSDimitry Andric RegisterValue reg_value;
17945ffd83dbSDimitry Andric if (!reg_ctx->ReadRegister(reg_info, reg_value))
17955ffd83dbSDimitry Andric break;
17965ffd83dbSDimitry Andric
17975ffd83dbSDimitry Andric // Make sure we have enough room in "data_sp"
17985ffd83dbSDimitry Andric if ((data_offset + vfp_byte_size) <= data_sp->GetByteSize()) {
17995ffd83dbSDimitry Andric Status error;
18005ffd83dbSDimitry Andric const size_t bytes_copied = reg_value.GetAsMemoryData(
1801bdd1243dSDimitry Andric *reg_info, data_sp->GetBytes() + data_offset, vfp_byte_size,
18025ffd83dbSDimitry Andric byte_order, error);
18035ffd83dbSDimitry Andric if (bytes_copied != vfp_byte_size)
18045ffd83dbSDimitry Andric break;
18055ffd83dbSDimitry Andric
18065ffd83dbSDimitry Andric data_offset += bytes_copied;
18075ffd83dbSDimitry Andric }
18085ffd83dbSDimitry Andric }
18095ffd83dbSDimitry Andric
18105ffd83dbSDimitry Andric if (data_offset == *byte_size) {
18115ffd83dbSDimitry Andric DataExtractor data;
18125ffd83dbSDimitry Andric data.SetByteOrder(byte_order);
18135ffd83dbSDimitry Andric data.SetAddressByteSize(process_sp->GetAddressByteSize());
18145ffd83dbSDimitry Andric data.SetData(data_sp);
18155ffd83dbSDimitry Andric
18165ffd83dbSDimitry Andric return ValueObjectConstResult::Create(&thread, compiler_type,
18175ffd83dbSDimitry Andric ConstString(""), data);
18185ffd83dbSDimitry Andric } else { // Some error occurred while getting values from registers
18195ffd83dbSDimitry Andric return return_valobj_sp;
18205ffd83dbSDimitry Andric }
18215ffd83dbSDimitry Andric }
18225ffd83dbSDimitry Andric
18235ffd83dbSDimitry Andric // If we get here, we have a valid Value, so make our ValueObject out of it:
18245ffd83dbSDimitry Andric
18255ffd83dbSDimitry Andric return_valobj_sp = ValueObjectConstResult::Create(
18265ffd83dbSDimitry Andric thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
18275ffd83dbSDimitry Andric return return_valobj_sp;
18285ffd83dbSDimitry Andric }
18295ffd83dbSDimitry Andric
SetReturnValueObject(lldb::StackFrameSP & frame_sp,lldb::ValueObjectSP & new_value_sp)18305ffd83dbSDimitry Andric Status ABISysV_arm::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
18315ffd83dbSDimitry Andric lldb::ValueObjectSP &new_value_sp) {
18325ffd83dbSDimitry Andric Status error;
18335ffd83dbSDimitry Andric if (!new_value_sp) {
18345ffd83dbSDimitry Andric error.SetErrorString("Empty value object for return value.");
18355ffd83dbSDimitry Andric return error;
18365ffd83dbSDimitry Andric }
18375ffd83dbSDimitry Andric
18385ffd83dbSDimitry Andric CompilerType compiler_type = new_value_sp->GetCompilerType();
18395ffd83dbSDimitry Andric if (!compiler_type) {
18405ffd83dbSDimitry Andric error.SetErrorString("Null clang type for return value.");
18415ffd83dbSDimitry Andric return error;
18425ffd83dbSDimitry Andric }
18435ffd83dbSDimitry Andric
18445ffd83dbSDimitry Andric Thread *thread = frame_sp->GetThread().get();
18455ffd83dbSDimitry Andric
18465ffd83dbSDimitry Andric bool is_signed;
18475ffd83dbSDimitry Andric uint32_t count;
18485ffd83dbSDimitry Andric bool is_complex;
18495ffd83dbSDimitry Andric
18505ffd83dbSDimitry Andric RegisterContext *reg_ctx = thread->GetRegisterContext().get();
18515ffd83dbSDimitry Andric
18525ffd83dbSDimitry Andric bool set_it_simple = false;
18535ffd83dbSDimitry Andric if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
18545ffd83dbSDimitry Andric compiler_type.IsPointerType()) {
18555ffd83dbSDimitry Andric DataExtractor data;
18565ffd83dbSDimitry Andric Status data_error;
18575ffd83dbSDimitry Andric size_t num_bytes = new_value_sp->GetData(data, data_error);
18585ffd83dbSDimitry Andric if (data_error.Fail()) {
18595ffd83dbSDimitry Andric error.SetErrorStringWithFormat(
18605ffd83dbSDimitry Andric "Couldn't convert return value to raw data: %s",
18615ffd83dbSDimitry Andric data_error.AsCString());
18625ffd83dbSDimitry Andric return error;
18635ffd83dbSDimitry Andric }
18645ffd83dbSDimitry Andric lldb::offset_t offset = 0;
18655ffd83dbSDimitry Andric if (num_bytes <= 8) {
18665ffd83dbSDimitry Andric const RegisterInfo *r0_info = reg_ctx->GetRegisterInfo(
18675ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
18685ffd83dbSDimitry Andric if (num_bytes <= 4) {
18695ffd83dbSDimitry Andric uint32_t raw_value = data.GetMaxU32(&offset, num_bytes);
18705ffd83dbSDimitry Andric
18715ffd83dbSDimitry Andric if (reg_ctx->WriteRegisterFromUnsigned(r0_info, raw_value))
18725ffd83dbSDimitry Andric set_it_simple = true;
18735ffd83dbSDimitry Andric } else {
18745ffd83dbSDimitry Andric uint32_t raw_value = data.GetMaxU32(&offset, 4);
18755ffd83dbSDimitry Andric
18765ffd83dbSDimitry Andric if (reg_ctx->WriteRegisterFromUnsigned(r0_info, raw_value)) {
18775ffd83dbSDimitry Andric const RegisterInfo *r1_info = reg_ctx->GetRegisterInfo(
18785ffd83dbSDimitry Andric eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
18795ffd83dbSDimitry Andric uint32_t raw_value = data.GetMaxU32(&offset, num_bytes - offset);
18805ffd83dbSDimitry Andric
18815ffd83dbSDimitry Andric if (reg_ctx->WriteRegisterFromUnsigned(r1_info, raw_value))
18825ffd83dbSDimitry Andric set_it_simple = true;
18835ffd83dbSDimitry Andric }
18845ffd83dbSDimitry Andric }
18855ffd83dbSDimitry Andric } else {
18865ffd83dbSDimitry Andric error.SetErrorString("We don't support returning longer than 64 bit "
18875ffd83dbSDimitry Andric "integer values at present.");
18885ffd83dbSDimitry Andric }
18895ffd83dbSDimitry Andric } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
18905ffd83dbSDimitry Andric if (is_complex)
18915ffd83dbSDimitry Andric error.SetErrorString(
18925ffd83dbSDimitry Andric "We don't support returning complex values at present");
18935ffd83dbSDimitry Andric else
18945ffd83dbSDimitry Andric error.SetErrorString(
18955ffd83dbSDimitry Andric "We don't support returning float values at present");
18965ffd83dbSDimitry Andric }
18975ffd83dbSDimitry Andric
18985ffd83dbSDimitry Andric if (!set_it_simple)
18995ffd83dbSDimitry Andric error.SetErrorString(
19005ffd83dbSDimitry Andric "We only support setting simple integer return types at present.");
19015ffd83dbSDimitry Andric
19025ffd83dbSDimitry Andric return error;
19035ffd83dbSDimitry Andric }
19045ffd83dbSDimitry Andric
CreateFunctionEntryUnwindPlan(UnwindPlan & unwind_plan)19055ffd83dbSDimitry Andric bool ABISysV_arm::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
19065ffd83dbSDimitry Andric unwind_plan.Clear();
19075ffd83dbSDimitry Andric unwind_plan.SetRegisterKind(eRegisterKindDWARF);
19085ffd83dbSDimitry Andric
19095ffd83dbSDimitry Andric uint32_t lr_reg_num = dwarf_lr;
19105ffd83dbSDimitry Andric uint32_t sp_reg_num = dwarf_sp;
19115ffd83dbSDimitry Andric uint32_t pc_reg_num = dwarf_pc;
19125ffd83dbSDimitry Andric
19135ffd83dbSDimitry Andric UnwindPlan::RowSP row(new UnwindPlan::Row);
19145ffd83dbSDimitry Andric
19155ffd83dbSDimitry Andric // Our Call Frame Address is the stack pointer value
19165ffd83dbSDimitry Andric row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
19175ffd83dbSDimitry Andric
19185ffd83dbSDimitry Andric // The previous PC is in the LR
19195ffd83dbSDimitry Andric row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
19205ffd83dbSDimitry Andric unwind_plan.AppendRow(row);
19215ffd83dbSDimitry Andric
19225ffd83dbSDimitry Andric // All other registers are the same.
19235ffd83dbSDimitry Andric
19245ffd83dbSDimitry Andric unwind_plan.SetSourceName("arm at-func-entry default");
19255ffd83dbSDimitry Andric unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
19265ffd83dbSDimitry Andric
19275ffd83dbSDimitry Andric return true;
19285ffd83dbSDimitry Andric }
19295ffd83dbSDimitry Andric
CreateDefaultUnwindPlan(UnwindPlan & unwind_plan)19305ffd83dbSDimitry Andric bool ABISysV_arm::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
19315ffd83dbSDimitry Andric unwind_plan.Clear();
19325ffd83dbSDimitry Andric unwind_plan.SetRegisterKind(eRegisterKindDWARF);
19335ffd83dbSDimitry Andric
19345ffd83dbSDimitry Andric // TODO: Handle thumb
19355ffd83dbSDimitry Andric uint32_t fp_reg_num = dwarf_r11;
19365ffd83dbSDimitry Andric uint32_t pc_reg_num = dwarf_pc;
19375ffd83dbSDimitry Andric
19385ffd83dbSDimitry Andric UnwindPlan::RowSP row(new UnwindPlan::Row);
19395ffd83dbSDimitry Andric const int32_t ptr_size = 4;
19405ffd83dbSDimitry Andric
19415ffd83dbSDimitry Andric row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
19425ffd83dbSDimitry Andric row->SetOffset(0);
1943fe6060f1SDimitry Andric row->SetUnspecifiedRegistersAreUndefined(true);
19445ffd83dbSDimitry Andric
19455ffd83dbSDimitry Andric row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
19465ffd83dbSDimitry Andric row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
19475ffd83dbSDimitry Andric
19485ffd83dbSDimitry Andric unwind_plan.AppendRow(row);
19495ffd83dbSDimitry Andric unwind_plan.SetSourceName("arm default unwind plan");
19505ffd83dbSDimitry Andric unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
19515ffd83dbSDimitry Andric unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
19525ffd83dbSDimitry Andric unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
19535ffd83dbSDimitry Andric
19545ffd83dbSDimitry Andric return true;
19555ffd83dbSDimitry Andric }
19565ffd83dbSDimitry Andric
19575ffd83dbSDimitry Andric // cf. "ARMv6 Function Calling Conventions"
19585ffd83dbSDimitry Andric
19595ffd83dbSDimitry Andric // ARMv7 on GNU/Linux general purpose reg rules:
19605ffd83dbSDimitry Andric // r0-r3 not preserved (used for argument passing)
19615ffd83dbSDimitry Andric // r4-r11 preserved (v1-v8)
19625ffd83dbSDimitry Andric // r12 not presrved
19635ffd83dbSDimitry Andric // r13 preserved (stack pointer)
19645ffd83dbSDimitry Andric // r14 preserved (link register)
19655ffd83dbSDimitry Andric // r15 preserved (pc)
19665ffd83dbSDimitry Andric // cpsr not preserved (different rules for different bits)
19675ffd83dbSDimitry Andric
19685ffd83dbSDimitry Andric // ARMv7 VFP register rules:
19695ffd83dbSDimitry Andric // d0-d7 not preserved (aka s0-s15, q0-q3)
19705ffd83dbSDimitry Andric // d8-d15 preserved (aka s16-s31, q4-q7)
19715ffd83dbSDimitry Andric // d16-d31 not preserved (aka q8-q15)
19725ffd83dbSDimitry Andric
RegisterIsVolatile(const RegisterInfo * reg_info)19735ffd83dbSDimitry Andric bool ABISysV_arm::RegisterIsVolatile(const RegisterInfo *reg_info) {
19745ffd83dbSDimitry Andric if (reg_info) {
19755ffd83dbSDimitry Andric // Volatile registers are: r0, r1, r2, r3, r9, r12, r13 (aka sp)
19765ffd83dbSDimitry Andric const char *name = reg_info->name;
19775ffd83dbSDimitry Andric if (name[0] == 'r') {
19785ffd83dbSDimitry Andric switch (name[1]) {
19795ffd83dbSDimitry Andric case '0':
19805ffd83dbSDimitry Andric return name[2] == '\0'; // r0
19815ffd83dbSDimitry Andric case '1':
19825ffd83dbSDimitry Andric switch (name[2]) {
19835ffd83dbSDimitry Andric case '\0':
19845ffd83dbSDimitry Andric return true; // r1
19855ffd83dbSDimitry Andric case '2':
19865ffd83dbSDimitry Andric return name[3] == '\0'; // r12
19875ffd83dbSDimitry Andric default:
19885ffd83dbSDimitry Andric break;
19895ffd83dbSDimitry Andric }
19905ffd83dbSDimitry Andric break;
19915ffd83dbSDimitry Andric
19925ffd83dbSDimitry Andric case '2':
19935ffd83dbSDimitry Andric return name[2] == '\0'; // r2
19945ffd83dbSDimitry Andric case '3':
19955ffd83dbSDimitry Andric return name[2] == '\0'; // r3
19965ffd83dbSDimitry Andric default:
19975ffd83dbSDimitry Andric break;
19985ffd83dbSDimitry Andric }
19995ffd83dbSDimitry Andric } else if (name[0] == 'd') {
20005ffd83dbSDimitry Andric switch (name[1]) {
20015ffd83dbSDimitry Andric case '0':
20025ffd83dbSDimitry Andric return name[2] == '\0'; // d0 is volatile
20035ffd83dbSDimitry Andric
20045ffd83dbSDimitry Andric case '1':
20055ffd83dbSDimitry Andric switch (name[2]) {
20065ffd83dbSDimitry Andric case '\0':
20075ffd83dbSDimitry Andric return true; // d1 is volatile
20085ffd83dbSDimitry Andric case '6':
20095ffd83dbSDimitry Andric case '7':
20105ffd83dbSDimitry Andric case '8':
20115ffd83dbSDimitry Andric case '9':
20125ffd83dbSDimitry Andric return name[3] == '\0'; // d16 - d19 are volatile
20135ffd83dbSDimitry Andric default:
20145ffd83dbSDimitry Andric break;
20155ffd83dbSDimitry Andric }
20165ffd83dbSDimitry Andric break;
20175ffd83dbSDimitry Andric
20185ffd83dbSDimitry Andric case '2':
20195ffd83dbSDimitry Andric switch (name[2]) {
20205ffd83dbSDimitry Andric case '\0':
20215ffd83dbSDimitry Andric return true; // d2 is volatile
20225ffd83dbSDimitry Andric case '0':
20235ffd83dbSDimitry Andric case '1':
20245ffd83dbSDimitry Andric case '2':
20255ffd83dbSDimitry Andric case '3':
20265ffd83dbSDimitry Andric case '4':
20275ffd83dbSDimitry Andric case '5':
20285ffd83dbSDimitry Andric case '6':
20295ffd83dbSDimitry Andric case '7':
20305ffd83dbSDimitry Andric case '8':
20315ffd83dbSDimitry Andric case '9':
20325ffd83dbSDimitry Andric return name[3] == '\0'; // d20 - d29 are volatile
20335ffd83dbSDimitry Andric default:
20345ffd83dbSDimitry Andric break;
20355ffd83dbSDimitry Andric }
20365ffd83dbSDimitry Andric break;
20375ffd83dbSDimitry Andric
20385ffd83dbSDimitry Andric case '3':
20395ffd83dbSDimitry Andric switch (name[2]) {
20405ffd83dbSDimitry Andric case '\0':
20415ffd83dbSDimitry Andric return true; // d3 is volatile
20425ffd83dbSDimitry Andric case '0':
20435ffd83dbSDimitry Andric case '1':
20445ffd83dbSDimitry Andric return name[3] == '\0'; // d30 - d31 are volatile
20455ffd83dbSDimitry Andric default:
20465ffd83dbSDimitry Andric break;
20475ffd83dbSDimitry Andric }
20485ffd83dbSDimitry Andric break;
20495ffd83dbSDimitry Andric case '4':
20505ffd83dbSDimitry Andric case '5':
20515ffd83dbSDimitry Andric case '6':
20525ffd83dbSDimitry Andric case '7':
20535ffd83dbSDimitry Andric return name[2] == '\0'; // d4 - d7 are volatile
20545ffd83dbSDimitry Andric
20555ffd83dbSDimitry Andric default:
20565ffd83dbSDimitry Andric break;
20575ffd83dbSDimitry Andric }
20585ffd83dbSDimitry Andric } else if (name[0] == 's') {
20595ffd83dbSDimitry Andric switch (name[1]) {
20605ffd83dbSDimitry Andric case '0':
20615ffd83dbSDimitry Andric return name[2] == '\0'; // s0 is volatile
20625ffd83dbSDimitry Andric
20635ffd83dbSDimitry Andric case '1':
20645ffd83dbSDimitry Andric switch (name[2]) {
20655ffd83dbSDimitry Andric case '\0':
20665ffd83dbSDimitry Andric return true; // s1 is volatile
20675ffd83dbSDimitry Andric case '0':
20685ffd83dbSDimitry Andric case '1':
20695ffd83dbSDimitry Andric case '2':
20705ffd83dbSDimitry Andric case '3':
20715ffd83dbSDimitry Andric case '4':
20725ffd83dbSDimitry Andric case '5':
20735ffd83dbSDimitry Andric return name[3] == '\0'; // s10 - s15 are volatile
20745ffd83dbSDimitry Andric default:
20755ffd83dbSDimitry Andric break;
20765ffd83dbSDimitry Andric }
20775ffd83dbSDimitry Andric break;
20785ffd83dbSDimitry Andric
20795ffd83dbSDimitry Andric case '2':
20805ffd83dbSDimitry Andric case '3':
20815ffd83dbSDimitry Andric case '4':
20825ffd83dbSDimitry Andric case '5':
20835ffd83dbSDimitry Andric case '6':
20845ffd83dbSDimitry Andric case '7':
20855ffd83dbSDimitry Andric case '8':
20865ffd83dbSDimitry Andric case '9':
20875ffd83dbSDimitry Andric return name[2] == '\0'; // s2 - s9 are volatile
20885ffd83dbSDimitry Andric
20895ffd83dbSDimitry Andric default:
20905ffd83dbSDimitry Andric break;
20915ffd83dbSDimitry Andric }
20925ffd83dbSDimitry Andric } else if (name[0] == 'q') {
20935ffd83dbSDimitry Andric switch (name[1]) {
20945ffd83dbSDimitry Andric case '1':
20955ffd83dbSDimitry Andric switch (name[2]) {
20965ffd83dbSDimitry Andric case '\0':
20975ffd83dbSDimitry Andric return true; // q1 is volatile
20985ffd83dbSDimitry Andric case '0':
20995ffd83dbSDimitry Andric case '1':
21005ffd83dbSDimitry Andric case '2':
21015ffd83dbSDimitry Andric case '3':
21025ffd83dbSDimitry Andric case '4':
21035ffd83dbSDimitry Andric case '5':
21045ffd83dbSDimitry Andric return true; // q10-q15 are volatile
21055ffd83dbSDimitry Andric default:
21065ffd83dbSDimitry Andric return false;
21075ffd83dbSDimitry Andric }
21085ffd83dbSDimitry Andric break;
21095ffd83dbSDimitry Andric
21105ffd83dbSDimitry Andric case '0':
21115ffd83dbSDimitry Andric case '2':
21125ffd83dbSDimitry Andric case '3':
21135ffd83dbSDimitry Andric return name[2] == '\0'; // q0-q3 are volatile
21145ffd83dbSDimitry Andric case '8':
21155ffd83dbSDimitry Andric case '9':
21165ffd83dbSDimitry Andric return name[2] == '\0'; // q8-q9 are volatile
21175ffd83dbSDimitry Andric default:
21185ffd83dbSDimitry Andric break;
21195ffd83dbSDimitry Andric }
21205ffd83dbSDimitry Andric } else if (name[0] == 's' && name[1] == 'p' && name[2] == '\0')
21215ffd83dbSDimitry Andric return true;
21225ffd83dbSDimitry Andric }
21235ffd83dbSDimitry Andric return false;
21245ffd83dbSDimitry Andric }
21255ffd83dbSDimitry Andric
Initialize()21265ffd83dbSDimitry Andric void ABISysV_arm::Initialize() {
21275ffd83dbSDimitry Andric PluginManager::RegisterPlugin(GetPluginNameStatic(),
21285ffd83dbSDimitry Andric "SysV ABI for arm targets", CreateInstance);
21295ffd83dbSDimitry Andric }
21305ffd83dbSDimitry Andric
Terminate()21315ffd83dbSDimitry Andric void ABISysV_arm::Terminate() {
21325ffd83dbSDimitry Andric PluginManager::UnregisterPlugin(CreateInstance);
21335ffd83dbSDimitry Andric }
2134