- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
/* A C statement or statements which output an assembler instruction
opcode to the stdio stream STREAM. The macro-operand PTR is a
variable of type `char *' which points to the opcode name in its
"internal" form--the form that is written in the machine description.
GAS version 1.38.1 doesn't understand the `repz' opcode mnemonic.
So use `repe' instead. */
#undef ASM_OUTPUT_OPCODE
#define ASM_OUTPUT_OPCODE(STREAM, PTR) \
{ \
if ((PTR)[0] == 'r' \
&& (PTR)[1] == 'e' \
&& (PTR)[2] == 'p') \
{ \
if ((PTR)[3] == 'z') \
{ \
fputs ("repe", (STREAM)); \
(PTR) += 4; \
} \
else if ((PTR)[3] == 'n' && (PTR)[4] == 'z') \
{ \
fputs ("repne", (STREAM)); \
(PTR) += 5; \
} \
} \
else \
ASM_OUTPUT_AVX_PREFIX ((STREAM), (PTR)); \
}
Костыль из GCC. Ассемблер GAS версии 1.38.1 не переваривает мнемоники repz и repnz. Эта макрохрень перекодирует их в repe и repne соответственно
https://github.com/mirrors/gcc/blob/master/gcc/config/i386/gas.h#L81
bGczbZF 25.08.2021 01:26 # 0