+ if ((X_I (insn) == 0 && X_RS1 (insn) == 0 && X_RS2 (insn) == 0)
+ || (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
+ {
+ /* "New" system call. */
+ ULONGEST number = get_frame_register_unsigned (frame, SPARC_G1_REGNUM);
+
+ if (number & 0x400)
+ return get_frame_register_unsigned (frame, SPARC_G2_REGNUM);
+ if (number & 0x800)
+ return get_frame_register_unsigned (frame, SPARC_G7_REGNUM);
+ }
+
+ return 0;