This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa?] Implement ppc32 SYSV {extract,store} return value


On Oct 10, 4:22pm, Andrew Cagney wrote:


How is the attached?


Very close. I just noticed the following:

+  if ((TYPE_CODE (type) == TYPE_CODE_INT
+       && TYPE_LENGTH (type) == 8
+       && tdep->wordsize == 4)
+      || (TYPE_CODE (type) == TYPE_CODE_FLT
+	  && TYPE_LENGTH (type) == 8 && tdep->wordsize == 4))

According to do_ppc_sysv_return_value's comment, tdep->wordsize will
have to be 4.  (Since it's for the "SysV 32-bit PowerPC ABI...")

So, could you please do the following:

    - Remove the ``tdep->wordsize == 4'' tests in the above expression.
    - Insert the following statement at some appropriate place
      at the beginning of the function:

gdb_assert (tdep->wordsize == 4);

Once that's done, it's okay. (Go ahead and check it in.)

Committed (with tweaks),


Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]