Преглед на файлове

[build] Fix use of inline assembly on GCC 4.8 ARM64 builds

The inline assembly used in include/errno.h to generate the einfo
blocks requires the ability to generate an immediate constant with no
immediate-value prefix (such as the dollar sign for x86 assembly).

We currently achieve this via the undocumented "%c0" form of operand.
This causes an "invalid operand prefix" error on GCC 4.8 for ARM64
builds.

Fix by switching to the equally undocumented "%a0" form of operand,
which appears to work correctly on all tested versions of GCC.

Reported-by: Benjamin S. Allen <bsallen@alcf.anl.gov>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown преди 7 години
родител
ревизия
1a7746603b
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2
    2
      src/include/errno.h

+ 2
- 2
src/include/errno.h Целия файл

@@ -262,10 +262,10 @@ static inline void eplatform_discard ( int dummy __unused, ... ) {}
262 262
 		  ".align 8\n\t"					\
263 263
 		  "\n1:\n\t"						\
264 264
 		  ".long ( 4f - 1b )\n\t"				\
265
-		  ".long %c0\n\t"					\
265
+		  ".long %a0\n\t"					\
266 266
 		  ".long ( 2f - 1b )\n\t"				\
267 267
 		  ".long ( 3f - 1b )\n\t"				\
268
-		  ".long %c1\n\t"					\
268
+		  ".long %a1\n\t"					\
269 269
 		  "\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t"	\
270 270
 		  "\n3:\t.asciz \"" __FILE__ "\"\n\t"			\
271 271
 		  ".align 8\n\t"					\

Loading…
Отказ
Запис