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:ppc] Cleanup SVR4 push dummy call


On Sep 12, 11:01am, Andrew Cagney wrote:

> 	* ppc-sysv-tdep.c (align_up, align_down): Replace "round2" macro.
> 	(ppc_sysv_abi_push_dummy_call): Rewrite, use a two pass loop.

Okay, except...

> ! 	  else if (len == 8 
> ! 		   && (TYPE_CODE (type) == TYPE_CODE_INT /* long long */
> ! 		       || (!ppc_floating_point_unit_p (current_gdbarch)
> ! 			   && TYPE_CODE (type) == TYPE_CODE_FLT))) /* double */
> ! 	    {
> ! 	      /* "long long" or "double" passed in an odd/even
> !                  register pair with the low addressed word in the odd
> !                  register and the high addressed word in the even
> !                  register, or when the registers run out an 8 byte
> !                  aligned stack location.  */
> ! 	      if (greg > 9)
> ! 		{
> ! 		  /* Just in case GREG was 10.  */
> ! 		  greg = 11;
> ! 		  argoffset = align_up (argoffset, 8);
> ! 		  write_memory (sp + argoffset, val, len);

...I believe you forgot the ``if (write_pass)'' check on the above
call to write_memory().

Kevin


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