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: Adding MAC registers on H8300 Simulator [H8S/2600]


Hi,

OK, Here's the patch. It will flag an illegal
instruction when a "mac" instruction is 
encountered. Otherwise, works fine for clrmac,
ldmac and stmac.

The MAC instruction requires a SYSR register,
but no description seems to be given about
that. Any ideas/suggestions on that front.

One more change required in binutils
(include/opcode/h8300.h) has already been
applied by Nick.

I succeeded in getting GDB to recognise the
mach and macl registers when the target is
H8S, but does not seem possible with the
current implementation to do so only for
H8S/2600. Will require an addition to the
target. Additional targets for H8 Series
was discussed on the Binutils list a while
ago, but nothing seems to have come out of
it.

Can you review the patch and give inputs.

Thanks and Regards,

Venky

 ----------------  sim/h8300 ---------------
2003-03-13 D.Venkatasubramanian <dvenkat at noida dot hcltech dot com>
	* compile.c: Added #define OP_MACREG.
	Added #define MACH_REGNUM and MACL_REGNUM.
	(decode): Added MACREG support.
	(fetch): Added OP_MACREG support.
	(store): Added OP_MACREG support.
	(sim_resume): Added support for O_CLRMAC,
	O_LDMAC and O_STMAC.
	* inst.h: Added n_mult, z_mult and v_mult variables
	for N-MULT, Z-MULT and V-MULT flags.
	Added mac_insn variable for setting a flag when a 
	MAC instruction is executed.
	(struct cpu_state_type): Added mach and macl.

 ---------------- gdb/ -----------------------
2003-03-13 D.Venkatasubramanian <dvenkat at noida dot hcltech dot com>

	* h8300-tdep.c: Incresed E_NUM_REGS by 2 for H8S.
	(enum gdb_regnum): Added E_MACH_REGNUM, E_MACL_REGNUM.
	(h8300_register_name): Added mach and macl for H8S.
	(h8300_print_register): Print mach and macl values.


>-----Original Message-----
>From: D.Venkatasubramanian, Noida 
>Sent: Thursday, March 13, 2003 11:13 AM
>To: Michael Snyder; 'gdb-patches at sources dot redhat dot com'
>Subject: RE: Adding MAC registers on H8300 Simulator [H8S/2600]
>
>
>
>>
>>"D.Venkatasubramanian, Noida" wrote:
>>> 
>>> Hi All,
>>> 
>>> As the H8S/2600 CPU has MAC registers, specifically
>>> MACH and MACL, I added them to the H8300 Simulator. How
>>> do I make GDB recognize these registers, more
>>> specifically, what are the files that need to be
>>> modified? In the simulator, I have added the registers
>>> in the cpu_state structure and some other places.
>>
>>Hi Venky -- 
>>
>>You did?  I don't see your changes in the repository, 
>>nor do I see your name in the ChangeLog.
>>
>>I would be interested in helping you get these changes in.
>>Can you send me your patches, or pointers to them?
>>
>
>Well, I did that locally, I will regenerate the patches
>and send it today. BTW, there was a problem, the
>description for the MAC instruction is not clear, it says,
>it requires a SYSR (System Register), but no such register
>seems to be described. I have disabled that instruction.
>Maybe, you could help me figure it out, how to go about it.
>
>>
>>> Also, how do I make these registers conditionally
>>> displayed on GDB when the CPU is H8S/2600.
>>
>>This sounds like a job for -- gdbarch!
>>Don't worry, it should not be too difficult.
>>
>>Michael
>>
>
>Venky
>

Attachment: sim_ChangeLog.txt
Description: Text document

Attachment: inst_patch.txt
Description: Text document

Attachment: h8300-tdep_patch.txt
Description: Text document

Attachment: gdb_ChangeLog.txt
Description: Text document

Attachment: compile_patch.txt
Description: Text document


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