xen/System.map
xen/arch/arm/asm-offsets.s
xen/arch/arm/xen.lds
+xen/arch/x86/asm-macros.i
xen/arch/x86/asm-offsets.s
xen/arch/x86/boot/mkelf32
xen/arch/x86/xen.lds
efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o: $(BASEDIR)/arch/x86/efi/built_in.o
efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o: ;
-asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c
+asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h
$(CC) $(filter-out -Wa$(comma)% -flto,$(CFLAGS)) -S -o $@ $<
+asm-macros.i: CFLAGS += -D__ASSEMBLY__ -P
+
+$(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile
+ echo '#if 0' >$@.new
+ echo '.if 0' >>$@.new
+ echo '#endif' >>$@.new
+ echo 'asm ( ".include \"$@\"" );' >>$@.new
+ echo '#if 0' >>$@.new
+ echo '.endif' >>$@.new
+ cat $< >>$@.new
+ echo '#endif' >>$@.new
+ $(call move-if-changed,$@.new,$@)
+
xen.lds: xen.lds.S
$(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(AFLAGS)) -o $@ $<
sed -e 's/xen\.lds\.o:/xen\.lds:/g' <.xen.lds.d >.xen.lds.d.new
.PHONY: clean
clean::
rm -f asm-offsets.s *.lds boot/*.o boot/*~ boot/core boot/mkelf32
+ rm -f asm-macros.i $(BASEDIR)/include/asm-x86/asm-macros.*
rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d
rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc
rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin
--- /dev/null
+#include <asm/alternative-asm.h>
#ifndef __X86_ALTERNATIVE_H__
#define __X86_ALTERNATIVE_H__
+#ifdef __ASSEMBLY__
#include <asm/alternative-asm.h>
-
-#ifndef __ASSEMBLY__
+#else
#include <xen/stringify.h>
#include <xen/types.h>
+#include <asm/asm-macros.h>
struct __packed alt_instr {
int32_t orig_offset; /* original instruction */
extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
extern void alternative_instructions(void);
-asm ( ".macro mknops nr_bytes\n\t"
-#ifdef HAVE_AS_NOPS_DIRECTIVE
- ".nops \\nr_bytes, " __stringify(ASM_NOP_MAX) "\n\t"
-#else
- ".skip \\nr_bytes, 0x90\n\t"
-#endif
- ".endm\n\t" );
-
#define alt_orig_len "(.LXEN%=_orig_e - .LXEN%=_orig_s)"
#define alt_pad_len "(.LXEN%=_orig_p - .LXEN%=_orig_e)"
#define alt_total_len "(.LXEN%=_orig_p - .LXEN%=_orig_s)"