Commit a3d1fb55 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

x86: move size #defines to processor.h



These are necessary in many testcases that includes hand-written
assembly, otherwise they will only run for either 32- or 64-bit.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 0a44f220
......@@ -101,16 +101,6 @@ void do_handle_exception(struct ex_regs *regs)
exit(7);
}
#ifdef __x86_64__
# define R "r"
# define W "q"
# define S "8"
#else
# define R "e"
# define W "l"
# define S "4"
#endif
#define EX(NAME, N) extern char NAME##_fault; \
asm (".pushsection .text \n\t" \
#NAME"_fault: \n\t" \
......
......@@ -3,12 +3,6 @@
#include "vm.h"
#include "desc.h"
#ifdef __x86_64__
# define R "r"
#else
# define R "e"
#endif
extern char isr_entry_point[];
asm (
......
......@@ -4,6 +4,17 @@
#include "libcflat.h"
#include <stdint.h>
#ifdef __x86_64__
# define R "r"
# define W "q"
# define S "8"
#else
# define R "e"
# define W "l"
# define S "4"
#endif
struct descriptor_table_ptr {
u16 limit;
ulong base;
......
......@@ -47,12 +47,6 @@ static unsigned int inl(unsigned short port)
static int nr_cpus;
#ifdef __x86_64__
# define R "r"
#else
# define R "e"
#endif
static void cpuid_test(void)
{
asm volatile ("push %%"R "bx; cpuid; pop %%"R "bx"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment