From b6988e13d141af28d0254f90c148bf2beb3ae7d7 Mon Sep 17 00:00:00 2001 From: Xinyun Liu Date: Thu, 8 Nov 2018 16:50:34 +0800 Subject: [PATCH] hv: fix branch addressing syntax warning Branch addressing using registers or memory operands must be prefixed by a '*' in AT&T ASM language. This change is to fix these warnings: arch/x86/cpu.c:409: Warning: indirect call without `*' arch/x86/cpu.c:553: Warning: indirect call without `*' arch/x86/trampoline.S:168: Warning: indirect jmp without `*' Ref: https://csiflabs.cs.ucdavis.edu/~ssdavis/50/att-syntax.htm Tracked-On: #1764 Signed-off-by: Xinyun Liu Reviewed-By: Yin Fengwei --- hypervisor/arch/x86/cpu.c | 2 +- hypervisor/arch/x86/trampoline.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/cpu.c b/hypervisor/arch/x86/cpu.c index 5345b2da0..7331eaf92 100644 --- a/hypervisor/arch/x86/cpu.c +++ b/hypervisor/arch/x86/cpu.c @@ -58,7 +58,7 @@ static uint64_t start_tsc __attribute__((__section__(".bss_noinit"))); { \ asm volatile ("movq %0, %%rsp\n" \ "pushq %1\n" \ - "call %2\n" \ + "call *%2\n" \ : \ : "r"(rsp), "rm"(SP_BOTTOM_MAGIC), "a"(to)); \ } diff --git a/hypervisor/arch/x86/trampoline.S b/hypervisor/arch/x86/trampoline.S index 027ac2649..48f813331 100644 --- a/hypervisor/arch/x86/trampoline.S +++ b/hypervisor/arch/x86/trampoline.S @@ -165,7 +165,7 @@ trampoline_start64: /* Jump to C entry */ movq main_entry(%rip), %rax - jmp %rax + jmp *%rax /* main entry */