This is the mail archive of the binutils@sources.redhat.com 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] Fix for ldm/stm instructions in H8S


Hi Nick,
Thank you. I missed this test.
Regards,
Asgari

-----Original Message-----
From: Nick Clifton [mailto:nickc@redhat.com]
Sent: Wednesday, November 26, 2003 6:13 PM
To: Asgari J. Jinia; rsandifo@redhat.com
Cc: binutils@sources.redhat.com
Subject: Re: [PATCH] Fix for ldm/stm instructions in H8S


Hi Asgari, Hi Richard,

: Richard writes:
:
: Hmm, I see the changes you made are the ones below.  Are you sure
: that's right?

Nope - it was just a guess on my part.

: My understanding was that r4-r7 was a valid sequence on the H8SX.  I
: think the tech note only applies to the H8S.


> Asgari writes:
>
> I think t01_mov.s is compiled for H8SX target so register pair
> (er4-er7) is valid as mentioned in H8SX family programming
> manual. So I think those lines from t01_mov.s and t01_mov.exp are
> necessary.

> -    ldm @sp+,(er4-er7)                  ;01306d77
> +    ldm @sp+,(er5-er7)                  ;01206d77

> -    stm (er4-er7),@-sp                  ;01306df4
> +    stm (er5-er7),@-sp                  ;01206df5

I am happy for this part of the patch to be reverted, but if you do
so, you will start generating extra GAS testsuite failures for the
h8300-elf toolchain.

Presumably the correct solution is for the new test in tc-h8300.c to
allow the use of er4-er7 for the H8SX ?  ie something like this:

Index: gas/config/tc-h8300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-h8300.c,v
retrieving revision 1.43
diff -c -3 -p -r1.43 tc-h8300.c
*** gas/config/tc-h8300.c	25 Nov 2003 23:09:47 -0000	1.43
--- gas/config/tc-h8300.c	26 Nov 2003 12:44:57 -0000
*************** get_operand (char **ptr, struct h8_op *o
*** 598,603 ****
--- 598,604 ----
            && !(low == 2 && (high == 3 || ((high == 4 || high == 5) && SXmode)))
            && !(low == 3 && (high == 4 || high == 5 || high == 6) && SXmode)
            && !(low == 4 && (high == 5 || high == 6))
+           && !(low == 4 && high == 7 && SXmode)
            && !(low == 5 && (high == 6 || high == 7) && SXmode)
            && !(low == 6 && high == 7 && SXmode))
  	as_bad (_("Invalid register list for ldm/stm\n"));

Cheers
        Nick
        


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