summaryrefslogtreecommitdiff
path: root/gdb/ppc-sysv-tdep.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-01-10 20:38:51 +0000
committerMichael Snyder <msnyder@vmware.com>2011-01-10 20:38:51 +0000
commit0df8b4180acb4890d058c92753dafcd4ff0a87d1 (patch)
treebd772466e4054c3b326e524993c17e1ac0e974ab /gdb/ppc-sysv-tdep.c
parenta73c6dcdd42994167dfec4db36b0d0ad439d39ad (diff)
2011-01-10 Michael Snyder <msnyder@vmware.com>
* nto-procfs.c: Comment cleanup, mostly periods and spaces. * nto-tdep.c: Ditto. * nto-tdep.h: Ditto. * objc-exp.y: Ditto. * objc-lang.c: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * observer.c: Ditto. * opencl-lang.c: Ditto. * osabi.c: Ditto. * parse.c: Ditto. * parser-defs.h: Ditto. * p-exp.y: Ditto. * p-lang.c: Ditto. * posix-hdep.c: Ditto. * ppcbug-rom.c: Ditto. * ppc-linux-nat.c: Ditto. * ppc-linux-tdep.c: Ditto. * ppc-linux-tdep.h: Ditto. * ppcnbsd-tdep.c: Ditto. * ppcobsd-tdep.c: Ditto. * ppcobsd-tdep.h: Ditto. * ppc-sysv-tdep.c: Ditto. * ppc-tdep.h: Ditto. * printcmd.c: Ditto. * proc-abi.c: Ditto. * proc-flags.c: Ditto. * procfs.c: Ditto. * proc-utils.h: Ditto. * progspace.h: Ditto. * prologue-value.c: Ditto. * prologue-value.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * ravenscar-sparc-thread.c: Ditto. * ravenscar-thread.c: Ditto. * ravenscar-thread.h: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote.c: Ditto. * remote-fileio.c: Ditto. * remote-fileio.h: Ditto. * remote.h: Ditto. * remote-m32r-sdi.c: Ditto. * remote-mips.c: Ditto. * remote-sim.c: Ditto. * rs6000-aix-tdep.c: Ditto. * rs6000-nat.c: Ditto. * rs6000-tdep.c: Ditto.
Diffstat (limited to 'gdb/ppc-sysv-tdep.c')
-rw-r--r--gdb/ppc-sysv-tdep.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 81d0f5512a..23d7a71021 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -31,16 +31,16 @@
#include "objfiles.h"
#include "infcall.h"
-/* Pass the arguments in either registers, or in the stack. Using the
+/* Pass the arguments in either registers, or in the stack. Using the
ppc sysv ABI, the first eight words of the argument list (that might
be less than eight parameters if some parameters occupy more than one
word) are passed in r3..r10 registers. float and double parameters are
- passed in fpr's, in addition to that. Rest of the parameters if any
- are passed in user stack.
+ passed in fpr's, in addition to that. Rest of the parameters if any
+ are passed in user stack.
If the function is returning a structure, then the return address is passed
in r3, then the first 7 words of the parametes can be passed in registers,
- starting from r4. */
+ starting from r4. */
CORE_ADDR
ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
@@ -387,7 +387,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|| TYPE_CODE (type) == TYPE_CODE_UNION)
{
/* Structs and large values are put in an
- aligned stack slot ... */
+ aligned stack slot ... */
if (TYPE_CODE (type) == TYPE_CODE_ARRAY
&& TYPE_VECTOR (type)
&& len >= 16)
@@ -443,7 +443,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
/* The psABI says that "A caller of a function that takes a
variable argument list shall set condition register bit 6 to
1 if it passes one or more arguments in the floating-point
- registers. It is strongly recommended that the caller set the
+ registers. It is strongly recommended that the caller set the
bit to 0 otherwise..." Doing this for normal functions too
shouldn't hurt. */
if (write_pass)
@@ -587,7 +587,8 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type,
if (TYPE_CODE (type) == TYPE_CODE_FLT
&& TYPE_LENGTH (type) == 16
&& !tdep->soft_float
- && (gdbarch_long_double_format (gdbarch) == floatformats_ibm_long_double))
+ && (gdbarch_long_double_format (gdbarch)
+ == floatformats_ibm_long_double))
{
/* IBM long double stored in f1 and f2. */
if (readbuf)
@@ -606,7 +607,8 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type,
}
if (TYPE_LENGTH (type) == 16
&& ((TYPE_CODE (type) == TYPE_CODE_FLT
- && (gdbarch_long_double_format (gdbarch) == floatformats_ibm_long_double))
+ && (gdbarch_long_double_format (gdbarch)
+ == floatformats_ibm_long_double))
|| (TYPE_CODE (type) == TYPE_CODE_DECFLOAT && tdep->soft_float)))
{
/* Soft-float IBM long double or _Decimal128 stored in r3, r4,
@@ -880,15 +882,16 @@ convert_code_addr_to_desc_addr (CORE_ADDR code_addr, CORE_ADDR *desc_addr)
return 1;
}
-/* Pass the arguments in either registers, or in the stack. Using the
+/* Pass the arguments in either registers, or in the stack. Using the
ppc 64 bit SysV ABI.
This implements a dumbed down version of the ABI. It always writes
values to memory, GPR and FPR, even when not necessary. Doing this
- greatly simplifies the logic. */
+ greatly simplifies the logic. */
CORE_ADDR
-ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
+ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
+ struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
@@ -906,7 +909,7 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
in the for-loop below. */
LONGEST gparam_size = 0;
/* Kevin writes ... I don't mind seeing tdep->wordsize used in the
- calls to align_up(), align_down(), etc. because this makes it
+ calls to align_up(), align_down(), etc. because this makes it
easier to reuse this code (in a copy/paste sense) in the future,
but it is a 64-bit ABI and asserting that the wordsize is 8 bytes
at some point makes it easier to verify that this function is
@@ -1452,7 +1455,8 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *func_type,
if (readbuf)
regcache_cooked_read (regcache, tdep->ppc_vr0_regnum + 2, readbuf);
if (writebuf)
- regcache_cooked_write (regcache, tdep->ppc_vr0_regnum + 2, writebuf);
+ regcache_cooked_write (regcache, tdep->ppc_vr0_regnum + 2,
+ writebuf);
return RETURN_VALUE_REGISTER_CONVENTION;
}
}