This is the mail archive of the mailing list for the binutils 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: PATCH : H8300 Simulator File I/O Implementation

> Hi Venky,
> You might want to send your patch to as
> well, possibly after separating the patch for individual projects
> (binutils, newlib, and gdb-patches)!?

Two diferent patches, the simulator_patch.txt for GDB and newlib_patch.txt
patching newlib sources. I have attached them.

Both contain the changes required in include/opcode/h8300.h.

To change include/opcode/h8300.h, do I need to send patch to some other
list too?

> ! 		  /* And a jsr to these locations are turned 
> into magic traps. */
>   		  if (dst->opcode == O (O_JSR, SB))
>   		    {
> ! 		      if (dst->src.literal == 0xc5)
> This may be up to your preference, but what about "switch 
> (dst->src.literal)"?

Changed to a switch statement. (Just a matter of preference)

> ! 	    /* Setting filename_ptr to first argument of open */
> ! 	    filename_ptr = cpu.regs[0];
> I think the GNU coding standard prefers a complete sentence (well,
> except the subject) ending with a period and two spaces like
>   /* Set filename_ptr to the first argument of open.   */

Changed the comment format.

> ! 	    /* Allocating space for the filename */
> ! 	    filename = (char *)malloc(sizeof(char) * len);
> Do you free this filename somewhere?

Freed the memory allocated.

> Thanks,
> Kazu Hirata

Thanks a lot for taking a look at the patch and pointing out the


PS : The start of this message thread can be found at

ChangeLog entry for compile.c in sim/h8300/

Mon Dec  2 16:44:35 IST 2002  D.Venkatasubramanian

	* compile.c (decode): Added code for some more magic traps.
	* compile.c (sim_resume): Added support for File I/O system
	calls through callback to host_system.
	System calls provided support for :
	Only basic support for stat and fstat.

Change Log entry for files in newlib/

Mon Dec  2 16:47:01 IST 2002 D.Venkatasubramanian

	* /libc/sys/h8300hms/syscalls.c: Support for various File I/O
	related system calls. Jump to magic vector locations, instead
	of dummy return values.
	* /libc/sys/h8300hms/read.c: Jump to magic vector location for
	supporting read system call.
	* /libc/sys/h8300hms/write.c: Jump to magic vector location for
	supporting write system call.

Change Log entry for file in include/opcode

Mon Dec  2 16:47:09 IST 2002 D.Venkatasubramanian

	*h8300.h: Added some more pseudo opcodes for system call processing.

Attachment: simulator_patch.txt
Description: Text document

Attachment: simulator_ChangeLog.txt
Description: Text document

Attachment: newlib_patch.txt
Description: Text document

Attachment: newlib_ChangeLog.txt
Description: Text document

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