expecting string instruction after `rep' with latest SeaBIOS
Building the seabios defconfig on a 64-bit Debian Wheezy system I'm seeing: Compiling (16bit) out/romlayout.o src/romlayout.S: Assembler messages: src/romlayout.S:285: Error: expecting string instruction after `rep' make: *** [out/romlayout.o] Error 1 That line is: // Acquire lock and take ownership of shared stack 1: rep nop I've also checked the preprocessed version and the nop isn't being disappeared or anything like that. This is with 083ee297ef88d "ohci: Update usb command timeouts to use usb_xfer_time()". I don't see it with the rel-1.7.5 tag. git bisect has fingered 0673b7870063a ""smp: Replace QEMU SMP init assembler code with C; run only in 32bit mode.", which makes sense since it made those additions to romlayout.S Other than a compiler bug I can't think what might be going on. Debian Wheezy has gcc 4.7.2 and binutils 2.22. Ian.
Il 30/06/2014 15:03, Ian Campbell ha scritto:
That line is: // Acquire lock and take ownership of shared stack 1: rep nop
I've also checked the preprocessed version and the nop isn't being disappeared or anything like that.
"rep nop" is really just "pause". I think the assembler wants "rep; nop" instead. Paolo
On Mon, 2014-06-30 at 15:07 +0200, Paolo Bonzini wrote:
Il 30/06/2014 15:03, Ian Campbell ha scritto:
That line is: // Acquire lock and take ownership of shared stack 1: rep nop
I've also checked the preprocessed version and the nop isn't being disappeared or anything like that.
"rep nop" is really just "pause".
Yes, that's how I was translating it in my head, which is why I thought it was fine to write it like that.
I think the assembler wants "rep; nop" instead.
That's right, I was just reaching the same conclusion. Build-tested patch: 8<------------------------
From 0b05042b582a8992c15030406dcb220be82da8ce Mon Sep 17 00:00:00 2001 From: Ian Campbell <ian.campbell@citrix.com> Date: Mon, 30 Jun 2014 14:10:02 +0100 Subject: [PATCH] romlayout: Use "rep ; nop" not "rep nop".
Fixes: Compiling (16bit) out/romlayout.o src/romlayout.S: Assembler messages: src/romlayout.S:285: Error: expecting string instruction after `rep' make: *** [out/romlayout.o] Error 1 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- src/romlayout.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/romlayout.S b/src/romlayout.S index a931b32..a3ba965 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -282,7 +282,7 @@ entry_smp: jmp transition32 .code32 // Acquire lock and take ownership of shared stack -1: rep nop +1: rep ; nop 2: lock btsl $0, SMPLock jc 1b movl SMPStack, %esp -- 1.7.10.4
Il 30/06/2014 15:11, Ian Campbell ha scritto:
On Mon, 2014-06-30 at 15:07 +0200, Paolo Bonzini wrote:
Il 30/06/2014 15:03, Ian Campbell ha scritto:
That line is: // Acquire lock and take ownership of shared stack 1: rep nop
I've also checked the preprocessed version and the nop isn't being disappeared or anything like that.
"rep nop" is really just "pause".
Yes, that's how I was translating it in my head, which is why I thought it was fine to write it like that.
I think the assembler wants "rep; nop" instead.
That's right, I was just reaching the same conclusion. Build-tested patch:
8<------------------------
From 0b05042b582a8992c15030406dcb220be82da8ce Mon Sep 17 00:00:00 2001 From: Ian Campbell <ian.campbell@citrix.com> Date: Mon, 30 Jun 2014 14:10:02 +0100 Subject: [PATCH] romlayout: Use "rep ; nop" not "rep nop".
Fixes: Compiling (16bit) out/romlayout.o src/romlayout.S: Assembler messages: src/romlayout.S:285: Error: expecting string instruction after `rep' make: *** [out/romlayout.o] Error 1
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- src/romlayout.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/romlayout.S b/src/romlayout.S index a931b32..a3ba965 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -282,7 +282,7 @@ entry_smp: jmp transition32 .code32 // Acquire lock and take ownership of shared stack -1: rep nop +1: rep ; nop 2: lock btsl $0, SMPLock jc 1b movl SMPStack, %esp
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
On Mon, Jun 30, 2014 at 02:11:51PM +0100, Ian Campbell wrote:
I think the assembler wants "rep; nop" instead.
That's right, I was just reaching the same conclusion. Build-tested patch:
Thanks - I applied this change. -Kevin
participants (3)
-
Ian Campbell -
Kevin O'Connor -
Paolo Bonzini