* [PATCH] m32r-*-as For a code depended for host word size.
@ 2005-10-14 8:05 Kazuhiro Inaoka
2005-10-14 8:35 ` Nick Clifton
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Kazuhiro Inaoka @ 2005-10-14 8:05 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils, cgen
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
Hi Nick,
This patch is to change for a code depended for host word size.
Please commit it and regenerate opcodes/m32r-asm.c.
Regards,
Kazuhiro Inaoka
ChangeLog
2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* cpu/m32r.opc (parse_slo16): Changed for a code depended
for host word size.
[-- Attachment #2: m32r.opc.patch --]
[-- Type: text/plain, Size: 493 bytes --]
Index: m32r.opc
===================================================================
RCS file: /cvs/src/src/cpu/m32r.opc,v
retrieving revision 1.6
diff -u -p -r1.6 m32r.opc
--- m32r.opc 1 Jul 2005 11:16:30 -0000 1.6
+++ m32r.opc 14 Oct 2005 07:33:21 -0000
@@ -182,7 +182,7 @@ parse_slo16 (CGEN_CPU_DESC cd,
{
value &= 0xffff;
if (value & 0x8000)
- value |= 0xffff0000;
+ value |= ~0xffff;
}
*valuep = value;
return errmsg;
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-14 8:05 [PATCH] m32r-*-as For a code depended for host word size Kazuhiro Inaoka
@ 2005-10-14 8:35 ` Nick Clifton
2005-10-14 9:04 ` Andreas Schwab
2005-10-26 5:39 ` Kazuhiro Inaoka
2 siblings, 0 replies; 13+ messages in thread
From: Nick Clifton @ 2005-10-14 8:35 UTC (permalink / raw)
To: Kazuhiro Inaoka; +Cc: binutils, cgen
Hi Kazu,
> 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
>
> * cpu/m32r.opc (parse_slo16): Changed for a code depended
> for host word size.
Approved and applied. I have also applied the patch to
cgen/cpu/m32r.opc for completeness, even though this file is now
redundant. I also regenerated opcodes/m32r-asm.c and checked that in.
I hope that you not mind, but I took the liberty of rewording your
ChangeLog entry into what I thought was a more appropriate form:
* cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
size.
Cheers
Nick
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-14 8:05 [PATCH] m32r-*-as For a code depended for host word size Kazuhiro Inaoka
2005-10-14 8:35 ` Nick Clifton
@ 2005-10-14 9:04 ` Andreas Schwab
2005-10-17 1:25 ` Kazuhiro Inaoka
2005-10-26 5:39 ` Kazuhiro Inaoka
2 siblings, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 2005-10-14 9:04 UTC (permalink / raw)
To: Kazuhiro Inaoka; +Cc: Nick Clifton, binutils, cgen
Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> writes:
> 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
>
> * cpu/m32r.opc (parse_slo16): Changed for a code depended
> for host word size.
> Index: m32r.opc
> ===================================================================
> RCS file: /cvs/src/src/cpu/m32r.opc,v
> retrieving revision 1.6
> diff -u -p -r1.6 m32r.opc
> --- m32r.opc 1 Jul 2005 11:16:30 -0000 1.6
> +++ m32r.opc 14 Oct 2005 07:33:21 -0000
> @@ -182,7 +182,7 @@ parse_slo16 (CGEN_CPU_DESC cd,
> {
> value &= 0xffff;
> if (value & 0x8000)
> - value |= 0xffff0000;
> + value |= ~0xffff;
~0xffff is still 0xffff0000 for 32 bit ints and will be zero extended.
You probably want ~(bfd_vma)0xffff here. Alternatively you can use
value = ((value & 0xffff) ^ 0x8000) - 0x8000.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-14 9:04 ` Andreas Schwab
@ 2005-10-17 1:25 ` Kazuhiro Inaoka
2005-10-18 7:54 ` Nick Clifton
0 siblings, 1 reply; 13+ messages in thread
From: Kazuhiro Inaoka @ 2005-10-17 1:25 UTC (permalink / raw)
To: Andreas Schwab, Nick Clifton; +Cc: binutils, cgen
Thanks Andreas,
> ~0xffff is still 0xffff0000 for 32 bit ints and will be zero extended.
> You probably want ~(bfd_vma)0xffff here. Alternatively you can use
>
> value = ((value & 0xffff) ^ 0x8000) - 0x8000.
It's better code.
Hi Nick,
Should I make and send the patch again?
Regards,
Kazuhiro Inaoka
Andreas Schwab wrote:
>>2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
>>
>> * cpu/m32r.opc (parse_slo16): Changed for a code depended
>> for host word size.
>>Index: m32r.opc
>>===================================================================
>>RCS file: /cvs/src/src/cpu/m32r.opc,v
>>retrieving revision 1.6
>>diff -u -p -r1.6 m32r.opc
>>--- m32r.opc 1 Jul 2005 11:16:30 -0000 1.6
>>+++ m32r.opc 14 Oct 2005 07:33:21 -0000
>>@@ -182,7 +182,7 @@ parse_slo16 (CGEN_CPU_DESC cd,
>> {
>> value &= 0xffff;
>> if (value & 0x8000)
>>- value |= 0xffff0000;
>>+ value |= ~0xffff;
>>
>>
>
>~0xffff is still 0xffff0000 for 32 bit ints and will be zero extended.
>You probably want ~(bfd_vma)0xffff here. Alternatively you can use
>
> value = ((value & 0xffff) ^ 0x8000) - 0x8000.
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-17 1:25 ` Kazuhiro Inaoka
@ 2005-10-18 7:54 ` Nick Clifton
2005-10-18 9:15 ` Kazuhiro Inaoka
0 siblings, 1 reply; 13+ messages in thread
From: Nick Clifton @ 2005-10-18 7:54 UTC (permalink / raw)
To: Kazuhiro Inaoka; +Cc: Andreas Schwab, binutils, cgen
Hi Kazuhiro,
> Thanks Andreas,
>> value = ((value & 0xffff) ^ 0x8000) - 0x8000.
> It's better code.
> Hi Nick,
> Should I make and send the patch again?
No need - I have checked this patch in and attributed it to Andreas.
Cheers
Nick
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-18 7:54 ` Nick Clifton
@ 2005-10-18 9:15 ` Kazuhiro Inaoka
2005-10-19 14:45 ` Nick Clifton
0 siblings, 1 reply; 13+ messages in thread
From: Kazuhiro Inaoka @ 2005-10-18 9:15 UTC (permalink / raw)
To: Nick Clifton; +Cc: Andreas Schwab, binutils, cgen
[-- Attachment #1: Type: text/plain, Size: 211 bytes --]
> No need - I have checked this patch in and attributed it to Andreas.
Thanks Nick,
I checked your committed patch. But It's not so good.
I think Andreas meant the attached patch.
Regards,
Kazuhiro Inaoka
[-- Attachment #2: m32r.opc.patch --]
[-- Type: text/plain, Size: 570 bytes --]
Index: m32r.opc
===================================================================
RCS file: /cvs/src/src/cpu/m32r.opc,v
retrieving revision 1.8
diff -u -r1.8 m32r.opc
--- m32r.opc 18 Oct 2005 07:53:17 -0000 1.8
+++ m32r.opc 18 Oct 2005 08:55:24 -0000
@@ -180,9 +180,7 @@
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
{
- value &= 0xffff;
- if (value & 0x8000)
- value = ((value & 0xffff) ^ 0x8000) - 0x8000;
+ value = ((value & 0xffff) ^ 0x8000) - 0x8000;
}
*valuep = value;
return errmsg;
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-18 9:15 ` Kazuhiro Inaoka
@ 2005-10-19 14:45 ` Nick Clifton
2005-10-20 1:18 ` Kazuhiro Inaoka
0 siblings, 1 reply; 13+ messages in thread
From: Nick Clifton @ 2005-10-19 14:45 UTC (permalink / raw)
To: Kazuhiro Inaoka; +Cc: Andreas Schwab, binutils, cgen
Hi Kazuhiro,
> I checked your committed patch. But It's not so good.
> I think Andreas meant the attached patch.
Oops - yes, sorry about that. I have checked in the corrected version
of the patch.
Cheers
Nick
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-19 14:45 ` Nick Clifton
@ 2005-10-20 1:18 ` Kazuhiro Inaoka
0 siblings, 0 replies; 13+ messages in thread
From: Kazuhiro Inaoka @ 2005-10-20 1:18 UTC (permalink / raw)
To: Nick Clifton; +Cc: Andreas Schwab, binutils, cgen
Thanks Nick!
Kazuhiro Inaoka
Nick Clifton wrote:
> Hi Kazuhiro,
>
>> I checked your committed patch. But It's not so good.
>> I think Andreas meant the attached patch.
>
>
> Oops - yes, sorry about that. I have checked in the corrected version
> of the patch.
>
> Cheers
> Nick
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-14 8:05 [PATCH] m32r-*-as For a code depended for host word size Kazuhiro Inaoka
2005-10-14 8:35 ` Nick Clifton
2005-10-14 9:04 ` Andreas Schwab
@ 2005-10-26 5:39 ` Kazuhiro Inaoka
2005-10-26 6:05 ` Alan Modra
2 siblings, 1 reply; 13+ messages in thread
From: Kazuhiro Inaoka @ 2005-10-26 5:39 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils, cgen
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
Hi Nick,
This patch is to fix FAIL at testsuite/gas/m32r/seth on x86_64 host.
Please commit it and regenerate opcodes/m32r-asm.c.
Regards,
Kazuhiro Inaoka
ChangeLog
2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word
size.
[-- Attachment #2: m32r.opc2.patch --]
[-- Type: text/plain, Size: 486 bytes --]
Index: m32r.opc
===================================================================
RCS file: /cvs/src/src/cpu/m32r.opc,v
retrieving revision 1.9
diff -p -u -r1.9 m32r.opc
--- m32r.opc 19 Oct 2005 14:44:17 -0000 1.9
+++ m32r.opc 26 Oct 2005 05:24:14 -0000
@@ -144,6 +144,7 @@ parse_hi16 (CGEN_CPU_DESC cd,
{
value = value + (value & 0x8000 ? 0x10000 : 0);
value >>= 16;
+ value &= 0xffff;
}
*valuep = value;
return errmsg;
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-26 5:39 ` Kazuhiro Inaoka
@ 2005-10-26 6:05 ` Alan Modra
2005-10-26 6:21 ` Kazuhiro Inaoka
0 siblings, 1 reply; 13+ messages in thread
From: Alan Modra @ 2005-10-26 6:05 UTC (permalink / raw)
To: Kazuhiro Inaoka; +Cc: Nick Clifton, binutils, cgen
On Wed, Oct 26, 2005 at 02:39:35PM +0900, Kazuhiro Inaoka wrote:
> This patch is to fix FAIL at testsuite/gas/m32r/seth on x86_64 host.
Should high() be treated the same, as follows?
Index: cpu/m32r.opc
===================================================================
RCS file: /cvs/src/src/cpu/m32r.opc,v
retrieving revision 1.9
diff -u -p -r1.9 m32r.opc
--- cpu/m32r.opc 19 Oct 2005 14:44:17 -0000 1.9
+++ cpu/m32r.opc 26 Oct 2005 06:03:13 -0000
@@ -127,7 +127,10 @@ parse_hi16 (CGEN_CPU_DESC cd,
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
- value >>= 16;
+ {
+ value >>= 16;
+ value &= 0xffff;
+ }
*valuep = value;
return errmsg;
}
@@ -142,8 +145,9 @@ parse_hi16 (CGEN_CPU_DESC cd,
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
{
- value = value + (value & 0x8000 ? 0x10000 : 0);
+ value += 0x8000;
value >>= 16;
+ value &= 0xffff;
}
*valuep = value;
return errmsg;
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-26 6:05 ` Alan Modra
@ 2005-10-26 6:21 ` Kazuhiro Inaoka
2005-10-26 7:50 ` Alan Modra
0 siblings, 1 reply; 13+ messages in thread
From: Kazuhiro Inaoka @ 2005-10-26 6:21 UTC (permalink / raw)
To: Alan Modra, Nick Clifton; +Cc: binutils, cgen
That's OK.
Thanks,
Kazuhiro Inaoka
Alan Modra wrote:
>On Wed, Oct 26, 2005 at 02:39:35PM +0900, Kazuhiro Inaoka wrote:
>
>
>>This patch is to fix FAIL at testsuite/gas/m32r/seth on x86_64 host.
>>
>>
>
>Should high() be treated the same, as follows?
>
>Index: cpu/m32r.opc
>===================================================================
>RCS file: /cvs/src/src/cpu/m32r.opc,v
>retrieving revision 1.9
>diff -u -p -r1.9 m32r.opc
>--- cpu/m32r.opc 19 Oct 2005 14:44:17 -0000 1.9
>+++ cpu/m32r.opc 26 Oct 2005 06:03:13 -0000
>@@ -127,7 +127,10 @@ parse_hi16 (CGEN_CPU_DESC cd,
> ++*strp;
> if (errmsg == NULL
> && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
>- value >>= 16;
>+ {
>+ value >>= 16;
>+ value &= 0xffff;
>+ }
> *valuep = value;
> return errmsg;
> }
>@@ -142,8 +145,9 @@ parse_hi16 (CGEN_CPU_DESC cd,
> if (errmsg == NULL
> && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
> {
>- value = value + (value & 0x8000 ? 0x10000 : 0);
>+ value += 0x8000;
> value >>= 16;
>+ value &= 0xffff;
> }
> *valuep = value;
> return errmsg;
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-26 6:21 ` Kazuhiro Inaoka
@ 2005-10-26 7:50 ` Alan Modra
2005-10-27 0:58 ` Kazuhiro Inaoka
0 siblings, 1 reply; 13+ messages in thread
From: Alan Modra @ 2005-10-26 7:50 UTC (permalink / raw)
To: Kazuhiro Inaoka; +Cc: Nick Clifton, binutils, cgen
Applied.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] m32r-*-as For a code depended for host word size.
2005-10-26 7:50 ` Alan Modra
@ 2005-10-27 0:58 ` Kazuhiro Inaoka
0 siblings, 0 replies; 13+ messages in thread
From: Kazuhiro Inaoka @ 2005-10-27 0:58 UTC (permalink / raw)
To: Alan Modra; +Cc: Nick Clifton, binutils, cgen
Thanks Alan,
Alan Modra wrote:
>Applied.
>
Could you apply the path to cgen/cpu/m32r.opc too?
Regards,
Kazuhiro Inaoka
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-10-27 0:58 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-14 8:05 [PATCH] m32r-*-as For a code depended for host word size Kazuhiro Inaoka
2005-10-14 8:35 ` Nick Clifton
2005-10-14 9:04 ` Andreas Schwab
2005-10-17 1:25 ` Kazuhiro Inaoka
2005-10-18 7:54 ` Nick Clifton
2005-10-18 9:15 ` Kazuhiro Inaoka
2005-10-19 14:45 ` Nick Clifton
2005-10-20 1:18 ` Kazuhiro Inaoka
2005-10-26 5:39 ` Kazuhiro Inaoka
2005-10-26 6:05 ` Alan Modra
2005-10-26 6:21 ` Kazuhiro Inaoka
2005-10-26 7:50 ` Alan Modra
2005-10-27 0:58 ` Kazuhiro Inaoka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).