This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed patch] Fix a typo in the h8300 port.
- To: gcc-patches at gcc dot gnu dot org
- Subject: [committed patch] Fix a typo in the h8300 port.
- From: Kazu Hirata <kazu at hxi dot com>
Hi,
Attached is a patch I just committed to fix a typo in the assembly
code for 12-bit ASHIFTRT in HImode in the h8300 port.
There is no opcode called 'extw'. Those begin with 'ext' are 'exts'
and 'extu'. In this case, the code is meant to sign-extend, not
zero-extend. Thus, we should use 'exts'.
For your information, 12-bit ASHIFTRT in HImode on H8/300H and H8/S is
done by the following sequence.
8-bit shift
sign extend
shift remaining 4-bits one by one (or two in case of H8/S).
Thanks,
Kazu Hirata
2000-12-26 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.c (get_shift_alg): Fix a typo in the assembly
code for 12-bit ASHIFTRT in HImode.
Index: h8300.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/h8300/h8300.c,v
retrieving revision 1.46
diff -u -r1.46 h8300.c
--- h8300.c 2000/10/18 07:17:36 1.46
+++ h8300.c 2000/12/26 17:48:49
@@ -2221,9 +2221,9 @@
if (TARGET_H8300)
*assembler_p = "mov.b\t%t0,%s0\n\tbld\t#7,%s0\n\tsubx\t%t0,%t0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0";
else if (TARGET_H8300H)
- *assembler_p = "mov.b\t%t0,%s0\n\textw.w\t%T0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0";
+ *assembler_p = "mov.b\t%t0,%s0\n\texts.w\t%T0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0";
else if (TARGET_H8300S)
- *assembler_p = "mov.b\t%t0,%s0\n\textw.w\t%T0\n\tshar.b\t#2,%s0\n\tshar.b\t#2,%s0";
+ *assembler_p = "mov.b\t%t0,%s0\n\texts.w\t%T0\n\tshar.b\t#2,%s0\n\tshar.b\t#2,%s0";
*cc_valid_p = 0;
return SHIFT_SPECIAL;
}