#if !__ASSEMBLER__
#if CPUFAM_X86
-typedef union gp32 gpreg;
+ typedef union gp32 gpreg;
#endif
#if CPUFAM_AMD64
-typedef union gp64 gpreg;
+ typedef union gp64 gpreg;
#endif
struct gpsave {
#if FLT_RADIX == 2 && LDBL_MANT_DIG == 64
long double f80;
#endif
-unsigned char _pad[16];
+ unsigned char _pad[16];
};
union xmm { SIMD_COMMON(128); };
#else
.extern regdump_gpsave
+ // Save general-purpose registers at r/esp; flags, r/eax, and, on
+ // x86, ebx, should have been filled in already, together with the
+ // focus address, in `REGIX_ADDR', if relevant. Return required
+ // extended save area size in ecx, and leave r/ebp pointing to the
+ // save area.
+
.extern regdump_xtsave
+ // Save extended registers at r/esp, leaving r/ebp pointing to the
+ // register map.
+
.extern regdump_xtrstr
+ // Restore extended registers from register map in r/ebp, leaving
+ // r/ebp pointing to general-purpose save area.
+
.extern regdump_gprstr
+ // Restore general-purpose registers, except r/esp, from save area
+ // at r/ebp.
regmap_gp = 0*WORDSZ
regmap_fx = 1*WORDSZ
mov [SP - REGDUMP_SPADJ + (REGIX_AX - 1)*WORDSZ], AX
.ifnes "\addr", "nil"
- // Collect the effective address for the following dump, leaving it
- // in the `addr' slot of the dump.
+ // Collect the focus address for the following dump, leaving it in
+ // the `addr' slot of the dump.
lea AX, \addr
mov [SP - REGDUMP_SPADJ + (REGIX_ADDR - 1)*WORDSZ], AX
.endif
#else
.extern regdump_gpsave
+ // Save general-purpose registers at r13; r12 and r14 should have
+ // been filled in already, along with the focus address in
+ // `REGIX_ADDR', if relevant. Return required extended save area
+ // size in r0, leave r4 pointing to the save area, and set r6 to
+ // the focus address.
+
.extern regdump_xtsave
+ // Save extended registers at r13, leaving r5 pointing to the
+ // register map.
+
.extern regdump_xtrstr
+ // Restore extended registers from register map at r5.
+
.extern regdump_gprstr
+ // Restore general-purpose registers, except r13 and r14, from save
+ // area at r4.
regmap_gp = 0
regmap_fp = 4
str r14, [r13, #-REGDUMP_GPSIZE + 14*4]
.ifnes "\base,\off", "nil,#0"
- // Collect the effective address for the following dump, leaving it
- // in the `addr' slot of the dump.
+ // Collect the focus address for the following dump, leaving it in
+ // the `addr' slot of the dump.
.ifeqs "\base", "nil"
adrl r14, \off
.else
#else
.extern regdump_gpsave
+ // Save general-purpose registers at sp; x16, x17, and x30, should
+ // have been filled in already, along with the focus address in
+ // `REGIX_ADDR', if relevant. Return required extended save area
+ // size in x0, leave x20 pointing to the save area, and set x22 to
+ // the focus address.
+
.extern regdump_xtsave
+ // Save extended registers at sp, leaving x21 pointing to the
+ // register map.
+
.extern regdump_xtrstr
+ // Restore extended registers from register map at x21.
+
.extern regdump_gprstr
+ // Restore general-purpose registers, except sp and x30, from save
+ // area at x20.
regmap_gp = 0
regmap_fp = 8
str x30, [sp, #-REGDUMP_GPSIZE + 30*8]
.ifnes "\base,\off", "nil,#0"
- // Collect the effective address for the following dump, leaving it
- // in the `addr' slot of the dump.
+ // Collect the focus address for the following dump, leaving it in
+ // the `addr' slot of the dump.
.ifeqs "\base", "nil"
adr x30, \off
.else