-/* Decode a MIPS32 instruction that saves a register in the stack, and
- set the appropriate bit in the general register mask or float register mask
- to indicate which register is saved. This is a helper function
- for mips_find_saved_regs. */
-
-static void
-mips32_decode_reg_save (t_inst inst, unsigned long *gen_mask,
- unsigned long *float_mask)
-{
- int reg;
-
- if ((inst & 0xffe00000) == 0xafa00000 /* sw reg,n($sp) */
- || (inst & 0xffe00000) == 0xafc00000 /* sw reg,n($r30) */
- || (inst & 0xffe00000) == 0xffa00000) /* sd reg,n($sp) */
- {
- /* It might be possible to use the instruction to
- find the offset, rather than the code below which
- is based on things being in a certain order in the
- frame, but figuring out what the instruction's offset
- is relative to might be a little tricky. */
- reg = (inst & 0x001f0000) >> 16;
- *gen_mask |= (1 << reg);
- }
- else if ((inst & 0xffe00000) == 0xe7a00000 /* swc1 freg,n($sp) */
- || (inst & 0xffe00000) == 0xe7c00000 /* swc1 freg,n($r30) */
- || (inst & 0xffe00000) == 0xf7a00000) /* sdc1 freg,n($sp) */
-
- {
- reg = ((inst & 0x001f0000) >> 16);
- *float_mask |= (1 << reg);
- }
-}
-