Mon Feb 10 12:37:47 1998 Philippe De Muyter <phdm@macqel.be>

* m68k/tm-delta68.h (EXTRACT_RETURN_VALUE): Type argument for
        `REGISTER_CONVERT_TO_VIRTUAL is `TYPE', not
        `REGISTER_VIRTUAL_TYPE (FP0_REGNUM)';
        (STORE_RETURN_VALUE): Ditto, and offset for `write_register_bytes'
        is `REGISTER_BYTE (FP0_REGNUM)', not `FP0_REGNUM'.
        (FRAME_NUM_ARGS): New macro.
        * m68k/tm-news.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): Ditto.
        * delta68-nat.c (clear_insn_cache): New function, forgotten in previous
        patch.
This commit is contained in:
Jason Molenda 1998-02-10 20:14:43 +00:00
parent 7d620e23ed
commit 75a1d67abb
4 changed files with 42 additions and 11 deletions

View File

@ -1,3 +1,15 @@
Mon Feb 10 12:37:47 1998 Philippe De Muyter <phdm@macqel.be>
* m68k/tm-delta68.h (EXTRACT_RETURN_VALUE): Type argument for
`REGISTER_CONVERT_TO_VIRTUAL is `TYPE', not
`REGISTER_VIRTUAL_TYPE (FP0_REGNUM)';
(STORE_RETURN_VALUE): Ditto, and offset for `write_register_bytes'
is `REGISTER_BYTE (FP0_REGNUM)', not `FP0_REGNUM'.
(FRAME_NUM_ARGS): New macro.
* m68k/tm-news.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): Ditto.
* delta68-nat.c (clear_insn_cache): New function, forgotten in previous
patch.
Mon Feb 9 11:10:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
* d10v-tdep.c: Replace references to IMEM_ADDR and DMEM_ADDR with
@ -27,7 +39,7 @@ Mon Feb 9 15:35:38 1998 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (init.c): Ignore errors when making init.c. Seems
necessary to work around bug in Solaris make.
Sun Jul 6 02:44:28 1997 Philippe De Muyter <phdm@macqel.be>
Sun Feb 6 02:44:28 1997 Philippe De Muyter <phdm@macqel.be>
* m68k/tm-delta68.h (CPLUS_MARKER): Macro deleted.
(EXTRACT_STRUCT_VALUE_ADDRESS): Macro defined.

View File

@ -44,8 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, \
REGISTER_VIRTUAL_TYPE (FP0_REGNUM), \
REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
&REGBUF[REGISTER_BYTE (FP0_REGNUM)], \
VALBUF); \
else \
@ -65,15 +64,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \
char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
REGISTER_CONVERT_TO_RAW (REGISTER_VIRTUAL_TYPE (FP0_REGNUM), \
FP0_REGNUM, VALBUF, raw_buf); \
write_register_bytes (FP0_REGNUM, \
REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
} \
else \
write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
VALBUF, TYPE_LENGTH (TYPE))
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
#define FRAME_NUM_ARGS(val, fi) \
{ register CORE_ADDR pc = FRAME_SAVED_PC (fi); \
register int insn = 0177777 & read_memory_integer (pc, 2); \
val = 0; \
if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */ \
val = read_memory_integer (pc + 2, 2); \
else if ((insn & 0170777) == 0050217 /* addql #N, sp */ \
|| (insn & 0170777) == 0050117) /* addqw */ \
{ val = (insn >> 9) & 7; if (val == 0) val = 8; } \
else if (insn == 0157774) /* addal #WW, sp */ \
val = read_memory_integer (pc + 2, 4); \
val >>= 2; }
/* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
the processor's instruction cache as it should. */
#define CLEAR_INSN_CACHE() clear_insn_cache()

View File

@ -34,8 +34,7 @@ Here is an m-news.h file for gdb. It supports the 68881 registers.
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
{ if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \
REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, \
REGISTER_VIRTUAL_TYPE (FP0_REGNUM), \
REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
&REGBUF[REGISTER_BYTE (FP0_REGNUM)], \
VALBUF); \
} \
@ -50,9 +49,8 @@ Here is an m-news.h file for gdb. It supports the 68881 registers.
{ if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \
char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
REGISTER_CONVERT_TO_RAW (REGISTER_VIRTUAL_TYPE (FP0_REGNUM), \
FP0_REGNUM, VALBUF, raw_buf); \
write_register_bytes (FP0_REGNUM, \
REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
} \
else \

View File

@ -77,3 +77,10 @@ _initialize_delta68_nat ()
exit (1);
}
}
clear_insn_cache ()
{
#ifdef MCT_TEXT /* in sys/signal.h on sysV68 R3V7.1 */
memctl(0, 4096, MCT_TEXT);
#endif
}