This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Performance counter opcodes for MIPS R1[02]000
- To: binutils at sources dot redhat dot com
- Subject: Re: [PATCH] Performance counter opcodes for MIPS R1[02]000
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- Date: Tue, 19 Jun 2001 02:18:35 +0200
Nick Clifton wrote:
[snip]
>After applying this patch, I am seeing new failures in the GAS
>testsuite for a "mips-elf" toolchain:
>
> FAIL: MIPS lb
> FAIL: MIPS sb
> FAIL: MIPS trunc
> FAIL: MIPS MIPS32 instructions
> FAIL: MIPS MIPS64 instructions
>
>I do not want to accept that patch whilst these problems remain, so
>please can you investigate and determine the cause and the correct
>solution.
After the situation with mips has settled a bit (and too late for
this release :-( ), here is an updated and fixed patch which
should go well. Performance Counter opcodes aren't in any more
(for now), it only fixes objdump and the according testcases.
Thiemo
2001-06-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
/gas/testsuite/ChangeLog
* mips/lb.d: Reflect disassembler output fixes.
* mips/mips32.d: Likewise.
* mips/mips4650.d: Likewise.
* mips/mips64.d: Likewise.
* mips/sb.d: Likewise.
* mips/trunc.d: Likewise.
/opcodes/ChangeLog
* mips-dis.c (print_insn_arg): Don't use software integer registers
for coprocessor registers.
(_print_insn_mips): Get distinction between old ABI and new ABI right.
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/testsuite/gas/mips/lb.d src/gas/testsuite/gas/mips/lb.d
--- src-orig/gas/testsuite/gas/mips/lb.d Tue May 15 16:33:52 2001
+++ src/gas/testsuite/gas/mips/lb.d Sat Jun 16 19:54:48 2001
@@ -388,8 +388,8 @@
0+0378 <[^>]*> lw a0,0\(zero\)
0+037c <[^>]*> lwl a0,0\(zero\)
0+0380 <[^>]*> lwr a0,0\(zero\)
-0+0384 <[^>]*> lwc0 a0,0\(zero\)
+0+0384 <[^>]*> lwc0 \$4,0\(zero\)
0+0388 <[^>]*> lwc1 \$f4,0\(zero\)
-0+038c <[^>]*> lwc2 a0,0\(zero\)
-0+0390 <[^>]*> lwc3 a0,0\(zero\)
+0+038c <[^>]*> lwc2 \$4,0\(zero\)
+0+0390 <[^>]*> lwc3 \$4,0\(zero\)
...
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/testsuite/gas/mips/mips32.d src/gas/testsuite/gas/mips/mips32.d
--- src-orig/gas/testsuite/gas/mips/mips32.d Tue May 15 16:33:53 2001
+++ src/gas/testsuite/gas/mips/mips32.d Sat Jun 16 20:14:15 2001
@@ -26,15 +26,15 @@
0+0040 <[^>]*> 00000000 nop
0+0044 <[^>]*> 4903ffee bc2tl 0+0000 <text_label>
0+0048 <[^>]*> 00000000 nop
-0+004c <[^>]*> 48411000 cfc2 at,v0
+0+004c <[^>]*> 48411000 cfc2 at,\$2
0+0050 <[^>]*> 4b234567 c2 0x1234567
-0+0054 <[^>]*> 48c21800 ctc2 v0,v1
-0+0058 <[^>]*> 48032000 mfc2 v1,a0
-0+005c <[^>]*> 48042800 mfc2 a0,a1
-0+0060 <[^>]*> 48053007 mfc2 a1,a2,7
-0+0064 <[^>]*> 48863800 mtc2 a2,a3
-0+0068 <[^>]*> 48874000 mtc2 a3,t0
-0+006c <[^>]*> 48884807 mtc2 t0,t1,7
+0+0054 <[^>]*> 48c21800 ctc2 v0,\$3
+0+0058 <[^>]*> 48032000 mfc2 v1,\$4
+0+005c <[^>]*> 48042800 mfc2 a0,\$5
+0+0060 <[^>]*> 48053007 mfc2 a1,\$6,7
+0+0064 <[^>]*> 48863800 mtc2 a2,\$7
+0+0068 <[^>]*> 48874000 mtc2 a3,\$8
+0+006c <[^>]*> 48884807 mtc2 t0,\$9,7
0+0070 <[^>]*> bc250000 cache 0x5,0\(at\)
0+0074 <[^>]*> bc457fff cache 0x5,32767\(v0\)
0+0078 <[^>]*> bc658000 cache 0x5,-32768\(v1\)
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/testsuite/gas/mips/mips4650.d src/gas/testsuite/gas/mips/mips4650.d
--- src-orig/gas/testsuite/gas/mips/mips4650.d Tue May 15 16:33:53 2001
+++ src/gas/testsuite/gas/mips/mips4650.d Sat Jun 16 20:08:15 2001
@@ -10,5 +10,5 @@
...
0+000c <stuff\+0xc> madu a1,a2
...
-0+0018 <stuff\+0x18> mul a2,a3,t0
+0+0018 <stuff\+0x18> mul a2,a3,a4
0+001c <stuff\+0x1c> nop
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/testsuite/gas/mips/mips64.d src/gas/testsuite/gas/mips/mips64.d
--- src-orig/gas/testsuite/gas/mips/mips64.d Tue May 15 16:33:53 2001
+++ src/gas/testsuite/gas/mips/mips64.d Sat Jun 16 20:14:49 2001
@@ -9,9 +9,9 @@
Disassembly of section .text:
0+0000 <[^>]*> 70410825 dclo at,v0
0+0004 <[^>]*> 70831824 dclz v1,a0
-0+0008 <[^>]*> 48232000 dmfc2 v1,a0
-0+000c <[^>]*> 48242800 dmfc2 a0,a1
-0+0010 <[^>]*> 48253007 dmfc2 a1,a2,7
-0+0014 <[^>]*> 48a63800 dmtc2 a2,a3
-0+0018 <[^>]*> 48a74000 dmtc2 a3,t0
-0+001c <[^>]*> 48a84807 dmtc2 t0,t1,7
+0+0008 <[^>]*> 48232000 dmfc2 v1,\$4
+0+000c <[^>]*> 48242800 dmfc2 a0,\$5
+0+0010 <[^>]*> 48253007 dmfc2 a1,\$6,7
+0+0014 <[^>]*> 48a63800 dmtc2 a2,\$7
+0+0018 <[^>]*> 48a74000 dmtc2 a3,\$8
+0+001c <[^>]*> 48a84807 dmtc2 a4,\$9,7
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/testsuite/gas/mips/sb.d src/gas/testsuite/gas/mips/sb.d
--- src-orig/gas/testsuite/gas/mips/sb.d Tue May 15 16:33:53 2001
+++ src/gas/testsuite/gas/mips/sb.d Sat Jun 16 19:53:41 2001
@@ -386,10 +386,10 @@
0+0370 <[^>]*> sw a1,4\(zero\)
0+0374 <[^>]*> sh a0,0\(zero\)
0+0378 <[^>]*> sw a0,0\(zero\)
-0+037c <[^>]*> swc0 a0,0\(zero\)
+0+037c <[^>]*> swc0 \$4,0\(zero\)
0+0380 <[^>]*> swc1 \$f4,0\(zero\)
-0+0384 <[^>]*> swc2 a0,0\(zero\)
-0+0388 <[^>]*> swc3 a0,0\(zero\)
+0+0384 <[^>]*> swc2 \$4,0\(zero\)
+0+0388 <[^>]*> swc3 \$4,0\(zero\)
0+038c <[^>]*> swc1 \$f4,0\(zero\)
0+0390 <[^>]*> swl a0,0\(zero\)
0+0394 <[^>]*> swr a0,0\(zero\)
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/testsuite/gas/mips/trunc.d src/gas/testsuite/gas/mips/trunc.d
--- src-orig/gas/testsuite/gas/mips/trunc.d Tue May 15 16:33:53 2001
+++ src/gas/testsuite/gas/mips/trunc.d Sat Jun 16 20:17:40 2001
@@ -7,23 +7,23 @@
.*: +file format .*mips.*
Disassembly of section .text:
-0+0000 <[^>]*> cfc1 a0,ra
-0+0004 <[^>]*> cfc1 a0,ra
+0+0000 <[^>]*> cfc1 a0,\$31
+0+0004 <[^>]*> cfc1 a0,\$31
0+0008 <[^>]*> nop
0+000c <[^>]*> ori at,a0,0x3
0+0010 <[^>]*> xori at,at,0x2
-0+0014 <[^>]*> ctc1 at,ra
+0+0014 <[^>]*> ctc1 at,\$31
0+0018 <[^>]*> nop
0+001c <[^>]*> cvt.w.d \$f4,\$f6
-0+0020 <[^>]*> ctc1 a0,ra
+0+0020 <[^>]*> ctc1 a0,\$31
0+0024 <[^>]*> nop
-0+0028 <[^>]*> cfc1 a0,ra
-0+002c <[^>]*> cfc1 a0,ra
+0+0028 <[^>]*> cfc1 a0,\$31
+0+002c <[^>]*> cfc1 a0,\$31
0+0030 <[^>]*> nop
0+0034 <[^>]*> ori at,a0,0x3
0+0038 <[^>]*> xori at,at,0x2
-0+003c <[^>]*> ctc1 at,ra
+0+003c <[^>]*> ctc1 at,\$31
0+0040 <[^>]*> nop
0+0044 <[^>]*> cvt.w.s \$f4,\$f6
-0+0048 <[^>]*> ctc1 a0,ra
+0+0048 <[^>]*> ctc1 a0,\$31
0+004c <[^>]*> nop
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/opcodes/mips-dis.c src/opcodes/mips-dis.c
--- src-orig/opcodes/mips-dis.c Wed May 23 21:09:17 2001
+++ src/opcodes/mips-dis.c Sat Jun 16 16:27:19 2001
@@ -256,13 +256,13 @@
break;
case 'E':
- (*info->fprintf_func) (info->stream, "%s",
- reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+ (*info->fprintf_func) (info->stream, "$%d",
+ (l >> OP_SH_RT) & OP_MASK_RT);
break;
case 'G':
- (*info->fprintf_func) (info->stream, "%s",
- reg_names[(l >> OP_SH_RD) & OP_MASK_RD]);
+ (*info->fprintf_func) (info->stream, "$%d",
+ (l >> OP_SH_RD) & OP_MASK_RD);
break;
case 'N':
@@ -524,9 +524,9 @@
/* Use mips64_reg_names for new ABI. */
if (info->flavour == bfd_target_elf_flavour
&& info->symbols != NULL
- && (((get_mips_isa(info) | INSN_ISA_MASK) & ISA_MIPS2) != 0)
+ && ((get_mips_isa(info) & INSN_ISA3) != 0)
&& ((elf_elfheader (bfd_asymbol_bfd(*(info->symbols)))->e_flags
- & EF_MIPS_ABI2) != 0))
+ & (E_MIPS_ABI_O32 | E_MIPS_ABI_O64)) == 0))
reg_names = mips64_reg_names;
else
reg_names = mips32_reg_names;