From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26259 invoked by alias); 1 Oct 2004 09:01:13 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25841 invoked from network); 1 Oct 2004 09:01:11 -0000 Received: from unknown (HELO mail02.idc.renesas.com) (202.234.163.13) by sourceware.org with SMTP; 1 Oct 2004 09:01:11 -0000 Received: (from root@localhost) by guardian05.idc.renesas.com with id i91916Ao013730 for gdb-patches@sources.redhat.com; Fri, 1 Oct 2004 18:01:06 +0900 (JST) Received: from unknown [172.20.8.71] by guardian05.idc.renesas.com with SMTP id UAA13729 ; Fri, 1 Oct 2004 18:01:06 +0900 Received: from mrkaisv.hoku.renesas.com ([10.145.105.245]) by rnsmtp01.hoku_r.renesas.com (8.9.3/3.7W) with ESMTP id SAA29173 for ; Fri, 1 Oct 2004 18:01:06 +0900 (JST) Received: from E5A02646 (unknown [10.145.105.81]) by mrkaisv.hoku.renesas.com (Postfix) with SMTP id 78B1979809C for ; Fri, 1 Oct 2004 18:01:06 +0900 (JST) Message-ID: <01a201c4a795$2fc40e00$5169910a@E5A02646> From: "Kei Sakamoto" To: References: <019201c4a794$e46529d0$5169910a@E5A02646> Subject: Re: [RFA/m32r] set return_value Date: Fri, 01 Oct 2004 09:01:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_019F_01C4A7E0.9F8A2440" X-SW-Source: 2004-10/txt/msg00008.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_019F_01C4A7E0.9F8A2440 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Content-length: 679 I'm sorry. I forgot to attach the patch file again... > Hello, > > The attached patch removes deprecated_extract_struct_value_address > and deprecated_use_struct_convention from m32r-tdep.c and > sets return_value. > > OK to commit? > > 2004-10-01 Kei Sakamoto > > * m32r-tdep.c (m32r_use_struct_convention): Delete function. > (m32r_extract_struct_value_address): Delete function. > (m32r_return_value): New function. > (m32r_gdbarch_init): Instead of store_return_value, > extract_return_value, deprecated_extract_struct_value_address > and deprecated_use_struct_convention, set return_value. ------=_NextPart_000_019F_01C4A7E0.9F8A2440 Content-Type: application/octet-stream; name="m32r-tdep.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="m32r-tdep.patch" Content-length: 3235 Index: m32r-tdep.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/m32r-tdep.c,v=0A= retrieving revision 1.31=0A= diff -u -r1.31 m32r-tdep.c=0A= --- m32r-tdep.c 1 Oct 2004 07:29:34 -0000 1.31=0A= +++ m32r-tdep.c 1 Oct 2004 08:43:22 -0000=0A= @@ -55,19 +55,6 @@=0A= return sp & ~3;=0A= }=0A= =20=0A= -/* Should we use DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS instead of=0A= - EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc and TYPE=0A= - is the type (which is known to be struct, union or array).=0A= -=0A= - The m32r returns anything less than 8 bytes in size in=0A= - registers. */=0A= -=0A= -static int=0A= -m32r_use_struct_convention (int gcc_p, struct type *type)=0A= -{=0A= - return (TYPE_LENGTH (type) > 8);=0A= -}=0A= -=0A= =20=0A= /* BREAKPOINT */=0A= #define M32R_BE_BREAKPOINT32 {0x10, 0xf1, 0x70, 0x00}=0A= @@ -266,19 +253,6 @@=0A= }=0A= }=0A= =20=0A= -/* Extract from an array REGBUF containing the (raw) register state=0A= - the address in which a function should return its structure value,=0A= - as a CORE_ADDR (or an expression that can be used as one). */=0A= -=0A= -static CORE_ADDR=0A= -m32r_extract_struct_value_address (struct regcache *regcache)=0A= -{=0A= - ULONGEST addr;=0A= - regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &addr);=0A= - return addr;=0A= -}=0A= -=0A= -=0A= /* This is required by skip_prologue. The results of decoding a prologue= =0A= should be cached because this thrashing is getting nuts. */=0A= =20=0A= @@ -781,6 +755,24 @@=0A= }=0A= }=0A= =20=0A= +enum return_value_convention=0A= +m32r_return_value (struct gdbarch *gdbarch, struct type *valtype,=0A= + struct regcache *regcache, void *readbuf,=0A= + const void *writebuf)=0A= +{=0A= + if (TYPE_LENGTH (valtype) > 8)=0A= + return RETURN_VALUE_STRUCT_CONVENTION;=0A= + else=0A= + {=0A= + if (readbuf !=3D NULL)=0A= + m32r_extract_return_value (valtype, regcache, readbuf);=0A= + if (writebuf !=3D NULL)=0A= + m32r_store_return_value (valtype, regcache, writebuf);=0A= + return RETURN_VALUE_REGISTER_CONVENTION;=0A= + }=0A= +}=0A= +=0A= +=0A= =20=0A= static CORE_ADDR=0A= m32r_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)=0A= @@ -900,13 +892,8 @@=0A= set_gdbarch_register_name (gdbarch, m32r_register_name);=0A= set_gdbarch_register_type (gdbarch, m32r_register_type);=0A= =20=0A= - set_gdbarch_extract_return_value (gdbarch, m32r_extract_return_value);= =0A= set_gdbarch_push_dummy_call (gdbarch, m32r_push_dummy_call);=0A= - set_gdbarch_store_return_value (gdbarch, m32r_store_return_value);=0A= - set_gdbarch_deprecated_extract_struct_value_address (gdbarch,=0A= - m32r_extract_struct_value_address);=0A= - set_gdbarch_deprecated_use_struct_convention (gdbarch,=0A= - m32r_use_struct_convention);=0A= + set_gdbarch_return_value (gdbarch, m32r_return_value);=0A= =20=0A= set_gdbarch_skip_prologue (gdbarch, m32r_skip_prologue);=0A= set_gdbarch_inner_than (gdbarch, core_addr_lessthan);=0A= ------=_NextPart_000_019F_01C4A7E0.9F8A2440--