This is the mail archive of the 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]

[SH] Correct clrs,sets,pref insns


GCC 5 will start passing the -isa= option to GAS.  When running GCC
tests for -m3 (SH3) I've noticed that the "pref" insn is wrongly
rejected by GAS.  While fixing that in opcodes/sh-opc.h, I've noticed
that the "clrs" and "sets" insns also have been wrongly set to be
"arch_sh_up".  In fact, "clrs" and "sets" are available only on SH3* and

The attached patch fixes that and causes some of the tests in e.g.
gas/testsuite/gas/sh/arch/* to fail of course.

Unfortunately, I couldn't manage to re-generate the .s files, because
the code in gas/testsuite/gas/sh/arch/arch.exp doesn't work here -- it
always crashes in line 229 at the expect.

Does anybody have any suggestions/ideas/workarounds?


	* sh-opc.h (clrs, sets): Mark as arch_sh3_nommu_up instead of 
	(pref): Mark as arch_sh2a_nofpu_or_sh3_nommu_up instead of
diff --git a/opcodes/sh-opc.h b/opcodes/sh-opc.h
index ee235bd..d511cae 100644
--- a/opcodes/sh-opc.h
+++ b/opcodes/sh-opc.h
@@ -415,7 +415,7 @@ const sh_opcode_info sh_table[] =
 /* 0000000000101000 clrmac              */{"clrmac",{0},{HEX_0,HEX_0,HEX_2,HEX_8}, arch_sh_up},
-/* 0000000001001000 clrs                */{"clrs",{0},{HEX_0,HEX_0,HEX_4,HEX_8}, arch_sh_up},
+/* 0000000001001000 clrs                */{"clrs",{0},{HEX_0,HEX_0,HEX_4,HEX_8}, arch_sh3_nommu_up},
 /* 0000000000001000 clrt                */{"clrt",{0},{HEX_0,HEX_0,HEX_0,HEX_8}, arch_sh_up},
@@ -683,7 +683,7 @@ const sh_opcode_info sh_table[] =
 /* 11001111i8*1.... or.b #<imm>,@(R0,GBR)*/{"or.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_F,IMM0_8}, arch_sh_up},
-/* 0000nnnn10000011 pref @<REG_N>       */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}, arch_sh2a_nofpu_or_sh4_nommu_nofpu_up},
+/* 0000nnnn10000011 pref @<REG_N>       */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}, arch_sh2a_nofpu_or_sh3_nommu_up},
 /* 0000nnnn11010011 prefi @<REG_N>      */{"prefi",{A_IND_N},{HEX_0,REG_N,HEX_D,HEX_3}, arch_sh4a_nofpu_up},
@@ -702,7 +702,7 @@ const sh_opcode_info sh_table[] =
 /* 0000000010011000 setdmx              */{"setdmx",{0},{HEX_0,HEX_0,HEX_9,HEX_8}, arch_sh4al_dsp_up},
 /* 0000000011001000 setdmy              */{"setdmy",{0},{HEX_0,HEX_0,HEX_C,HEX_8}, arch_sh4al_dsp_up},
-/* 0000000001011000 sets                */{"sets",{0},{HEX_0,HEX_0,HEX_5,HEX_8}, arch_sh_up},
+/* 0000000001011000 sets                */{"sets",{0},{HEX_0,HEX_0,HEX_5,HEX_8}, arch_sh3_nommu_up},
 /* 0000000000011000 sett                */{"sett",{0},{HEX_0,HEX_0,HEX_1,HEX_8}, arch_sh_up},
 /* 0100nnnn00010100 setrc <REG_N>       */{"setrc",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_4}, arch_sh_dsp_up},

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