--- gcc/config/i386gas.h 2018/04/24 17:51:35 1.1 +++ gcc/config/i386gas.h 2018/04/24 17:59:36 1.1.1.2 @@ -17,6 +17,8 @@ You should have received a copy of the G along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Note that seq386gas.h is a GAS configuration that does not use this + file. */ #include "i386.h" /* Use the bsd assembler syntax. */ @@ -121,10 +123,29 @@ the Free Software Foundation, 675 Mass A { \ if ((PTR)[0] == 'r' \ && (PTR)[1] == 'e' \ - && (PTR)[2] == 'p' \ - && (PTR)[3] == 'z') \ + && (PTR)[2] == 'p') \ { \ - fprintf (STREAM, "repe"); \ - (PTR) += 4; \ + if ((PTR)[3] == 'z') \ + { \ + fprintf (STREAM, "repe"); \ + (PTR) += 4; \ + } \ + else if ((PTR)[3] == 'n' && (PTR)[4] == 'z') \ + { \ + fprintf (STREAM, "repne"); \ + (PTR) += 5; \ + } \ } \ } + +/* Define macro used to output shift-double opcodes when the shift + count is in %cl. Some assemblers require %cl as an argument; + some don't. + + GAS requires the %cl argument, so override unx386.h. */ + +#undef AS3_SHIFT_DOUBLE +#define AS3_SHIFT_DOUBLE(a,b,c,d) AS3 (a,b,c,d) + +/* Print opcodes the way that GAS expects them. */ +#define GAS_MNEMONICS 1