From: Kevin Buettner <kevinb@redhat.com>
To: Elena Zannoni <ezannoni@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] Altivec ABI patches
Date: Fri, 26 Apr 2002 16:02:00 -0000 [thread overview]
Message-ID: <1020426230236.ZM31350@localhost.localdomain> (raw)
In-Reply-To: Elena Zannoni <ezannoni@redhat.com> "[RFA] Altivec ABI patches" (Apr 26, 4:44pm)
On Apr 26, 4:44pm, Elena Zannoni wrote:
> As promised, this patch adds the last missing bits of Altivec support.
> It handles the new vector types for passing parameters and returning
> values.
>
> Elena
>
> 2002-04-26 Elena Zannoni <ezannoni@redhat.com>
>
> * rs6000-tdep.c (rs6000_extract_return_value,
> rs6000_store_return_value): Handle returning vectors.
> (rs6000_gdbarch_init): Use
> ppc_sysv_abi_broken_use_struct_convention for native sysv cases.
> * ppc-linux-tdep.c (ppc_sysv_abi_broken_use_struct_convention):
> New function.
> (ppc_sysv_abi_use_struct_convention): Deal with functions returning
> vectors.
> (ppc_sysv_abi_push_arguments): Handle vector parameters.
> * ppc-tdep.h (ppc_sysv_abi_broken_use_struct_convention): Export.
These changes look reasonable except for the following change to
ppc_sysv_abi_push_arguments():
> + if (vreg <= 13)
> + {
> + *(int *) ®isters[REGISTER_BYTE (tdep->ppc_vr0_regnum
> + + vreg)] = 0;
> + memcpy (®isters[REGISTER_BYTE (tdep->ppc_vr0_regnum
> + + vreg)],
> + v_val_buf, 16);
> + vreg++;
> + }
Specifically, I'm having trouble understanding the point of this
assignment:
> + *(int *) ®isters[REGISTER_BYTE (tdep->ppc_vr0_regnum
> + + vreg)] = 0;
Note that the subsequent memcpy() ends up overwriting the memory
zero'd by the assignment. If the assignment does serve some useful
purpose, I'd prefer to see memset() used instead.
Your patch is approved so long as you address this point.
Thanks,
Kevin
next prev parent reply other threads:[~2002-04-26 23:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-26 13:45 Elena Zannoni
2002-04-26 16:02 ` Kevin Buettner [this message]
2002-04-26 18:45 ` Elena Zannoni
2002-04-27 1:08 ` Kevin Buettner
2002-04-27 12:12 ` David Edelsohn
2002-04-29 8:40 ` Elena Zannoni
2002-04-29 12:45 ` Jim Blandy
2002-04-29 13:31 ` Elena Zannoni
2002-05-01 9:13 ` Jim Blandy
2002-05-02 0:22 ` Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1020426230236.ZM31350@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox